[00:00.000 --> 00:06.980] All right. Now that I have gone through and deafened everybody in this stage area, I am [00:06.980 --> 00:10.680] incredibly sorry for that again. Please, again, we've got some seats over here on the side. [00:10.680 --> 00:15.580] We can't have people standing in this area over here. It unfortunately just does not work [00:15.580 --> 00:20.440] for us. I would like to welcome to the stage Chloe and Casimir. [00:27.200 --> 00:33.000] Thank you all for being here today, and thank you DEF CON for, I mean, AppSecVillage for [00:33.000 --> 00:36.500] having us. It's great to be here. Can you all hear me okay? [00:38.780 --> 00:48.340] Like this? Wow. Okay. Up and close and personal. All right. So, welcome to I've Got 9-9 Problems [00:48.340 --> 00:54.020] But a Prompt Injection Ain't Watermelon. So, let's talk a little bit about who we are before [00:54.020 --> 01:03.560] we dive into the gritty of things. Let's forget that mic. Okay. My name is Chloe Mastagi and [01:03.560 --> 01:08.620] I'm the head of threat intelligence over at Hidden Layer. And with me, I'm going to pass the [01:08.620 --> 01:10.640] mic over to my co-speaker. [01:11.040 --> 01:15.620] Hi, I'm Casimir. I'm a security researcher over at Hidden Layer as well. Thanks for coming to [01:15.620 --> 01:16.380] our talk. [01:17.380 --> 01:22.940] All right. So, we're going to run through some things today. First, we're going to go into [01:22.940 --> 01:27.300] some of the AI vulnerabilities that are out there. You know, we never know what people's [01:27.300 --> 01:31.500] backgrounds are. So, we want to make sure that we're all on the same page before we dive into [01:31.500 --> 01:35.500] the gritty things. So, if we're going to do that, then we're going to do some public [01:35.500 --> 01:40.620] perceptions as well. And then go down, what does this landscape look like? And then the open [01:40.620 --> 01:47.640] source nature of AI. And of course, we got to talk about reporting challenges. So, let's [01:47.640 --> 01:52.100] dive into what public perception of AI vulnerabilities are. Pretty much everything's on [01:52.100 --> 02:00.820] fire, right? Like, end of the world, Terminator, all that. But the thing is, is that there's a [02:00.820 --> 02:06.440] lot of misinformation, disinformation out there about security for AI, even within our own [02:06.440 --> 02:13.180] industry and even within maybe at DEF CON as well. And so, we wanted to make sure that we [02:13.180 --> 02:18.080] fixed this problem. And yes, this was a generated AI image here. So, yes, we know how to [02:18.080 --> 02:25.200] spell. But maybe chat GPT doesn't. Anyway. So, let's go down the rapid hole of AI [02:25.200 --> 02:32.400] vulnerabilities. But first, understand the difference between an AI model versus an AI [02:32.400 --> 02:38.240] system. So, functionality, the AI model handles data processing and decision making, [02:38.240 --> 02:42.800] whereas an AI system ensures the model can be effectively used in the real world [02:42.800 --> 02:48.900] application, including data management, user interaction, and system maintenance. Now, the [02:48.900 --> 02:53.620] components are also different here. So, an AI model consists of algorithms and learn [02:53.620 --> 02:58.740] parameters, while an AI system includes the model plus additional components like data [02:58.740 --> 03:04.920] pipelines, and deployment environments and user interfaces. So, we're going to go through each [03:04.920 --> 03:09.320] one of these categories here. So, first, we're going to talk about the attacks against the AI [03:09.320 --> 03:15.200] algorithms. We get to go down the fun parts of data poisoning and model invasion and model [03:15.200 --> 03:19.060] theft. Well, of course, we have to talk about prompt injection, because that's all you hear [03:19.060 --> 03:24.600] about, right? And then I'm going to pass the mic over to Kaz to go into the areas where you see [03:24.600 --> 03:32.400] it's like a burnt orange right there. So, data poisoning attacks. So, model training is crucial [03:32.400 --> 03:39.020] for AI development, but it is vulnerable to data poisoning. And this is when malicious actions [03:39.020 --> 03:44.940] manipulate or inject doctorate data to bias the model's behavior. Continuous learning systems are [03:44.940 --> 03:52.100] especially at risk, as they retrain on unvalidated and user-supplied data. Even small amounts of [03:52.100 --> 03:57.000] poisoned data can actually lead to a bias or incorrect predictions, amplified by the public [03:57.000 --> 04:05.420] manipulation or botnets. And one of those famous cases was Tay. Who here remembers Tay? It was [04:05.420 --> 04:11.260] so innocent. It was such an instant chat bot. It was like, hello, world, how are you? And within, [04:11.260 --> 04:16.940] like, I think it was 16 hours, it became the most rude, racist, sexist thing out there. Thank you, [04:16.940 --> 04:24.500] trolls. Anyway, this is one of those examples of data poisoning. It did cause problems for [04:24.500 --> 04:30.820] Microsoft, by the way. It did have to deal with threats of legal action. So, something to think [04:30.820 --> 04:36.420] about. Then you have your model evasion attacks. These ones are kind of my favorite ones to study. [04:36.560 --> 04:41.980] So, inference attacks exploit AI models by curing them to extract sensitive information, [04:41.980 --> 04:48.300] often using slightly varied inputs to reconstruct the model, leading to potential model theft or [04:48.300 --> 04:56.820] bypass. Now, evasion attacks, a type of bypass, use subtle, not even visible to the human eye, [04:56.820 --> 05:03.140] changes to inputs, like adding invisible noise, to trick the model into misclassifications. [05:03.640 --> 05:08.820] And these techniques have a long been used by attackers. This is also to bypass systems like [05:08.820 --> 05:16.540] spam filters or malware detection and biometric authentication. But I want you to imagine you're [05:16.540 --> 05:21.700] in a self-driving car. And while you're in the self-driving car... Wait, hold on before I do that. [05:21.700 --> 05:27.560] How many people have been in a self-driving car? All right, cool. Now, imagine you're in a self-driving [05:27.560 --> 05:33.220] car, for those that haven't been in one. I'm with you. I haven't either. So, you're in this car. [05:33.260 --> 05:39.640] You get to the stop sign. But instead, your car does something very strange. It does something [05:39.640 --> 05:47.680] like slide to the left, slide to the right. Take it back, y'all. One hop this time. Right foot, [05:47.680 --> 05:54.060] let's stop. Left foot, let's stop. Cha-cha, real smooth. Now, imagine your car did that because it [05:54.060 --> 06:01.820] saw a stop sign that looked like that, where there was stickers on it, which then made your car do [06:02.560 --> 06:07.860] a cha-cha slide. I don't know how that would really look, to be honest, but we're all using [06:07.860 --> 06:13.420] our imagination at this point. But in real life, that actually happened, not the cha-cha slide part, [06:13.420 --> 06:19.820] but it actually, a self-driving car, went past the stop sign because there were stickers on the sign. [06:21.400 --> 06:27.580] Another good case of a model evasion attack is Russia painting fake bomber jets on the ground [06:27.580 --> 06:33.220] to hide them from Ukrainian drones. And you can also see this type of model evasion attacks by [06:33.220 --> 06:39.580] wearing certain sunglasses that are modified or even, you know, as we've already seen with [06:39.580 --> 06:45.980] military systems as well. And yeah, those definitely pose some serious security risks. [06:46.640 --> 06:53.220] Now, model theft attacks. So, adversaries tend to target AI models to mislead them and steal them, [06:53.220 --> 06:58.900] leading to intellectual property theft by replicating or extractive data. Now, to know [06:58.900 --> 07:02.680] the three people that, well, three groups of people that tend to do this type of stuff, [07:02.680 --> 07:08.620] our nation states, of course. Your competitors is one of the, definitely one of them. And then [07:08.620 --> 07:15.720] you've got your attackers. So, even without public access, inference attacks via interfaces or APIs [07:15.720 --> 07:22.280] can actually replicate models or extract viable information. So, Oracle attacks, as noted by NIST, [07:22.280 --> 07:27.500] include three different types. You have extraction attacks, which is to steal the model structure. [07:27.500 --> 07:31.960] Then you have your inversion attacks, which is to reconstruct the training data. And then you [07:31.960 --> 07:38.400] have your membership inference attacks, which is identify if specific data was in the training set. [07:39.140 --> 07:46.440] And one of my favorite cases is with ByteDance. How many of you guys have TikTok on your phone? [07:47.480 --> 07:55.420] Okay. You're in security. What? Why? Why? Maybe after this weekend, you're going to realize [07:55.420 --> 08:01.640] maybe I shouldn't have this on there anymore. Anyway, well, ByteDance, as we all know, [08:01.640 --> 08:08.620] owns TikTok. Well, TikTok got caught doing something they should have not done. Basically, [08:08.620 --> 08:14.940] trying to replicate the model of chat GPT. Yes, they did get suspended. Open AI did catch them. [08:14.940 --> 08:22.800] This happened last year. Now, when it comes to prompt injection, how many people here have [08:22.800 --> 08:29.700] heard this term quite often now? Now, I know you're probably sick of hearing prompt injection, [08:29.700 --> 08:34.800] I don't blame you. But for those that don't know what a prompt injection is, I want you to imagine [08:34.800 --> 08:42.740] you're at a Thanksgiving meal, okay? And you're with your niece, and your niece is so adorable [08:42.740 --> 08:49.480] and cute. Well, her mom told her, do not eat the chocolate on that table. And you know what you do? [08:49.600 --> 08:58.140] Come here. Ignore your mom's words. Go eat that piece of chocolate. That would be a prompt [08:58.140 --> 09:05.640] injection. So, Gen AI providers use security filters to block harmful content. Illegal info [09:05.640 --> 09:11.640] and misuse and ensuring compliance with laws. These are also maybe known as guardrails. [09:11.820 --> 09:17.500] But these safeguards can actually be bypassed with prompt injection, which does trick the AI [09:17.500 --> 09:23.260] bots into performing restricted actions. And this vulnerability rate, like, basically varies [09:23.260 --> 09:29.080] by models and has raised some serious concerns, especially around disclosure and payouts. [09:30.760 --> 09:34.640] And then you have your supply chain attacks. This wouldn't be a security talk unless I brought up [09:34.640 --> 09:41.520] supply chain attacks. So, like SolarWinds breach, I know, I feel you. If you went through there, [09:41.520 --> 09:46.420] that was hard. But basically, supply chain attacks, they tend to exploit trust by [09:46.420 --> 09:52.840] compromising trusted vendors, spreading malicious components, widely. And the complex ML supply [09:52.840 --> 09:58.660] chain heightens these risks. With 75% of IT leaders seeing third-party AI integrations are [09:58.660 --> 10:07.200] particularly vulnerable. Now, specialized repos like Hugging Face host over 500,000 models. [10:07.200 --> 10:13.020] Way more than 500,000 models now. But these are free, pre-trained models, which makes it easy [10:13.020 --> 10:18.720] for developers to basically integrate these models into their own application. Now, if an attacker [10:18.720 --> 10:24.280] breaches the repo, they could actually replace the models with a hijacked or a backdoored version, [10:24.280 --> 10:27.740] which you can imagine leads to significant downstream consequences. [10:29.720 --> 10:36.640] So, backdoor models. A skilled adversary can actually inject a neural payload into a pre-trained [10:36.640 --> 10:48.700] AI model, creating a hidden model backdoor that triggers specific attacker-defined outputs. The [10:48.700 --> 10:55.260] attacker to ensure favorable outcomes, like loan approvals or insurance policies. Now, one of the [10:55.260 --> 11:02.980] things about disclosing vulnerabilities is that with traditional, what we've had for a while, it [11:02.980 --> 11:08.120] took a lot of time to get where we are today. By understanding how bad are these vulnerabilities [11:08.120 --> 11:14.560] that people are finding, what's the severity of it, also knowing how much do I pay out on it. [11:14.560 --> 11:19.380] The thing with AI is we're all playing a little bit of a game of catch-up, trying to figure out [11:19.380 --> 11:25.040] how do we go about this? Because we still are missing some well-defined processes, such as [11:25.040 --> 11:31.340] like a CVE system for them, and this is becoming a serious problem, which we're going to dive into [11:31.340 --> 11:39.300] next. So, I'm going to pass the mic over to Kaz, who basically really owns this field. I kid you not. [11:40.420 --> 11:45.000] So, Chloe just went over what most of you guys have probably heard about with AI vulnerabilities. [11:45.000 --> 11:48.900] I mean, most of you raised your hands with prompt injection. How many here have heard of data [11:48.900 --> 11:53.480] poisoning before? Raise your hands. Okay, yeah. So, most of you. And that's probably what you think [11:53.480 --> 11:57.960] about when you think about AI vulnerabilities. However, there's a huge amount of attack surface [11:57.960 --> 12:02.860] that people really aren't looking at. And that's what I'm going to go over today. So, the first is [12:02.860 --> 12:07.140] going to be our model and our dataset format vulnerabilities. So, who here has heard of [12:07.140 --> 12:12.860] hugging face? Okay. Nice. So, for those of you who haven't, hugging face is pretty much GitHub, [12:12.860 --> 12:17.760] but for AI models, which means that everyone's constantly sharing them. So, anyone can just go [12:17.760 --> 12:22.440] ahead and upload something and then tons of people download them. And by tons, I mean, literally [12:22.440 --> 12:28.320] millions every day download these types of models. And because it's shared so much, it's generally [12:28.320 --> 12:32.360] trusted, too, right? I mean, why would something that you just download on the internet be [12:32.360 --> 12:38.900] malicious? And because unlike code where, you know, GitHub, if I send Chloe some malicious code, [12:38.900 --> 12:44.720] she can see, oh, you know, that's bad. I shouldn't run that. With AI models, it tends to be, you know, [12:44.720 --> 12:49.200] pretty large chunks of data. And that's not really something that you can inspect very easily. [12:49.620 --> 12:54.900] We also have a lot of AI infrastructure vulnerabilities. And they really are lacking [12:54.900 --> 12:59.300] security often. I mean, a lot of these AI infrastructure components, they were built [12:59.300 --> 13:04.880] in academia or they were built for, you know, internal hosting. So, why would you add security [13:04.880 --> 13:12.020] if it's hosted internally? And what people do is, you know, people always do, is rather than [13:12.020 --> 13:17.220] hosting things internally that don't have security, they are putting it publicly on the internet. [13:17.320 --> 13:22.500] So, that means that, you know, if you look on Shodan for very specific HTTP titles, you will [13:22.500 --> 13:30.080] see hundreds of these ML Ops projects just open and accessible to the internet. And then finally, [13:30.080 --> 13:34.160] we have our AI development framework vulnerabilities. And for these, we have two [13:34.160 --> 13:38.560] main types of frameworks that we're talking about. So, the first is going to be things that are LLM [13:38.560 --> 13:44.600] connected. So, we see a lot of times that people will just put an LLM in front of an eval statement [13:44.600 --> 13:49.600] and then the LLM actually creates the eval statement. So, when you have a nice prompt [13:49.600 --> 13:53.860] injection, rather than, you know, telling the kid to go eat the chocolate, the kid's gonna go fly [13:53.860 --> 13:59.300] or something. Something that, you know, shouldn't have been possible. And then we also have lots of [13:59.300 --> 14:04.420] sensitive data integrations. So, we have components like RAG, where it will just grab data for you. [14:04.420 --> 14:08.780] And what we're seeing is that a lot of people, rather than actually building out access control, [14:08.780 --> 14:13.460] are just having all of their data hosted in one spot, and then the LLM can access all of that, [14:13.460 --> 14:18.540] and the LLM is actually trying to do the access control. Which doesn't work too well. [14:19.600 --> 14:25.620] So, with model format vulnerabilities, we talk about serialization a lot. And raise your hand if [14:25.620 --> 14:30.820] you've heard of serialization in the past. Okay, awesome. So, serialization, you know, if I just [14:30.820 --> 14:36.320] want to have whatever code object I have, I want to save it to the, you know, my disk, I can load [14:36.320 --> 14:42.460] it up, I can send it across, that's serialization. And because these AI models take, you know, [14:42.460 --> 14:48.120] potentially millions of dollars or more to train tons of GPU hours, those are things that you want [14:48.120 --> 14:53.820] to save off so that other people can actually load them off in the future. And because there's [14:53.820 --> 14:59.920] serialization, there's also serialization vulnerabilities. Who here has heard of pickle? [15:00.620 --> 15:04.420] Okay. And for those of you who have heard of pickle, would you ever actually try to load an [15:04.420 --> 15:10.040] arbitrary pickle? No, right? So, for those of you who don't know, pickle is Python serialization [15:10.040 --> 15:15.900] format, the built-in one, and if you load it, you can pretty much execute any code that you want. [15:15.900 --> 15:23.260] I can do that nice little eval statement or an exec. And sadly, we're seeing that a lot of these, [15:23.260 --> 15:28.420] especially the Python model formats, they use pickle underneath the hood to actually store [15:28.420 --> 15:32.480] data, which means that all of these can be potentially malicious, and when you actually [15:32.480 --> 15:38.180] download them from Hugging Face and run them, you will actually be exploited. However, this isn't [15:38.180 --> 15:44.380] just an issue with Python. We see this with R's data serialization format, which is used for data [15:44.380 --> 15:50.100] sets, with Java machine learning models, and then even with independent models as well. And we'll [15:50.100 --> 15:55.100] go over a few of these today. But of that big list, as you can see, all of the orange ones [15:55.100 --> 16:01.800] contain vulnerabilities, which is a pretty large percentage of them. So, who here has heard of [16:01.800 --> 16:09.520] JSON data? Awesome. And would you load a JSON file? Right? Awesome. Right? JSON is secure. [16:09.520 --> 16:19.620] So, what if I told you it can sometimes be insecure? Yeah. So, Scops is the secure format [16:19.620 --> 16:25.360] for Scikit-learn, and Scikit-learn is an AI development framework. And what Scops allows [16:25.360 --> 16:33.060] users to do is safely load and store models. And what they did is it ends up being pretty much a [16:33.060 --> 16:38.140] JSON file with all of the data inside. However, what they do is based on the JSON data, it will [16:38.140 --> 16:44.180] try to reconstruct objects in memory. And it does this using abstract syntax stream. So, here you [16:44.180 --> 16:50.820] can see that on the top we have an operator function node. And it's of class call. Then what [16:50.820 --> 16:55.100] we can do is we have our nice little tuple, we have our eval statement, and then we have a string [16:55.100 --> 17:00.360] that just says print pwned by hidden layer. And you can put whatever you want in there. So, most [17:00.360 --> 17:05.460] people would trust a JSON file, because why wouldn't they? But what we're seeing is that a lot [17:05.460 --> 17:12.180] of these frameworks out there are actually using these things incorrectly or insecurely. Now, [17:12.180 --> 17:16.360] Scops did an amazing job. They patched the vulnerability. They made it so that it wouldn't [17:16.360 --> 17:21.120] actually exploit anyone. So, if you're using that now, you're pretty safe. So, I do want to give [17:21.120 --> 17:28.140] them props for that. Now, we don't always have Python. So, GGUF is one of the machine learning [17:28.140 --> 17:36.020] formats. It's generally used with C. And C is pretty hard to secure. I mean, how many of you [17:36.020 --> 17:40.460] have, you know, messed up writing a C program and then everything crashes? Yeah. Okay. Thanks for [17:40.460 --> 17:49.800] being honest. So, what happened here is that we have NE2. And then it expects that there's only [17:49.800 --> 17:57.020] ever going to be two dimensions. However, as with most things where you have user trusted input, [17:57.020 --> 18:01.080] users might not always follow what actually is happening in there. And what happened here is [18:01.080 --> 18:07.820] that users were able to add more dimensions and then it caused a crash through an overflow. While [18:07.820 --> 18:13.840] this one itself wasn't too exploitable, there are quite a few that are exploitable out there. And [18:13.840 --> 18:19.060] what I always wanted to tell people who are trying to, you know, get into AppSec is if especially [18:19.060 --> 18:24.380] with C, look where any parsing happens. Because normally when you have parsing, especially where [18:24.380 --> 18:30.940] it's user controlled, you can do quite a few fun things. And what also is important is that AI [18:30.940 --> 18:37.000] models, they're all user controlled data and you have to load them. So, keep in mind that that is a [18:37.000 --> 18:42.480] huge attack surface with not just the initial parsing, but actually how they run as well. [18:42.480 --> 18:47.920] And then finally, we have our nice independent model formats such as ONIX. ONIX can be loaded [18:47.920 --> 18:53.980] in Python, C, pretty much whatever you want. And the general format actually relies on Google's [18:53.980 --> 19:00.820] protobuf. So, nice and secure. However, what ONIX allowed users to do was they allowed it to [19:00.820 --> 19:06.340] be trimmed down so that you could load data externally. So, that meant that the model might [19:06.340 --> 19:11.980] be able to load, you know, special weights or biases for certain classes from the file system [19:11.980 --> 19:18.120] itself. And while it meant for users to only use a data directory that was inside of the same [19:18.120 --> 19:24.280] existing where the model was, this was not the case because you could actually use path traversal. [19:24.280 --> 19:28.900] And as you can see here, we use path traversal to go all the way up and then we go into Etsy, [19:28.900 --> 19:34.580] password, and now this AI model actually knows our password. So, imagine if you deploy that on [19:34.880 --> 19:41.220] a server where you then have an LLM running that people can interact with. That LLM now knows where [19:41.220 --> 19:46.880] your password is, which is not great. So, whenever you see something that interacts with a file [19:46.880 --> 19:52.060] system, always look for path traversals because a lot of times they are actually overlooked. [19:53.000 --> 19:57.420] Now, earlier I mentioned AI infrastructure and most of you raised your hands for [19:57.420 --> 20:02.700] knowing what Hugging Face is. So, when people think about AI infrastructure, a lot of times [20:02.700 --> 20:07.860] this is their first thought. They think of model hosting. However, it doesn't just stop there. [20:08.040 --> 20:14.600] Who here has heard of ML Ops solutions? Okay. Awesome. So, let's throw in a few ML Ops [20:14.600 --> 20:19.860] solutions too and just see, you know, what do we have there. However, it doesn't just stop there. [20:19.860 --> 20:25.600] I mean, we have model deployment and serving. We have our vector databases. We have our project [20:25.600 --> 20:32.360] hosting. And as you can see, the attack surface is huge. I mean, there's no way to secure all of [20:32.360 --> 20:38.920] these. And this is just a small component. So, the AI infrastructure's attack surface is really [20:39.140 --> 20:44.200] a great one to target if you are looking for something to target there. We saw this actually [20:44.200 --> 20:49.660] with Hugging Face itself. So, Hugging Face, what they tried to do is because of all these [20:49.660 --> 20:55.940] serialization format vulnerabilities, they tried to create a safe format called SafeTensors. And [20:55.940 --> 21:02.280] while SafeTensors was actually safe, it does a really great job, what they needed to have was [21:02.280 --> 21:07.340] that users would actually use the SafeTensors format. Because most of the people had other [21:07.340 --> 21:13.060] formats saved off, especially PyTorch. And probably most of you in the room, including me, if [21:13.060 --> 21:19.280] something works, I normally don't change it. And while they might know that their model is secure, [21:19.280 --> 21:23.960] other people don't. And that's what Hugging Face wanted. So, what they did was they created a [21:23.960 --> 21:29.760] service where anybody could go, they could add the URL for their Hugging Face repository. It [21:29.760 --> 21:35.400] would take the PyTorch file, convert it into a SafeTensors format, and then try to push to that [21:35.400 --> 21:42.500] repository. And then all of this was done inside of a container. And what we realized was that it [21:42.500 --> 21:47.400] was actually loading those PyTorch files in an insecure way, which meant that when the [21:47.400 --> 21:52.960] PyTorch file was being loaded, you could execute arbitrary code on the server. And then we decided [21:52.960 --> 21:58.100] to look a bit further, and we noticed that the spaces, so that container, actually persisted [21:58.100 --> 22:03.220] across users. So, that meant rather than just messing with my file, I could mess with Chloe's [22:03.220 --> 22:09.960] file once it was actually run. And not only that, you could potentially even steal private users' [22:09.960 --> 22:15.680] repositories. Because the service allowed you to upload your private key, which would then load [22:15.680 --> 22:21.860] in your private files, and then convert them as well. Which means, you know, if Google or some [22:21.860 --> 22:25.300] of the other big ones have those private files that they don't want people to know about, I can [22:25.300 --> 22:31.500] just steal it and run away with it. And people were actually using the service by the time we [22:31.500 --> 22:36.820] exploited it. So, this one was not exploited, so I want you to make sure that nothing's wrong [22:36.820 --> 22:42.840] here. But as you can see here, there is a pull request from SF convert bot, which was the bot [22:42.840 --> 22:49.200] being used. And you can see that it was actually merged into the repository. And when we actually [22:49.200 --> 22:54.760] looked at how many people actually downloaded this one file, which if the attack hadn't been [22:54.760 --> 23:00.460] stopped, would have potentially been exploited, we can see that in the last month, there had been [23:00.460 --> 23:08.520] 3.8 million downloads of this one file. So, imagine if, you know, the 500 plus thousand [23:08.520 --> 23:13.420] repositories on Hugging Face were all affected. So, these AI infrastructure vulnerabilities are [23:13.620 --> 23:20.300] a big deal. We see the same thing with ML Ops. So, we like to say, you know, people, [23:20.300 --> 23:24.960] they rush into things, they try to get things working, and they don't always think about, [23:24.960 --> 23:28.760] you know, whether that feature should be in there. And what we're seeing a lot of times [23:28.760 --> 23:36.280] in these AI vulnerabilities is that vulnerabilities that we saw years ago are coming back and we're [23:36.280 --> 23:42.180] seeing them again. So, obviously, we have our, you know, pickles, our unsafe serialization library. [23:42.220 --> 23:46.560] And then to our surprise, there's actually, you know, safe libraries like JSON that are actually [23:46.560 --> 23:51.920] being vulnerable, which was, that was a surprise. But we're also seeing missing authentication. So, [23:51.920 --> 23:57.660] we're seeing some services that are hosted externally that have no authentication at all. [23:57.660 --> 24:02.620] We're seeing hard code keys, plain text passwords. I mean, the list goes on and on. And I mean, [24:02.620 --> 24:05.500] I couldn't even fit it on the page. It goes, like, all the way down here. But [24:05.500 --> 24:10.560] if you are looking for these vulnerabilities, look for the things that you thought were extinct. [24:11.360 --> 24:16.540] And then how many of you guys have seen this meme about, you know, any sort of software library? [24:16.540 --> 24:23.840] Yeah. Okay. So, we are seeing the same thing again. And a lot of these AI development frameworks, [24:23.840 --> 24:27.000] there's vulnerabilities being found. However, that's not an issue. I mean, [24:27.000 --> 24:31.020] we want vulnerabilities to be found, because that means vulnerabilities are being fixed. [24:31.160 --> 24:34.780] However, what we're seeing is that once vulnerabilities are being reported to these [24:34.780 --> 24:39.980] projects, there's pretty much three things that happen. The first is that as soon as it was [24:39.980 --> 24:45.480] reported, the people patched it. However, they still left the unsafe option in there. So, [24:45.480 --> 24:49.860] that means that you could load it securely if you use the default parameters. However, [24:49.860 --> 24:54.200] with a certain optional parameter, you might still be able to load the insecure format. [24:54.900 --> 25:00.980] We've also seen that some people decide to patch, add in a way to do it securely. However, [25:00.980 --> 25:06.340] that weighs off by default. So, you can still be exploited unless you know about... I mean, [25:06.340 --> 25:12.640] who here reads documentation? Okay. A few of you. Yeah. So, you're not gonna know about an AI [25:12.640 --> 25:17.760] vulnerability or vulnerability in the framework. So, why would you look... I mean, unless you read [25:17.760 --> 25:21.800] through the documentation. And then finally, what we're also seeing is that there's some [25:21.800 --> 25:26.660] frameworks out there that are just completely ignoring it and saying that it's intended behavior [25:26.660 --> 25:33.480] and not an actual vulnerability. So, NumPy load is one of the ones from the start. And as you can [25:33.480 --> 25:37.820] see, there's an optional parameter called allow pickle. If you set that to true, you can be [25:37.820 --> 25:43.480] exploited. However, normally you don't. And thanks to the open source nature of artificial intelligence, [25:43.480 --> 25:48.640] we were able to do some searching and we can see that on GitHub, there are 87,000 files that use [25:48.640 --> 25:55.640] this insecurely. And that's insecurely, not just using it. We also have PyTorch load. And what [25:55.640 --> 26:02.080] this framework does is there's that insecure load on start. However, you can set the optional [26:02.080 --> 26:08.760] parameter for weights only. But as we saw, people do not read documentation and it's gonna make [26:08.760 --> 26:16.360] the other number look bad. But 573,000 files are using this insecurely. Well, I'm gonna hand it [26:16.360 --> 26:24.760] back to Chloe to talk about the open source nature of AI. Thank you, Cass. All right. Let's do this. [26:25.520 --> 26:30.360] All right. Isn't that creepy looking, by the way? Like, if I ever open a watermelon and it looks [26:30.360 --> 26:34.720] like that, I don't think I'm gonna eat that. Actually, I probably would swear off ever eating [26:34.720 --> 26:40.620] watermelon again. Anyway, when it comes to verifying open source AI models, it is definitely fraught [26:40.620 --> 26:46.560] with so many challenges like inconsistent code quality, hidden security vulnerabilities, and [26:46.560 --> 26:52.080] complex licensing issues. There are biases in pre-trained models, of course, as well. And then [26:52.080 --> 26:58.720] you have poor documentation and then you have to deal with the rapid value, like, evolution of AI, [26:58.720 --> 27:04.760] which really does further the need of having transparency because right now it isn't [27:04.760 --> 27:12.000] transparent. And this is complicating things when it comes to vulnerability management. And, yeah, [27:12.000 --> 27:21.180] this talk is kind of like, ooh, any Brooklyn Nine-Nine people out here? All right. Okay. Okay. I have to [27:21.180 --> 27:29.640] ask this quick question. Is Amy Santiago your favorite character? One of them? Okay. Thank you. [27:29.640 --> 27:37.020] That feels great to hear. She's also my favorite. I also love his character, too, by the way. All [27:37.020 --> 27:42.860] right. So when it comes to open source foundations of AI, the thing is finding these vulnerabilities [27:44.000 --> 27:50.940] is, is definitely has some issues because an open source AI system is aided by accessible code [27:51.480 --> 27:58.580] and community efforts and specialized tools. How are complex contributions rapid, like, [27:58.580 --> 28:06.260] oh, my God, I'm always struggling to pronounce this word. Evolution. Anyway. And specialized [28:06.260 --> 28:13.340] knowledge can introduce security flaws. Frequent updates, dependencies and gaps in testing further [28:13.340 --> 28:17.920] contribute to these risks and vulnerabilities stem from inadequate reviews, as we know, [28:17.920 --> 28:23.790] poor implementation, dependency issues, back doors, insufficient security practices. [28:24.350 --> 28:29.070] As you can tell, there's a lot of issues. It's been the issues we've had with traditional, [28:29.070 --> 28:34.330] but now it seems like an extra layer of everything. Because there's rapid development, [28:34.330 --> 28:38.850] there's misconfigured models, and now you also have to worry about social engineering as well. [28:38.850 --> 28:44.810] These all increase the risks. And to be honest, I think our next talk at DEF CON, and don't anyone [28:44.810 --> 28:50.330] steal this idea, okay? I'm just putting it out there, is AI-assisted code reviews. That sounds [28:50.330 --> 28:56.290] interesting, because that's emerging right now. Anyway. As you see, this is a long list, [28:56.290 --> 29:00.530] and it's definitely missing other things probably on this list, but reporting AI vulnerabilities is [29:00.530 --> 29:08.070] incredibly tough. Because it's unclear who owns what and the responsibilities. Not just that, [29:08.070 --> 29:13.010] but the technical complexity and the need for specialized knowledge. Of course, we have to [29:13.010 --> 29:18.590] worry about legal fears, reputation risk and coordination issues that tend to complicate the [29:18.590 --> 29:23.670] process, while inadequate reporting channels and resource constraints really do discourage [29:23.670 --> 29:28.990] thorough reporting. This has been a problem for us at Hidden Layer a few times, that we actually [29:28.990 --> 29:35.610] had to get CISA involved. And they were wonderful. They helped us get in touch with people, [29:35.610 --> 29:42.350] so then we could get some serious vulnerabilities patched. So, quick summary, is that AI [29:42.350 --> 29:48.510] vulnerabilities are complex and distinct. And the threats, like prompt injections and data poisoning, [29:48.510 --> 29:54.530] are out there. And there's rapid developments and reliance on open source frameworks. It introduces [29:54.530 --> 29:59.670] all these type of risks. So, managing these vulnerabilities demands improving reporting, [29:59.670 --> 30:05.550] but also stronger partnerships, including with CISA and other organizations, especially when it [30:05.550 --> 30:12.750] comes to disclosure. So, we do have a call to action. We're all in this together. That's right. [30:12.750 --> 30:17.690] We all can take a step forward and do something together. And the call to action is to partner [30:17.690 --> 30:23.590] with us. We need to enhance security for AI vulnerability disclosure and ensure comprehensive [30:23.590 --> 30:29.470] protection against vulnerabilities. So, we'll be right over here for Q&A. But if you want to get [30:29.470 --> 30:37.110] involved with us, do let us know. I know we're out of time. But, yeah. Anyway, thank you so much for [30:37.110 --> 30:39.570] having us. Thank you, AppSec Village.