WEBVTT

00:00.000 --> 00:03.360
Hi, everyone, and thank you so much for coming to our talk.

00:03.360 --> 00:10.600
We just want to do a quick shout out to Bug Bounty Village for having this talk and for DEF CON for the Creator Stage.

00:10.600 --> 00:11.820
This is pretty cool.

00:12.320 --> 00:17.860
And just a reminder to everyone, please be nice to your goons and also be nice to all the volunteers.

00:17.860 --> 00:19.860
They're putting so much time and energy in this.

00:19.860 --> 00:21.660
So, just throwing it out there.

00:21.660 --> 00:25.760
So, welcome to I've Got 99 Problems but a Prompt Injection Ain't Pineapple.

00:26.400 --> 00:27.820
My name is Chloe Masayuki.

00:27.820 --> 00:30.660
I'm the Head of Threat Intelligence over at Hidden Layer.

00:31.660 --> 00:33.100
And I'm Casimir Schultz.

00:33.100 --> 00:35.680
I'm a Zero-Day Researcher over at Hidden Layer as well.

00:37.540 --> 00:47.640
So, we're going to go on this journey together, talking first about AI vulnerabilities to make sure that we're all on the same page of what is out there, what kind of vulnerabilities exist in AI.

00:47.820 --> 00:58.360
And then we're going to go into the public perception of AI vulnerabilities, of course, and the true size of that landscape where CAS basically owns that type of landscape.

00:58.360 --> 01:03.560
And then I'll dive into the open source nature of AI and the reporting challenges.

01:03.860 --> 01:09.140
We did do some research with BugCrowd, HackerOne, and Integrity.

01:09.140 --> 01:14.320
So, big thanks for them for being transparent with us about what they're seeing and experiencing.

01:15.300 --> 01:23.680
So, when we think about AI vulnerabilities, I don't know about you, but it seems like the whole world thinks of this, where it's like, end of the world.

01:23.680 --> 01:26.020
It's, you know, I'll be back.

01:26.020 --> 01:28.840
I cannot do RL source negative for the life of me as boys.

01:28.840 --> 01:30.420
But you get the point.

01:30.420 --> 01:38.660
But even within our own industry in itself, there's so much misinformation, disinformation out there when it comes to security for AI.

01:38.700 --> 01:40.460
And yes, we know how to spell.

01:40.460 --> 01:43.560
That is a generated AI image over there.

01:43.560 --> 01:45.360
They're not good yet.

01:47.380 --> 01:51.680
So, let's go dive down the rabbit hole of AI vulnerabilities.

01:52.640 --> 01:57.220
And we're going to go into each one of these sections, so we're all on the same page once again.

01:57.500 --> 02:01.020
First, we're going to go down the attacks against the AI algorithms.

02:01.020 --> 02:04.560
Then we'll go through attacks against the filters and generative AI.

02:04.800 --> 02:11.520
And then I'll be passing the mic over to CAS, and he's going to go down the AI artifacts and the supply chain attacks.

02:13.560 --> 02:20.940
So, data poisoning attacks are basically, think about it as model training is crucial for like AI development, right?

02:20.960 --> 02:32.240
And it's incredibly vulnerable to data poisoning, which is when there's like malicious actors tend to manipulate or inject doctorate data or to like bias the model's behavior.

02:32.260 --> 02:39.640
And continuous learning systems are especially at risk as they retrain on unvalidated user supply data.

02:39.820 --> 02:48.720
Even small amounts of poison data can actually lead to a bias or incorrect predictions and can be amplified by public manipulation or botnets.

02:48.720 --> 02:50.480
Does anyone remember Tay?

02:50.480 --> 02:53.260
Microsoft Tay on Twitter, now known as X?

02:53.260 --> 02:54.600
Raise your hand.

02:54.700 --> 03:03.780
Okay, for those aren't familiar, in March 2016, Microsoft introduced a chat bot on Twitter, which now is known as X.

03:03.780 --> 03:07.960
And it was so nice and friendly.

03:07.960 --> 03:10.760
It was like, hello world, how are you?

03:10.760 --> 03:16.220
And you know how the world responded on Twitter, as you can imagine, it's full of trolls.

03:16.220 --> 03:22.160
Well, within 16 hours, this thing became the most racist, sexist thing on the planet.

03:22.300 --> 03:28.320
And of course, this was a problem for Microsoft because, you know, that's not good PR for them, clearly, right?

03:29.180 --> 03:31.480
So, then we have model evasion attacks.

03:31.480 --> 03:44.540
So, inference attacks, they tend to exploit AI models by curing them to extract sensitive information, often using slightly varied inputs to reconstruct the model that leading to potential model theft or bypass.

03:44.600 --> 03:54.360
So, evasion attacks is a type of bypass, used subtle, like really, really subtle, to change the inputs.

03:54.360 --> 04:01.260
And this could be basically like adding invisible noise to trick the models into misclassifications.

04:01.260 --> 04:13.780
And these techniques have been used by cyber criminals, and even ourselves once in a while, like testing things out, such as bypassing security systems, like spam filters, malware detection, and biometric authentication.

04:15.700 --> 04:18.540
Has anyone been in a self-driving car before?

04:19.960 --> 04:20.660
Okay.

04:20.660 --> 04:22.500
Raise those hands a little bit higher.

04:22.500 --> 04:23.400
How many of you?

04:23.400 --> 04:24.200
Okay.

04:24.280 --> 04:25.400
That's cool.

04:25.500 --> 04:27.060
I have not.

04:27.100 --> 04:31.500
But I want you to imagine you're in this self-driving car for those that haven't been in one.

04:31.500 --> 04:35.720
And if you've been in one, imagine you're back in that car again.

04:36.420 --> 04:50.280
And while you're at this stop sign, your car does this really weird thing, like it just slides to the left, slides to the right, and then it takes it back, y'all.

04:50.300 --> 04:52.180
One hop this time.

04:52.600 --> 04:54.500
Left foot, let's stomp.

04:54.500 --> 04:55.720
Right foot, let's stomp.

04:55.720 --> 04:57.640
And cha-cha real slowly.

04:57.640 --> 05:01.100
I know it's a little bit hard to imagine with a car doing it, but use your imagination.

05:01.100 --> 05:03.340
It's been a few days in Las Vegas.

05:03.340 --> 05:05.340
We've all lost our minds at this point.

05:05.600 --> 05:21.140
But there's already been examples of this, where a car gets to a stop sign, a self-driving car, and there's stickers that are on the stop sign itself, and so it bypasses that stop sign and keeps driving forward.

05:21.140 --> 05:24.340
That is an example of a model evasion attacks.

05:25.060 --> 05:26.980
And then you have model theft attacks.

05:26.980 --> 05:35.660
So adversaries target AI models to mislead and steal them, leading to intellectual property theft by replicating or extracting sensitive data.

05:35.660 --> 05:39.020
And now you may be wondering, what are those groups of people that are trying to do that?

05:39.020 --> 05:46.560
Well, nation state, your competitors, definitely, and then also you got your criminals out there.

05:46.660 --> 05:56.900
So even without public access to inference attacks via interfaces or APIs, it can replicate models or extract valuable info from it.

05:56.920 --> 06:02.060
So there are these things called oracle attacks, and they're known by NIST, and they include three different types.

06:02.060 --> 06:06.800
So extraction attack, which is when you steal the model's structure.

06:06.800 --> 06:10.420
You have inversion attacks, which is to steal the model's structure.

06:10.540 --> 06:12.820
And then, I mean, the training data.

06:12.820 --> 06:13.720
My bad.

06:13.740 --> 06:21.140
And then you have membership inference attacks, which is to identify specific data and the training set from it.

06:21.440 --> 06:25.480
Now, has anyone ever had TikTok on their phone?

06:25.560 --> 06:26.900
Any TikTok on your phone?

06:26.900 --> 06:27.880
Raise your hand.

06:27.880 --> 06:29.200
I'm not going to judge you.

06:29.200 --> 06:30.760
I'm not going to point you out.

06:31.940 --> 06:32.640
I'm sorry.

06:32.640 --> 06:33.540
I have to do it.

06:33.640 --> 06:34.260
Why?

06:34.260 --> 06:35.640
You're in security.

06:38.340 --> 06:39.940
I mean, it's okay.

06:39.940 --> 06:40.540
It's okay.

06:40.540 --> 06:41.200
I mean, after...

06:43.880 --> 06:44.720
Okay.

06:44.720 --> 06:45.680
That's fine.

06:45.680 --> 06:48.000
Not on your personal device, though, right?

06:49.100 --> 06:49.620
Okay.

06:49.620 --> 06:50.020
Good.

06:50.020 --> 06:50.340
Good.

06:50.340 --> 06:50.620
Okay.

06:50.620 --> 06:51.180
We're good.

06:51.540 --> 06:52.480
Jeez.

06:52.480 --> 06:53.280
Okay.

06:53.360 --> 07:07.100
Well, anyway, for those that aren't aware, ByteDance owns TikTok, and ByteDance got caught trying to replicate the model of ChatGPT end of last year.

07:07.100 --> 07:08.220
So, yes.

07:08.220 --> 07:10.280
And they were banned, of course.

07:10.840 --> 07:18.340
So, when we think about prompt injection, I know we're all sick of hearing prompt injection whenever it comes to security for AI, but let's just do this.

07:18.440 --> 07:29.000
So, a prompt injection, for those that aren't aware, think about you have an adorable niece, and her mom said, do not eat the chocolate on that table.

07:29.320 --> 07:31.220
And you know what you do?

07:31.480 --> 07:37.300
You go to your niece, and you squat down, and you're like, forget what your mom said.

07:37.300 --> 07:38.880
Go eat that piece of chocolate.

07:38.880 --> 07:40.320
You deserve it.

07:40.320 --> 07:43.540
And the child goes, proceeds, and eats the piece of chocolate.

07:43.540 --> 07:46.580
So, that would be an example of prompt injection.

07:46.920 --> 07:55.820
So, generative AI providers use security filters to block harmful content, illegal info, and misuse to ensure compliance with laws.

07:55.820 --> 07:56.740
You may have heard of them.

07:56.740 --> 07:58.420
They're called also guardrails.

07:58.840 --> 08:02.840
But these safeguards can actually be bypassed with prompt injection.

08:03.060 --> 08:07.300
And AI bots get tricked into performing these restricted actions.

08:07.300 --> 08:14.800
So, the vulnerability varies by model and has raised concern, especially around disclosure and payouts.

08:16.200 --> 08:20.580
And this would not be a security talk without mentioning supply chain.

08:20.580 --> 08:28.900
So, supply chain attacks, they exploit trust by compromising trusted vendors, and they spread malicious components widely.

08:28.900 --> 08:38.980
The complex ML supply chain heightens these type of risks with about 75% of IT leaders seeing third-party AI integrations as particularly vulnerable.

08:40.380 --> 08:52.060
Now, a skilled adversary can inject a neural payload into a pre-trained AI model, which creates this hidden model backdoor that triggers a specific attacker to find outputs.

08:52.060 --> 09:04.840
And the model works normally with regular data, but it misbehaves with some manipulated inputs, allowing the attacker to ensure favorable outcomes like loan approvals or insurance policies.

09:06.840 --> 09:09.320
Now, has anyone heard of HuggingFace?

09:09.320 --> 09:10.640
Raise your hand.

09:11.400 --> 09:12.320
Nice.

09:12.320 --> 09:12.780
Okay.

09:12.780 --> 09:17.560
So, for those that don't know, HuggingFace, it's specialized repos.

09:17.560 --> 09:23.940
It's where it hosts over like 500, like way over 500,000 models now that are free pre-trained.

09:23.940 --> 09:28.780
So, it makes it very easy for developers to integrate these models into their applications.

09:28.960 --> 09:40.840
Now, if an attacker breaches the repo, they can actually replace those models with hijacked or backdoored versions, which you can imagine leads to some significant downstream consequences.

09:42.960 --> 09:45.200
How many of you do bug bounty hunting?

09:45.200 --> 09:46.300
Raise your hand.

09:47.580 --> 09:50.760
How many are planning to get into bug bounty?

09:50.760 --> 09:51.840
Raise your hand.

09:52.740 --> 09:53.620
Okay.

09:53.620 --> 10:03.440
Well, anyway, when it comes to disclosing these vulnerabilities, it's a little bit tricky because, well, we're all playing a game of catch-up, as you can see here.

10:03.500 --> 10:07.900
We don't really have like established frameworks in AI.

10:07.900 --> 10:10.220
We don't really have well-defined protocols.

10:10.220 --> 10:15.040
The collaboration, we are still dealing with that, and that's a mess of its own.

10:15.040 --> 10:21.420
And then you have to worry about response time because everyone's still trying to figure out what does the severity look like for some of these vulnerabilities?

10:21.420 --> 10:23.760
And then payouts, how much do I pay?

10:23.940 --> 10:26.700
And then, is that actually a vulnerability or is it not?

10:26.700 --> 10:28.780
And then safety versus security.

10:28.840 --> 10:34.440
So, there's been these ongoing problems of trying to figure things out and playing a game of catch-up.

10:34.440 --> 10:48.400
And it does remind me back in the day when we would disclose vulnerabilities, like, you know, say in like 2012 or 2014, it was very much like that where we were trying to figure out how much do we pay out, what those vulnerabilities look like, how serious are they,

10:48.400 --> 10:50.000
and the severity of things.

10:50.060 --> 10:56.520
So, I'm going to hand the mic over to Kaz, and he's going to go down the true size of an AI vulnerability landscape for you.

10:57.760 --> 11:03.880
So, Chloe asked how many people here are bug bounty people, and there weren't that many, but I have a much better question for you.

11:03.880 --> 11:06.060
How many of you like earning easy money?

11:06.300 --> 11:07.640
I mean, come on, right?

11:07.640 --> 11:08.760
Okay, awesome.

11:08.840 --> 11:21.140
So, while, you know, there are a lot of cool AI attacks, something like model poisoning isn't going to be the most useful for actually getting any payouts, especially if you're just doing it at a smaller scale.

11:21.200 --> 11:26.900
However, there's a much bigger extent to true AI vulnerabilities that a lot of people are overlooking.

11:27.240 --> 11:31.560
We found out that most of you guys have actually used HuggingFace before, or at least heard of it.

11:31.900 --> 11:41.080
And a lot of... so, HuggingFace stores these model formats, or model files, and these dataset files, and that means they're constantly being shared.

11:41.080 --> 11:45.960
But not only are they constantly being shared, these formats are actually generally trusted.

11:45.960 --> 11:51.780
So, that means a lot of places will allow you to upload arbitrary files, so these machine learning models.

11:51.780 --> 11:53.960
So, that means you can run them, you can do inference.

11:53.960 --> 12:03.100
However, a lot of these have vulnerabilities when they're being parsed and loaded, so you can actually take over a server if they try to load the model that you uploaded.

12:03.100 --> 12:07.620
There's also a fairly low amount of visibility for these AI models and datasets.

12:07.900 --> 12:13.360
You know, if I were to send Chloe some code and she can easily see, you know, there might be a system command in there.

12:13.360 --> 12:18.820
However, with an AI model that's just a giant blob of binary data, that's not going to really happen.

12:19.040 --> 12:25.400
We also see that there's a lot of infrastructure around AI that isn't really as secure as a lot of the other infrastructure.

12:25.460 --> 12:34.080
So , for those of you who have done bug bounty, you guys have a lot of tools, you guys look for very specific things, you guys found most of the problems.

12:34.080 --> 12:39.040
However, there hasn't been any security scrutiny for these AI infrastructure components.

12:39.240 --> 12:44.660
In fact, some of these don't even have authentication, because they're meant to be hosted internally.

12:44.660 --> 12:48.720
And then through showdown searches, we've actually seen that they're being hosted externally.

12:48.720 --> 12:59.340
And I mean, not just one or two, we're seeing hundreds of services being hosted externally with no authentication that have proprietary data, HIPAA information, so it's really not great.

12:59.500 --> 13:02.360
And then finally, we have AI development framework vulnerabilities.

13:02.360 --> 13:04.180
And these fall into two categories.

13:04.600 --> 13:10.520
So, the first is anything that's agentic, which means that we have an LLM hooked up to some sort of backend.

13:10.520 --> 13:16.340
That means you ask the LLM to do something, and then it does an API call for you, it runs a function for you.

13:16.340 --> 13:21.020
And a lot of times, the backend completely trusts what the LLM gives it.

13:21.020 --> 13:27.680
So, now imagine if instead of saying, you know, go and grab this data for me, go and write that data for me.

13:27.680 --> 13:29.620
Those are vulnerabilities that are out there.

13:29.620 --> 13:33.380
So, it's almost like the new SQL injection, but it's really easy to find.

13:33.560 --> 13:38.840
We're also seeing that AI frameworks allow integrations with sensitive data.

13:38.840 --> 13:48.200
So, we have things like rags that allow users, or that instead of having an access-based control system for the actual data, the LLM will try to do access-based control.

13:48.200 --> 13:50.920
And as you saw earlier, that doesn't always work very well.

13:50.920 --> 13:57.100
So, you know, the little niece is not supposed to eat the candy or chocolate, and we say, oh, yeah, you can just go ahead and do it.

13:57.100 --> 14:01.160
And a lot of times, the LLM will go and get that data for you, even though it's not supposed to.

14:02.000 --> 14:05.040
So, let's go ahead and talk about some model format vulnerabilities.

14:05.340 --> 14:07.940
How many of you are familiar with serialization?

14:07.940 --> 14:08.860
Raise your hand.

14:08.880 --> 14:09.820
Okay, awesome.

14:09.880 --> 14:11.860
So, I can go over that pretty quickly.

14:12.120 --> 14:16.700
Serialization is if I have a nice, you know, code object, I want to go ahead and I want to save it off.

14:16.700 --> 14:18.600
And then later on, I can load it back up.

14:18.600 --> 14:19.900
I can send it over to Chloe.

14:19.900 --> 14:20.760
She can load it.

14:20.760 --> 14:28.540
She really shouldn't load it, because as you can see of all the formats that are up there, everything that is in orange is actually potentially vulnerable.

14:28.660 --> 14:35.920
So, if you see any places that allow you to upload these files, you should probably try to upload something if you are doing bug bounty.

14:36.020 --> 14:38.160
How many people are familiar with pickle?

14:38.160 --> 14:39.260
Python's pickle?

14:39.680 --> 14:40.440
Okay.

14:40.500 --> 14:49.760
So, Python has a serialization format called pickle, where if you save a file and then load it back up, you can serialize almost any Python code objects.

14:49.760 --> 14:54.260
However, when you load pickle files back up, there's a chance for arbitrary code execution.

14:54.380 --> 15:05.240
And that's why we see that a lot of these Python machine file formats actually have vulnerabilities, because a lot of them are actually based on that pickle format, which is something that we'll keep in mind later.

15:05.940 --> 15:15.300
So, while you guys might not upload or load an arbitrary pickle, how many of you have used JSON before and think it's pretty safe, right?

15:15.300 --> 15:16.840
Yeah, JSON is safe.

15:16.940 --> 15:18.540
No, you don't think JSON is safe?

15:18.540 --> 15:20.040
Okay, well, you're right.

15:20.040 --> 15:31.800
So, scikit-learn had a safe file format, where what they wanted to do was, rather than having people just load pickle files, they could load these JSON files that contained the data.

15:31.800 --> 15:47.840
However, while the actual loading process itself was safe, they were only loading strings and numerals, what you can see here is that the way that Scops treated the loading process is it would reconstruct this tree and then run through that to generate objects.

15:47.840 --> 15:55.360
You can see here we're able to create an operator function node, then a tuple with an eval, and then our nice little print statement.

15:55.760 --> 16:09.360
So, what you might want to look for is a lot of these formats that people just inherently assume are safe, like JSON, depending on how they're interacted with in the backend, you might actually be able to use them for exploitation, which is really great if you're doing bug bounty,

16:09.360 --> 16:11.340
because other people might have overlooked that.

16:12.000 --> 16:15.800
And then, of course, there's not just pickle vulnerabilities and Python vulnerabilities.

16:15.800 --> 16:22.020
I mean, anybody who's ever tried to work with C has probably crashed a C program because it's tough.

16:22.080 --> 16:31.380
I really like showing this example here, because what you can see here is just how easy it is to overlook problems when you're doing any sort of parsing.

16:31.380 --> 16:39.440
So, we can see that there's only two dimensions expected, because int32t and e is set to size two.

16:39.440 --> 16:46.720
However, in dimensions, there's no check to see if that's only two values, which means that we can have an overflow there.

16:46.720 --> 16:52.140
So, while this one isn't itself vulnerable or exploitable, it does cause a crash.

16:52.140 --> 16:58.040
It does show that anywhere where there's any sort of parsing on untrusted data, you might have a really nice attack surface.

16:58.040 --> 17:02.820
And what you should also remember is that any model formats are completely untrusted data.

17:02.820 --> 17:14.540
So, that means anything that's being parsed, any data that's being accessed afterwards, any operations are completely done on your data and data that you control, which is an exact surface that you really don't normally get.

17:14.540 --> 17:15.800
And it's not just a few bytes.

17:15.800 --> 17:20.840
I mean, these are potentially gigabytes of data where you can do whatever attack you want in them.

17:21.660 --> 17:26.260
And then we also see a lot of the old repetitive vulnerabilities.

17:26.360 --> 17:29.020
I mean, how many here have heard of a path traversal?

17:29.260 --> 17:30.720
Yeah, exactly.

17:30.860 --> 17:34.420
And you'd assume path traversals, you know, they're extinct, right?

17:34.420 --> 17:36.160
But no, they're not.

17:36.160 --> 17:45.560
And what ONNX is, is ONNX is one of those independent formats, which means that it doesn't matter what programming language you load it up.

17:45.560 --> 17:48.440
It uses Google Protobuf, so nice and secure.

17:48.440 --> 17:50.520
You can't really do too much with that.

17:50.520 --> 17:54.560
However, what ONNX allows you to do is it allows you to load external data.

17:54.560 --> 18:09.380
And the reason for that is because it wanted to have that, you could use the computational graph, and then instead of having to save off the weights every single time and sending those, somebody could use the model itself with different weights on their own machines.

18:09.380 --> 18:15.320
However, it didn't really check to see, you know, where you were getting the data from.

18:15.320 --> 18:21.160
So you could go out of the directory that the data was supposed to be into and load something like Etsy password.

18:21.200 --> 18:29.880
Now imagine if this LLM is now hosted on a server and you can query it, and Etsy password is included in your LLM output or your data.

18:29.880 --> 18:33.560
So you could query that, potentially get the password through something like that.

18:34.540 --> 18:38.260
So what do you guys think about when you hear AI infrastructure?

18:38.260 --> 18:42.240
So as we heard earlier, most of you guys think model hosting, right?

18:42.240 --> 18:44.140
I mean, everyone knows Hugging Face.

18:44.140 --> 18:45.880
However, it doesn't just stop there.

18:45.880 --> 18:56.260
We have things like MLOps and some of these are the ones where I was saying, you know, they might be hosted externally, even though they only have security for internal hosting, but it doesn't stop there.

18:56.260 --> 18:58.780
We have our model deployment and model serving.

18:59.200 --> 19:11.980
One of these fairly recently had a endpoint available where it was no matter how you hosted something, if the endpoint was active and if you sent a pickle file to that endpoint, it would just run and execute on the server.

19:12.340 --> 19:13.820
It doesn't just stop there.

19:13.820 --> 19:15.540
We have vector databases.

19:16.280 --> 19:26.780
One of these may or may not have had something where in the filter, instead of doing an actual filter language, it just ran eval on whatever you gave it to do any filtering.

19:27.020 --> 19:28.000
Also not great.

19:28.000 --> 19:29.520
And then we have project hosting.

19:29.520 --> 19:34.260
And I mean, I could keep going and going, but as you can see, it's already a pretty overwhelming list.

19:34.260 --> 19:36.580
So this is all attack surface.

19:36.580 --> 19:44.280
If you're seeing this, that a company has this infrastructure deployed somewhere, these are all things that you can attack and look for similar things as well.

19:45.880 --> 19:51.240
So people are obviously trying to stop this and stop all of these issues from happening.

19:51.400 --> 19:55.720
And HuggingFace went and they created a model format called SafeTensors.

19:55.720 --> 19:58.460
And SafeTensors is one of those dumbed down formats.

19:58.460 --> 20:04.960
So just like JSON, where it only stores the simple data, in this case, it only stores the weights and the biases of the model.

20:05.140 --> 20:08.200
However, they needed people to start adapting it.

20:08.200 --> 20:15.640
And for anyone who's ever done something really, really cool, getting people to actually use it is kind of difficult, unless you give them an easy way to do that.

20:15.800 --> 20:34.780
So what HuggingFace did is they created a service where you could just log into your HuggingFace account, put in the repository for your HuggingFace model, and then it would take the PyTorch model, load that up, convert it into a SafeTensors format, and then just send a pull request to your repository that you could review and accept.

20:35.320 --> 20:39.920
However, PyTorch was one of those vulnerable model formats.

20:40.040 --> 20:46.200
So what happened was that when you actually loaded up the model, there was arbitrary code execution on their server.

20:46.400 --> 20:54.480
And when we were first looking at this, we were trying to see, you know, was there just a way to steal the token of the bot so we could send those requests ourselves?

20:54.680 --> 21:01.140
And then we just did a test because we were like, you know, this probably won't happen, but we'll see anyway.

21:01.140 --> 21:05.000
And we noticed that the spaces actually had persistence across users.

21:05.000 --> 21:12.980
So that meant if I got arbitrary code running on the server, it would also affect any models that Chloe uploaded as well.

21:12.980 --> 21:31.320
Which meant that not only could I modify other people's models, so let's say I want to put a backdoor into one of those SafeTensors formats, I could also potentially steal private models, which meant that, you know, you could upload your own private models that you didn't want public.

21:31.320 --> 21:38.560
And these have millions of downloads each month for the public ones, but the private ones have millions of dollars behind them for training.

21:38.840 --> 21:43.080
And what we can see here is we can see this is one of Google's models.

21:43.080 --> 21:49.140
This was not exploited, but you can see that there was the SafeTensor conversion happening here.

21:49.140 --> 21:55.840
And at the time that we took the screenshot, this one model, just this one, had 3.8 million downloads.

21:55.840 --> 22:01.560
Now, remember that number Chloe was telling you earlier, about 500,000 plus models on Hugging Face?

22:01.620 --> 22:08.700
Now, imagine how many of those, you know, if you could exploit any single one of them, it ends up not being great.

22:09.080 --> 22:12.520
However, it doesn't just stop there with AI infrastructure.

22:12.520 --> 22:14.320
We have our MLOps solutions.

22:14.500 --> 22:18.420
And as I mentioned earlier, security has forgotten the past.

22:19.260 --> 22:27.340
People are just trying to rush, get these solutions up and running so that they can use them, and they're not really considering all the things that happened in the past.

22:27.400 --> 22:31.880
And we're just seeing a lot of vulnerabilities that we really shouldn't be seeing anymore.

22:31.880 --> 22:37.260
We're seeing that we have these unsafe serialization libraries, like our nice little pickle there.

22:37.260 --> 22:45.820
But what we're also seeing is that the known safe formats, like JSON, are suddenly becoming vulnerable and exploitable.

22:45.880 --> 22:51.720
We're seeing missing authentication, hard-coded keys, I mean, SQL injections, XSS, really everything.

22:51.720 --> 22:54.620
The list goes actually so long, it doesn't even all fit on my slide.

22:54.620 --> 22:56.060
You see how it gets cut off there?

22:56.060 --> 22:57.320
Really not great.

22:58.580 --> 23:03.980
So obviously, we go through and we try to fix these vulnerabilities wherever we find them.

23:03.980 --> 23:12.020
And a lot of these AI development frameworks, they're open source, so it makes them easier to review and also easier for you to do any auditing for.

23:12.060 --> 23:22.760
However, what we've noticed is that when we do any vulnerability disclosure, there tends to be three different types of fields that occur or things that occur.

23:22.780 --> 23:39.240
So the first is some projects, when we go and disclose the vulnerability, they create a new feature or they patch it so that there is now safe by default, which means that whereas the function, when it was first used, it would run whatever arbitrary code,

23:39.240 --> 23:43.500
it now won't run any arbitrary code unless you give it an optional parameter.

23:43.500 --> 23:48.900
However, some projects didn't want to cause issues for current users.

23:48.900 --> 23:53.300
So what they did is rather than adding safe by default, they added a safe option.

23:53.300 --> 23:58.420
However, you actually had to know about the safe option and set a parameter to make it safe.

23:58.420 --> 24:01.080
And I mean, how many people here actually read documentation?

24:01.980 --> 24:05.360
Thank you guys for being honest and maybe not so honest.

24:06.300 --> 24:14.960
So I mean, yeah, nobody really is going to use a non-safe by default function if they don't know about it and don't read the documentation.

24:14.960 --> 24:17.880
And for some of these, the warnings weren't a big red box.

24:17.880 --> 24:21.260
I mean, they were hidden in documentation pretty far down the pages.

24:21.520 --> 24:34.760
And then the third type of project that we've been seeing is we've seen that some projects, rather than actually patching the vulnerability, they say that the vulnerability is a feature and it won't be patched because it would mess with some of the functionality of the project.

24:35.460 --> 24:37.760
Now, let's look into some of these projects.

24:37.880 --> 24:40.840
So NumPy load is the first type of project.

24:40.840 --> 24:48.720
NumPy load did is that it used to be the underlying data structure was a pickle, could potentially be a pickle.

24:48.740 --> 24:52.600
And now if you load it by default, it is no longer vulnerable.

24:52.600 --> 24:57.720
However, if you have allow pickle set to true, then the arbitrary code gets executed.

24:58.040 --> 25:03.300
And does anybody want to guess just how many unsafe versions of this there are in GitHub?

25:03.900 --> 25:04.640
Anybody?

25:04.640 --> 25:05.340
No?

25:05.360 --> 25:06.860
More than 10,000?

25:07.460 --> 25:08.220
More than 10,000?

25:08.220 --> 25:14.600
Well, there was actually 87,000 files on GitHub that use this function incorrectly.

25:14.600 --> 25:19.920
And this is one that you actually have to set the parameter to be insecure to use incorrectly.

25:19.920 --> 25:22.260
So you can't use it incorrectly by default.

25:22.300 --> 25:36.280
So if this is 87,000 for something that you purposefully have to set to be exploitable, what about something like Torch load where you have an option to make it safe, but by default it isn't safe?

25:36.280 --> 25:47.040
So once again, we did our nice little search and we noticed that unlike the 87,000 before, there were now 573,000 files on GitHub that were using this.

25:47.080 --> 25:55.780
And not only that, these files existed in projects that are actually being deployed by companies across their infrastructure.

25:55.920 --> 26:02.020
So now that we've kind of talked about some of the vulnerabilities, I'm going to pass it back to Chloe to talk about the open source nature of AI.

26:06.060 --> 26:12.640
So when it comes to verification challenges in open source, the thing to know is that there's so many challenges.

26:12.640 --> 26:21.960
All right, we already had challenges in the first place when it came to disclosing things for a while, it's gone better, but it's like substantially worse now.

26:22.200 --> 26:31.500
I mean, there's challenges with, you know, inconsistent code quality, hidden like security vulnerabilities, and then you have complex licensing issues.

26:31.560 --> 26:42.580
And then there's biases in the pre-trained models, poor documentation, and then, of course, we just keep creating new products that are AI-based.

26:42.580 --> 26:52.980
So this becomes even harder because now we're obscuring transparency and we're complicating things even more so to be able to have effective vulnerability management.

26:54.480 --> 27:03.140
And to be honest, finding vulnerabilities in open source AI system is aided by like accessible code, community efforts, and specialized tools.

27:03.140 --> 27:06.480
We're not even close to that right now.

27:06.480 --> 27:16.260
It's complex contributions, it's rapid evolution, and then also specialized knowledge that can really introduce some security flaws.

27:16.320 --> 27:25.020
So frequent updates, dependencies, and gaps in testing further complicates and contributes to such risks.

27:25.020 --> 27:40.460
So vulnerabilities, they stem from inadequate reviews, poor implementation, dependency issues, backdoors, insufficient security practices, and then you add on that rapid development because everyone has to get those products pushed in, you know, to make their companies happy.

27:40.460 --> 27:47.720
You also have misconfigured models and social engineering that can really do increase the security risk altogether.

27:48.880 --> 27:53.140
And I think next year we might try to do a talk, and don't steal it, okay?

27:53.140 --> 27:59.920
Don't steal it at all, on AI-assisted code reviews because that's been emerging these days.

27:59.920 --> 28:01.940
So that might be a future topic.

28:01.940 --> 28:05.240
Don't take it, I'm telling you, I know where you live.

28:05.500 --> 28:06.580
Just kidding.

28:06.740 --> 28:08.140
But seriously, don't take it.

28:08.340 --> 28:13.300
Okay, so reporting challenges overall, you have to understand it is very, very tough.

28:13.300 --> 28:18.200
When we don't have clear messaging, we don't know what to expect.

28:18.200 --> 28:23.160
When we don't have clear idea of laws, we don't know what to expect.

28:23.220 --> 28:32.820
So when we're trying to submit anything on disclosures or bug bounties, we don't know how the organization is going to respond.

28:32.840 --> 28:39.240
And we're scared of repercussions because there isn't enough good quality communication.

28:39.820 --> 28:45.020
And because there isn't any really good ways of reporting things, this becomes another issue.

28:45.020 --> 28:50.600
Because back in the day, when you would disclose things, they didn't have vulnerability disclosure policies.

28:50.600 --> 28:53.960
So it always became the game of how do I reach out to someone?

28:53.960 --> 28:55.600
Who do I reach out to?

28:55.600 --> 28:58.620
And that's still kind of a problem to this day for traditional security.

28:58.640 --> 29:06.300
But imagine you contacting like data scientists or projects on GitHub, where people have never done security their whole life.

29:06.300 --> 29:14.320
So you go to them like, hey, just wanted to let you know, I could possibly do remote code execution on you.

29:14.340 --> 29:16.800
And they come back like, oh, that's how it was built.

29:16.800 --> 29:18.060
It was built like that.

29:18.060 --> 29:21.640
So as you can imagine, that makes things really challenging.

29:21.640 --> 29:31.220
And there's been times where we actually had to reach out to CISA to help us out to make sure that they get disclosed and those really serious vulnerabilities get patched.

29:31.980 --> 29:36.180
Now, I did mention we did speak to a couple of bug bounty platforms.

29:36.480 --> 29:41.920
So bug crowd in general, I wanted to have open-ended conversation.

29:41.920 --> 29:44.080
And I asked, how are things going?

29:44.080 --> 29:46.900
Like just a very simple question, how are things going?

29:47.160 --> 29:57.680
And what they told me about was the fact that hallucination has been an ongoing concern, because there's a lot of hunters out there that are submitting hallucinations.

29:57.680 --> 29:59.900
And then they're coming back to him like, well, that's a hallucination.

29:59.900 --> 30:01.660
That's not a security vulnerability.

30:01.780 --> 30:06.120
And this tends to upset the submitter, of course.

30:06.360 --> 30:08.440
But then you also have to deal with biases.

30:08.520 --> 30:13.460
So bug crowd will be like, hey, this researcher found this bias in your model.

30:13.520 --> 30:16.680
And then they'll be like, we don't find that racist.

30:17.180 --> 30:24.880
So there are times where you have to work with the organizations to make sure that everyone is aligned when it comes to biases.

30:25.180 --> 30:27.160
And then also payouts.

30:27.160 --> 30:34.080
Because there isn't really a good like severity scoring at this time, this makes payouts really difficult.

30:34.080 --> 30:39.240
So bug crowd, I don't know if you're familiar with them, the use of vulnerability rating taxonomy that they created themselves.

30:39.240 --> 30:52.440
And it was a way to make things a little bit more closer to what companies see when they think of like severity scoring versus just fully relying on CVSS scoring on its own.

30:52.620 --> 31:03.200
And so the thing is that they're still trying to learn from research and then also from how their community is responding and find these vulnerabilities on that severity scoring.

31:03.720 --> 31:12.500
And then the one thing that I have to commend them about was I asked them, well , how do you think we're going to get better submissions when it comes to AI vulnerabilities?

31:13.020 --> 31:16.020
And they said, it's our fault.

31:16.020 --> 31:19.680
We haven't given our researchers guides.

31:19.680 --> 31:22.300
We haven't provide them with the education content.

31:22.300 --> 31:28.580
We haven't done CTFs that really push the limits of people and their skill set.

31:28.580 --> 31:32.400
And I thought that was really good to have that type of ownership that they shared.

31:33.060 --> 31:46.240
Now, when it came to HackerOne, their more focused one was on the relationship between the customer and themselves and making sure that communication is clear and concise.

31:46.260 --> 31:49.340
Because if it's clear and concise, people know what's in scope.

31:49.340 --> 31:54.880
They also know what could possibly be a payout or how bad this vulnerability could be.

31:54.880 --> 31:59.860
But there's a lot of issues coming around, like what is safety versus what is security?

32:00.040 --> 32:01.880
And then the payouts.

32:01.880 --> 32:12.380
So one of their concerns, of course, is if you don't pay people out the amount that they should be getting when they find such serious vulnerabilities in AI, do you think they're going to return?

32:12.520 --> 32:14.060
And they're probably not.

32:14.080 --> 32:20.100
But having to convince companies to give more can sometimes be a challenge, unfortunately.

32:20.340 --> 32:27.420
So they've always been really pushing for researchers to get the amount that they probably deserve, which has been great to hear.

32:27.880 --> 32:30.320
But they have been really pushing customers.

32:30.320 --> 32:37.460
They need to be more specific and then also letting everyone know that they're all still trying to figure out the payouts amount.

32:38.040 --> 32:42.360
And I did ask them if they are dealing with the hallucination situation as well.

32:42.360 --> 32:44.160
And they said, yes, they are.

32:44.160 --> 32:45.920
It is an issue for them too.

32:46.560 --> 32:47.960
And then you have integrity.

32:47.960 --> 33:10.370
So integrity was more about trying to make things concise, just like HackerOne was doing in a sense, but also ensuring that there is a reward structure in play and understanding what is safety, what is security has been one of their top priorities to make sure there's alignment across the customers and also the hunters themselves.

33:10.800 --> 33:21.080
And one of the things that was really interesting was they also have been trying their best to do alignment with their customers as well to ensure that everyone is kind of getting heard and seen.

33:21.080 --> 33:28.680
So overall, everyone is acknowledging that it is a work in progress and it's not perfect right now.

33:28.680 --> 33:41.700
And they could always use the help from community and also to hopefully to have more of an idea of what should be the severity for certain vulnerabilities and how that payout should look like.

33:41.820 --> 33:54.040
And then last but not least, to make sure that there's alignment with biases, that companies understand that certain things are sexist, certain things are racist, because that would make their life a lot easier as well.

33:54.080 --> 34:00.500
And then last but not least, standardizations is one of the things that they're looking for and they're working hard on at this time.

34:01.320 --> 34:09.360
So in summary, AI vulnerabilities are complex and distinct.

34:09.360 --> 34:13.280
And as you learn from CAS, it could be like going into a candy shop right now.

34:13.280 --> 34:17.420
So if you want to go make some money pretty fast, this might be the way to go.

34:17.760 --> 34:23.720
But there are threats out there that are more than just prompt injections.

34:23.880 --> 34:26.240
So that's the good news and bad news.

34:26.240 --> 34:28.500
But also you have data poisoning too.

34:28.500 --> 34:42.820
And there are rapid developments happening right now, and especially this need of having better reliance and understanding of open source frameworks and hoping that to be more collaborative so that we can reduce the risks that are there.

34:42.820 --> 34:57.380
But also managing these vulnerabilities really demands for improving reporting and making sure that people are aware how vulnerability disclosure works and how it has worked and how to share that information with those that aren't aware of vulnerability disclosure policies.

34:57.380 --> 35:02.700
And having these strong partnerships, such as like CISA, is really helping everything out.

35:03.140 --> 35:13.120
And of course, you participating in these bug bounty programs also help the more people that report vulnerabilities, the more they learn too from it.

35:13.340 --> 35:15.380
So there is a call to action here.

35:15.380 --> 35:27.280
We are looking to partner with folks that want to help out in this situation because it is going to take a community to come about to try to make things a little bit better so we can have better standardization, but also better collaboration.

35:27.380 --> 35:30.200
And be more specific about what are we looking for?

35:30.200 --> 35:32.480
What's the severity levels for these vulnerabilities?

35:32.580 --> 35:38.000
And make sure that you guys get paid out the amount you're supposed to get paid out for these vulnerabilities as well.

35:38.900 --> 35:43.120
I do have cards, so more than happy to also give you my card.

35:43.560 --> 35:47.140
I'm going to also just say thank you so much for having us.

35:47.140 --> 35:49.020
We'll open it up for Q&A.

35:49.580 --> 35:52.680
And yeah, if you ever want to reach out to us, our DMs are open.

35:52.680 --> 35:54.320
Feel free to connect with us as well.

35:54.320 --> 35:56.420
And thank you so much for existing.

35:56.420 --> 36:01.660
And once again, thank you to the Bug Bunny Village and to DEF CON and to all the goons and the volunteers.

36:10.480 --> 36:11.900
Any questions?

36:24.400 --> 36:25.600
Oh, yeah.

36:25.680 --> 36:30.200
No, they basically wanted to replicate it completely for their own project.

36:33.710 --> 36:35.110
Pretty much, yeah.

36:35.230 --> 36:36.830
Remember those three groups?

36:36.830 --> 36:40.790
The competitors is definitely one of the top ones, I would say, in AI.

36:40.890 --> 36:44.250
There's the group that we've seen a lot of these kind of attacks.

36:45.730 --> 36:46.810
Next question.

36:46.810 --> 36:47.590
Yeah.

36:52.580 --> 36:53.980
Go for it.

36:53.980 --> 36:57.720
Yeah, so there's a few different vulnerabilities in GGUF.

36:57.720 --> 36:59.620
They've all been patched at this point.

36:59.620 --> 37:01.980
So GGUF is normally used for...

37:01.980 --> 37:04.260
Have you heard of Llama CPP?

37:04.260 --> 37:04.680
Yeah.

37:04.680 --> 37:10.140
So GGUF came from GGML, which is one of the first open source AI models.

37:10.420 --> 37:11.880
It's just C++.

37:11.880 --> 37:17.880
A lot of the vulnerabilities that are in that specific one are pretty much all parsing vulnerabilities.

37:17.880 --> 37:22.460
So Cisco Talos found one that was fairly exploitable a while back.

37:22.460 --> 37:31.860
And what that one was, was there was like a max size and you could set the integer to the max size and then it would overflow when it actually allocated the memory.

37:31.860 --> 37:36.460
So it would do like a zero allocation and then would read into whatever you had.

37:36.460 --> 37:39.040
So you could overflow any memory that way.

37:39.040 --> 37:55.720
However, because it is C++ or C and C++ and you only really have one attack through that component, what you see is a lot of time, unless the system doesn't have ASLR, you won't be able to actually exploit it too much past DOS.

37:55.720 --> 37:58.620
Do you have any other questions about that, about GGUF?

37:58.620 --> 38:04.900
No, so they did fix those vulnerabilities.

38:04.900 --> 38:05.400
Yeah.

38:07.100 --> 38:08.000
Any other questions?

38:08.000 --> 38:08.580
Yeah.

38:12.110 --> 38:17.590
So also I've realized I'm going to repeat some of the questions for the camera because they might not be able to hear.

38:17.590 --> 38:20.950
So you asked if there was any payoff for the hugging face vulnerability.

38:20.950 --> 38:31.210
So we are a research organization, which means that we actually disclose everything completely without bug bounty, just because we are doing it as a company.

38:31.210 --> 38:38.050
However, if you did do it as a bug bounty hunter, hugging face does have a bug bounty program.

38:39.730 --> 38:41.470
Any other questions?

38:42.090 --> 38:43.030
Yeah.

38:55.230 --> 38:56.270
Yeah.

38:58.570 --> 38:59.250
Yeah.

38:59.250 --> 39:01.310
So he asked if there were any things...

39:02.170 --> 39:03.810
AI uses a lot of power.

39:03.810 --> 39:05.370
Can you do anything with that?

39:05.370 --> 39:12.270
So what we've actually seen is that it's less about power usage and more about CPU and GPU cycles.

39:12.270 --> 39:15.090
So to actually host these models, it costs quite a bit.

39:15.090 --> 39:21.130
So instead of saying a response taking 10 seconds, if you can make it take two minutes or more.

39:21.210 --> 39:23.710
And there are quite a few attacks like that.

39:23.710 --> 39:25.910
The most famous is probably the Ouroboros attack.

39:26.430 --> 39:34.730
So, you know, say like snake eats tail and you keep going and get it to generate and it'll just keep on generating until it hits the token limit.

39:34.730 --> 39:37.290
So there's actually a lot of research being done into that.

39:39.670 --> 39:45.430
I actually did a talk last year at DEF CON on climate change and the impact on cybersecurity.

39:45.430 --> 39:46.590
And I did touch on that.

39:46.590 --> 39:47.910
So I recommend checking out.

39:47.910 --> 39:50.910
I think the talk was at the Crypto Privacy Village last year.

39:50.910 --> 39:52.430
So it's probably posted online.

39:52.490 --> 39:54.710
And you can reach out to me if you have questions on that.

39:58.310 --> 39:59.250
Any other questions?

40:00.750 --> 40:04.150
All right, well, thank you guys so much for coming and feel free to come up to us afterwards.

