[00:08.120 --> 00:13.200] Welcome to I've Got Nine-Nine Problems But A Prompt Injection Ain't Watermelon. [00:13.960 --> 00:18.220] So, let's talk a little bit about who we are before we dive into the gritty of things. [00:22.440 --> 00:23.960] Let's forget that mic. [00:23.960 --> 00:29.200] Okay, my name is Chloe Misagi and I'm the Head of Threat Intelligence over at Hidden Layer. [00:29.320 --> 00:32.960] And with me, I'm going to pass the mic over to my co-speaker. [00:33.300 --> 00:34.480] Hi, I'm Kasimir. [00:34.480 --> 00:37.120] I'm a Security Researcher over at Hidden Layer as well. [00:37.120 --> 00:38.620] Thanks for coming to our talk. [00:39.560 --> 00:40.680] All right. [00:40.680 --> 00:43.660] So, we're going to run through some things today. [00:43.860 --> 00:47.540] First, we're going to go into some of the AI vulnerabilities that are out there. [00:47.660 --> 00:55.440] You know, we never know what people's backgrounds are, so we want to make sure that we're all on the same page before we dive into the gritty things. [00:55.740 --> 00:56.940] So, we're going to do that. [00:56.940 --> 00:59.040] Then we're going to do some public perceptions as well. [00:59.040 --> 01:01.980] And then go down, what does this landscape look like? [01:01.980 --> 01:04.500] And then the open source nature of AI. [01:04.500 --> 01:07.780] And of course, we've got to talk about reporting challenges. [01:08.760 --> 01:13.340] So, let's dive into what public perceptions of AI vulnerabilities are. [01:13.340 --> 01:15.860] Pretty much everything's on fire, right? [01:15.860 --> 01:20.840] Like, end of the world, Terminator, all that. [01:21.080 --> 01:32.980] But the thing is, is that there's a lot of misinformation, disinformation out there about security for AI, even within our own industry and even within maybe at DEF CON as well. [01:32.980 --> 01:36.160] And so, we want to make sure that we fix this problem. [01:36.160 --> 01:39.220] And yes, this was a generated AI image here. [01:39.220 --> 01:44.060] So, yes, we know how to spell, but maybe chat GPT doesn't. [01:44.060 --> 01:48.700] Anyway, so let's go down the rapid hole of AI vulnerabilities. [01:50.140 --> 01:55.540] But first, understand the difference between an AI model versus an AI system. [01:55.540 --> 02:10.900] So, functionality, the AI model handles data processing and decision-making, whereas an AI system ensures the model can be effectively used in the real-world application, including data management, user interaction, and system maintenance. [02:10.920 --> 02:12.880] Now, the components are also different here. [02:12.880 --> 02:25.240] So, an AI model consists of algorithms and learned parameters, while an AI system includes the model plus additional components like data pipelines and deployment environments and user interfaces. [02:25.240 --> 02:29.300] So, we're going to go through each one of these categories here. [02:29.540 --> 02:32.480] So, first, we're going to talk about the attacks against the AI algorithms. [02:32.480 --> 02:38.380] We get to go down the fun parts of data poisoning and model invasion and model theft. [02:38.520 --> 02:42.460] Well, of course, we have to talk about prompt injection, because that's all you hear about, right? [02:42.680 --> 02:49.240] And then I'm going to pass the mic over to Kaz to go into the areas where you see it's like a burnt orange right there. [02:50.580 --> 02:52.760] So, data poisoning attacks. [02:52.760 --> 02:59.820] So, model training is crucial for AI development, but it is vulnerable to data poisoning. [02:59.820 --> 03:05.680] And this is when malicious actions manipulate or inject doctorate data to bias the model's behavior. [03:06.080 --> 03:13.420] Continuous learning systems are especially at risk, as they retrain on unvalidated and user-supplied data. [03:13.420 --> 03:21.520] Even small amounts of poisoned data can actually lead to a bias or incorrect predictions, amplified by the public manipulation or botnets. [03:21.520 --> 03:24.620] And one of those famous cases was Tay. [03:24.620 --> 03:26.680] Who here remembers Tay? [03:27.540 --> 03:28.840] It was so innocent. [03:28.840 --> 03:30.480] It was such an instant chat bot. [03:30.480 --> 03:32.800] It was like, hello, world, how are you? [03:32.840 --> 03:38.980] And within, like, I think it was 16 hours, it became the most rude, racist, sexist thing out there. [03:38.980 --> 03:40.120] Thank you, trolls. [03:41.180 --> 03:45.220] Anyway, this is one of those examples of data poisoning. [03:45.340 --> 03:48.240] It did cause problems for Microsoft, by the way. [03:48.240 --> 03:52.060] It did have to deal with threats of legal action. [03:52.080 --> 03:54.080] So something to think about. [03:54.220 --> 03:56.320] Then you have your model evasion attacks. [03:56.320 --> 03:58.920] These ones are kind of my favorite ones, this study. [03:59.000 --> 04:11.460] So inference attacks exploit AI models by curing them to extract sensitive information, often using slightly varied inputs to reconstruct the model, leading to potential model theft or bypass. [04:11.460 --> 04:25.960] Now, evasion attacks, a type of bypass, use subtle, not even visible to the human eye, changes to inputs, like adding invisible noise, to trick the model into misclassifications. [04:26.100 --> 04:29.380] And these techniques have long been used by attackers. [04:29.380 --> 04:36.140] This is also to bypass systems like spam filters or malware detection and biometric authentication. [04:36.560 --> 04:41.200] But I want you to imagine you're in a self-driving car. [04:41.200 --> 04:43.100] And while you're in this self-driving car... [04:43.100 --> 04:44.180] Wait, hold on before I do that. [04:44.180 --> 04:46.300] How many people have been in a self-driving car? [04:47.220 --> 04:48.300] All right, cool. [04:48.400 --> 04:52.180] Now, imagine you're in a self-driving car, for those that haven't been in one. [04:52.180 --> 04:52.960] I'm with you. [04:52.960 --> 04:54.160] I haven't either. [04:54.160 --> 04:55.760] So you're in this car. [04:55.760 --> 04:57.700] You get to the stop sign. [04:57.740 --> 05:01.340] But instead, your car does something very strange. [05:01.380 --> 05:06.220] It does something like slide to the left, slide to the right. [05:06.220 --> 05:07.660] Take it back, y'all. [05:07.660 --> 05:09.480] One hop this time. [05:09.480 --> 05:11.080] Right foot, let's stop. [05:11.080 --> 05:12.640] Left foot, let's stop. [05:12.640 --> 05:14.440] Cha-cha, real smooth. [05:14.440 --> 05:19.440] Now, imagine your car did that because it saw a stop sign that looked like that. [05:19.620 --> 05:21.720] Where there were stickers on it. [05:21.960 --> 05:26.620] Which then made your car do a cha-cha slide. [05:26.940 --> 05:29.480] I don't know how that would really look, to be honest. [05:29.480 --> 05:32.100] But we're all using our imagination at this point. [05:32.100 --> 05:34.000] But in real life, that actually happened. [05:34.000 --> 05:35.920] Not the cha-cha slide part. [05:35.920 --> 05:42.380] But it actually, a self-driving car, went past the stop sign because there were stickers on the sign. [05:43.920 --> 05:52.500] Another good case of a model evasion attack is Russia painting fake bomber jets on the ground to hide them from Ukrainian drones. [05:52.580 --> 05:58.860] And you can also see this type of model evasion attacks by wearing certain sunglasses that are modified. [05:58.860 --> 06:04.120] Or even, you know, as we've already seen, with military systems as well. [06:04.940 --> 06:08.540] And yeah, those definitely pose some serious security risks. [06:09.100 --> 06:11.140] Now, model theft attacks. [06:11.160 --> 06:15.800] So, adversaries tend to target AI models to mislead them and steal them. [06:15.800 --> 06:20.800] Leading to intellectual property theft by replicating or extracting data. [06:20.940 --> 06:27.540] Now, to know the three people that, well, three groups of people that tend to do this type of stuff are nation states, of course. [06:27.540 --> 06:30.980] Your competitors is definitely one of them. [06:30.980 --> 06:33.240] And then you've got your attackers. [06:33.240 --> 06:42.400] So, even without public access, inference attacks via interfaces or APIs can actually replicate models or extract valuable information. [06:42.460 --> 06:46.980] So, Oracle attacks, as noted by NIST, include three different types. [06:46.980 --> 06:50.100] You have extraction attacks, which is to steal the model structure. [06:50.100 --> 06:54.220] Then you have your inversion attacks, which is to reconstruct the training data. [06:54.220 --> 07:01.340] And then you have your membership inference attacks, which is identify in specific data what's in the training set. [07:01.340 --> 07:05.740] And one of my favorite cases is with ByteDance. [07:05.740 --> 07:09.020] How many of you guys have TikTok on your phone? [07:09.980 --> 07:11.820] Okay, you're in security. [07:11.820 --> 07:12.440] What? [07:12.440 --> 07:13.440] Why? [07:13.580 --> 07:14.680] Why? [07:15.000 --> 07:21.080] Maybe after this weekend, you're going to realize, maybe I shouldn't have this on there anymore. [07:21.160 --> 07:25.620] Anyway, well, ByteDance, as we all know, also owns TikTok. [07:25.620 --> 07:30.440] Well, TikTok got caught doing something they should have not done. [07:30.440 --> 07:34.700] Basically, trying to replicate the model of chat GPT. [07:34.700 --> 07:36.020] Yes, they did get suspended. [07:36.020 --> 07:37.580] OpenAI did catch them. [07:37.580 --> 07:39.660] This happened last year. [07:41.320 --> 07:48.960] Now, when it comes to prompt injection, how many people here have heard this term quite often now? [07:49.880 --> 07:52.840] Now, I know you're probably sick of hearing prompt injection, too. [07:52.840 --> 07:53.900] I don't blame you. [07:53.900 --> 08:01.320] But for those that don't know what a prompt injection is, I want you to imagine you're at a Thanksgiving meal, okay? [08:01.640 --> 08:06.620] And you're with your niece, and your niece is so adorable and cute. [08:06.620 --> 08:10.380] Well, her mom told her, do not eat the chocolate on that table. [08:10.540 --> 08:12.160] And you know what you do? [08:12.320 --> 08:13.280] Come here. [08:14.580 --> 08:17.920] Ignore your mom's words. [08:17.980 --> 08:19.660] Go eat that piece of chocolate. [08:19.980 --> 08:21.640] That would be a prompt injection. [08:21.640 --> 08:27.560] So, Gen AI providers use security filters to block harmful content. [08:27.600 --> 08:30.820] Illegal info and misuse and ensuring compliance with laws. [08:30.820 --> 08:34.360] These also may be known as guardrails. [08:34.740 --> 08:38.780] But these safeguards can actually be bypassed with prompt injection. [08:38.780 --> 08:43.060] Which does trick the AI bots into performing restricted actions. [08:43.060 --> 08:48.900] And this vulnerability basically varies by models and has raised some serious concerns. [08:48.900 --> 08:51.860] Especially around disclosure and payouts. [08:52.960 --> 08:54.980] And then you have your supply chain attacks. [08:54.980 --> 08:58.960] This wouldn't be a security talk unless I brought up supply chain attacks. [08:59.240 --> 09:01.860] So, like SolarWinds Breach, I know. [09:01.900 --> 09:03.060] I feel you. [09:03.060 --> 09:05.280] If you went through there, that was hard. [09:05.280 --> 09:13.720] But basically, supply chain attacks, they tend to exploit trust by compromising trusted vendors, spreading malicious components, widely. [09:13.720 --> 09:17.440] And the complex ML supply chain heightens these risks. [09:17.440 --> 09:23.200] With 75% of IT leaders seeing third-party AI integrations are particularly vulnerable. [09:24.500 --> 09:30.000] Now, specialized repos like Hugging Face host over 500,000 models. [09:30.000 --> 09:32.700] Way more than 500,000 models now. [09:32.700 --> 09:35.060] But these are free, pre-trained models. [09:35.060 --> 09:40.400] Which makes it easy for developers to basically integrate these models into their own application. [09:40.440 --> 09:46.760] Now, if an attacker breaches the repo, they could actually replace the models with a hijacked or a backdoored version. [09:46.760 --> 09:50.840] Which you can imagine leads to significant downstream consequences. [09:52.740 --> 09:55.220] So, backdoor models. [09:55.220 --> 10:02.780] A skilled adversary can actually inject a neural payload into a pre-trained AI model, creating a hidden model backdoor. [10:02.780 --> 10:06.240] That triggers specific attacker-defined outputs. [10:06.240 --> 10:11.180] The model works normally with regular data, but misbehaves with manipulated inputs. [10:16.580 --> 10:28.280] Now, one of the things about disclosing vulnerabilities is that with traditional, what we've had for a while, it took a lot of time to get where we are today. [10:28.280 --> 10:32.360] By understanding how bad are these vulnerabilities that people are finding? [10:32.360 --> 10:34.320] What's the severity of it? [10:34.320 --> 10:37.380] Also, knowing how much do I pay out on it? [10:37.380 --> 10:41.400] The thing with AI is we're all playing a little bit of a game of catch-up. [10:41.400 --> 10:44.400] Trying to figure out, how do we go about this? [10:44.540 --> 10:50.000] Because we still are missing some well-defined processes, such as a CVE system for them. [10:50.060 --> 10:54.980] And this is becoming a serious problem, which we're going to dive into next. [10:54.980 --> 11:01.000] So, I'm going to pass the mic over to Kaz, who basically really owns this field. [11:01.000 --> 11:02.180] I kid you not. [11:03.260 --> 11:07.860] So, Chloe just went over what most of you guys have probably heard about with AI vulnerabilities. [11:07.860 --> 11:10.540] I mean, most of you raised your hands with prompt injection. [11:10.540 --> 11:12.540] How many here have heard of data poisoning before? [11:12.540 --> 11:13.420] Raise your hands. [11:13.480 --> 11:14.300] Okay, yeah. [11:14.300 --> 11:15.020] So, most of you. [11:15.020 --> 11:18.540] And that's probably what you think about when you think about AI vulnerabilities. [11:18.760 --> 11:22.880] However, there's a huge amount of attack surface that people really aren't looking at. [11:22.880 --> 11:24.580] And that's what I'm going to go over today. [11:24.920 --> 11:28.500] So, the first is going to be our model and our dataset format vulnerabilities. [11:28.760 --> 11:30.980] So, who here has heard of Hugging Face? [11:30.980 --> 11:32.000] Okay. [11:32.000 --> 11:32.660] Nice. [11:32.720 --> 11:37.400] So, for those of you who haven't, Hugging Face is pretty much GitHub, but for AI models. [11:37.400 --> 11:39.720] Which means that everyone's constantly sharing them. [11:39.720 --> 11:43.880] So, anyone can just go ahead and upload something, and then tons of people download them. [11:43.880 --> 11:48.540] And by tons, I mean literally millions every day download these types of models. [11:48.680 --> 11:52.200] And because it's shared so much, it's generally trusted, too. [11:52.200 --> 11:52.460] Right? [11:52.460 --> 11:56.000] I mean, why would something that you just download on the internet be malicious? [11:56.000 --> 12:03.940] And because unlike code, where, you know, on GitHub, if I send Chloe some malicious code, she can see, oh, you know, that's bad. [12:03.940 --> 12:05.180] I shouldn't run that. [12:05.180 --> 12:09.200] With AI models, it tends to be, you know, pretty large chunks of data. [12:09.200 --> 12:12.060] And that's not really something that you can inspect very easily. [12:12.480 --> 12:14.780] We also have a lot of AI infrastructure vulnerabilities. [12:15.000 --> 12:19.060] And they really are lacking security often. [12:19.080 --> 12:23.600] I mean, a lot of these AI infrastructure components, they were built in academia. [12:23.600 --> 12:26.400] Or they were built for, you know, internal hosting. [12:26.400 --> 12:29.300] So why would you add security if it's hosted internally? [12:29.560 --> 12:40.220] And what people do, as, you know, people always do, is rather than hosting things internally that don't have security, they are putting it publicly on the internet. [12:40.220 --> 12:52.060] So that means that, you know, if you look on Shodan for very specific HTTP titles, you will actually see hundreds of these, you know, MLOps projects just open and accessible to the internet. [12:52.060 --> 12:55.480] And then finally, we have our AI development framework vulnerabilities. [12:55.840 --> 12:59.400] And for these, we have two main types of frameworks that we're talking about. [12:59.400 --> 13:02.160] So the first is going to be things that are LLM connected. [13:02.160 --> 13:07.840] So we see a lot of times that people will just put an LLM in front of an eval statement. [13:07.840 --> 13:11.220] And then the, you know, LLM actually creates the eval statement. [13:11.220 --> 13:17.740] So when you have a nice prompt injection, rather than, you know, telling the kid to go eat the chocolate, the kid's gonna go fly or something. [13:17.740 --> 13:20.540] Something that, you know, shouldn't have been possible. [13:20.540 --> 13:23.900] And then we also have lots of sensitive data integrations. [13:23.900 --> 13:27.540] So we have components like RAG, where it will just grab data for you. [13:27.540 --> 13:34.640] And what we're seeing is that a lot of people, rather than actually building out access control, are just having all of their data hosted in one spot. [13:34.640 --> 13:36.460] And then the LLM can access all of that. [13:36.460 --> 13:39.320] And the LLM is actually trying to do the access control. [13:39.360 --> 13:41.620] Which doesn't work too well. [13:42.420 --> 13:47.720] So with model format vulnerabilities, we talk about serialization a lot. [13:47.720 --> 13:50.800] And raise your hand if you've heard of serialization in the past. [13:50.940 --> 13:51.360] Okay. [13:51.360 --> 13:51.840] Awesome. [13:51.840 --> 13:58.780] So serialization, you know, if I just want to have whatever code object I have, I want to save it to, you know, my disk. [13:58.780 --> 13:59.740] I can load it up. [13:59.740 --> 14:01.020] I can send it across. [14:01.040 --> 14:02.440] That's serialization. [14:02.600 --> 14:15.320] And because these AI models take, you know, potentially millions of dollars or more to train tons of GPU hours, those are things that you want to save off so that other people can actually load them off in the future. [14:15.320 --> 14:20.660] And because there's serialization, there's also serialization vulnerabilities. [14:20.940 --> 14:23.040] Who here has heard of Pickle? [14:23.680 --> 14:24.380] Okay. [14:24.380 --> 14:28.640] And for those of you who have heard of Pickle, would you ever actually try to load an arbitrary Pickle? [14:28.800 --> 14:29.680] No, right? [14:29.680 --> 14:33.920] So for those of you who don't know, Pickle is Python's serialization format. [14:33.920 --> 14:35.280] The built-in one. [14:35.280 --> 14:38.980] And if you load it, you can pretty much execute any code that you want. [14:38.980 --> 14:42.700] So I can, you know, do that nice little eval statement or an exec. [14:42.700 --> 14:52.160] And sadly, we're seeing that a lot of these, especially the Python model formats, they use Pickle underneath the hood to actually store data. [14:52.160 --> 14:55.040] Which means that all of these can be potentially malicious. [14:55.040 --> 15:00.180] And when you actually download them from Hugging Face and run them, you will actually be exploited. [15:00.320 --> 15:03.140] However, this isn't just an issue with Python. [15:03.140 --> 15:12.700] We see this with R's data serialization format, which is used for data sets, with Java machine learning models, and then even with independent models as well. [15:12.700 --> 15:15.020] And we'll go over a few of these today. [15:15.020 --> 15:22.380] But of that big list, as you can see, all of the orange ones contain vulnerabilities, which is a pretty large percentage of them. [15:23.120 --> 15:26.380] So who here has heard of JSON data? [15:26.680 --> 15:27.660] Awesome. [15:27.660 --> 15:30.360] And would you load a JSON file? [15:30.360 --> 15:30.840] Right? [15:30.840 --> 15:31.300] Awesome. [15:31.300 --> 15:31.480] Right? [15:31.480 --> 15:32.640] JSON secure. [15:32.640 --> 15:33.380] Okay. [15:33.380 --> 15:37.500] So what if I told you it can sometimes be insecure? [15:37.500 --> 15:38.840] Yeah. [15:38.920 --> 15:44.680] So Scops is the secure format for Scikit-learn. [15:44.680 --> 15:47.180] And Scikit-learn is an AI development framework. [15:47.180 --> 15:53.320] And what Scops allows users to do is safely load and store models. [15:53.400 --> 15:58.480] And what they did is it ends up being pretty much a JSON file with all of the data inside. [15:58.480 --> 16:03.780] However, what they do is based on the JSON data, it will try to reconstruct objects in memory. [16:03.780 --> 16:06.640] And it does this using an abstract syntax stream. [16:06.640 --> 16:10.880] So here you can see that on the top we have an operator function node. [16:10.940 --> 16:13.500] And it's of class call. [16:13.580 --> 16:16.000] Then what we can do is we have our nice little tuple. [16:16.000 --> 16:17.540] We have our eval statement. [16:17.540 --> 16:20.660] And then we have a string that just says print pwned by hidden layer. [16:20.660 --> 16:22.800] And you can put whatever you want in there. [16:22.800 --> 16:27.060] So most people would trust a JSON file because why wouldn't they? [16:27.060 --> 16:34.760] But what we're seeing is that a lot of these frameworks out there are actually using these things incorrectly or insecurely. [16:34.760 --> 16:36.920] Now, Scops did an amazing job. [16:36.920 --> 16:38.420] They patched the vulnerability. [16:38.500 --> 16:40.960] They made it so that it wouldn't actually exploit anyone. [16:40.960 --> 16:43.320] So if you're using that now, you're pretty safe. [16:43.320 --> 16:45.540] So I do want to give them props for that. [16:46.360 --> 16:48.920] Now, we don't always have Python. [16:48.920 --> 16:52.140] So gguf is one of the machine learning formats. [16:52.180 --> 16:55.620] It's generally used with C. [16:55.840 --> 16:58.460] And C is pretty hard to secure. [16:58.460 --> 17:02.680] I mean, how many of you have messed up writing a C program and then everything crashes? [17:02.680 --> 17:03.100] Yeah. [17:03.100 --> 17:03.380] Okay. [17:03.380 --> 17:04.720] Thanks for being honest. [17:05.980 --> 17:10.520] So what happened here is that we have ne2. [17:10.520 --> 17:14.980] And then it expects that there's only ever going to be two dimensions. [17:15.000 --> 17:23.260] However, as with most things where you have user-trusted input, users might not always follow what actually is happening in there. [17:23.260 --> 17:30.260] And what happened here is that users were able to add more dimensions and then it caused a crash through an overflow. [17:30.260 --> 17:36.680] While this one itself wasn't too exploitable, there are quite a few that are exploitable out there. [17:36.760 --> 17:45.780] And what I always wanted to tell people who are trying to get into AppSec is, especially with C, look where any parsing happens. [17:45.780 --> 17:50.980] Because normally when you have parsing, especially where it's user-controlled, you can do quite a few fun things. [17:51.060 --> 17:58.720] And what also is important is that AI models, they are all user-controlled data and you have to load them. [17:58.720 --> 18:04.760] So keep in mind that that is a huge attack surface with not just the initial parsing, but actually how they run as well. [18:05.380 --> 18:10.040] And then finally we have our nice independent model formats such as ONIX. [18:10.040 --> 18:14.080] ONIX can be loaded in Python, C, pretty much whatever you want. [18:14.080 --> 18:19.620] And the general format actually relies on Google's protobuf, so nice and secure. [18:19.740 --> 18:28.200] However, what ONIX allowed users to do was, they allowed it to be trimmed down so that you could load data externally. [18:28.200 --> 18:36.220] So that meant that the model might be able to load, you know, special weights or biases for certain classes from the file system itself. [18:36.340 --> 18:47.580] And while it meant for users to only use a data directory that was inside of the same existing, where the model was, this was not the case because you could actually use path traversal. [18:47.580 --> 18:56.120] And as you can see here, we use path traversal to go all the way up, and then we go into Etsy, password, and now this AI model actually knows our password. [18:56.120 --> 19:06.820] So imagine if you deploy that on a server, where you then have an LLM running that people can interact with, that LLM now knows where your password is, which is not great. [19:06.820 --> 19:15.520] So whenever you see something that interacts with a file system, always look for path traversals, because a lot of times they are actually overlooked. [19:16.340 --> 19:22.620] Now, earlier I mentioned AI infrastructure, and most of you raised your hands for knowing what Hugging Face is. [19:22.620 --> 19:27.340] So when people think about AI infrastructure, a lot of times this is their first thought. [19:27.340 --> 19:28.720] They think of model hosting. [19:29.120 --> 19:31.180] However, it doesn't just stop there. [19:31.540 --> 19:34.340] Who here has heard of MLOps solutions? [19:35.100 --> 19:36.140] Okay, awesome. [19:36.140 --> 19:41.060] So let's throw in a few MLOps solutions too, and just see, you know, what do we have there. [19:41.420 --> 19:43.180] However, it doesn't just stop there. [19:43.180 --> 19:52.900] I mean, we have model deployment and serving, we have our vector databases, we have our project hosting, and as you can see, the attack surface is huge. [19:52.900 --> 19:56.460] I mean, there's no way to secure all of these. [19:56.460 --> 19:58.780] And this is just a small component. [19:58.900 --> 20:06.040] So the AI infrastructure attack surface is really a great one to target, if you are looking for something to target there. [20:06.320 --> 20:09.140] We saw this actually with Hugging Face itself. [20:09.420 --> 20:19.000] So Hugging Face, what they tried to do is, because of all these serialization format vulnerabilities, they tried to create a safe format called SafeTensors. [20:19.020 --> 20:28.520] And while SafeTensors was actually safe, it does a really great job, what they needed to have was that users would actually use the SafeTensors format. [20:28.520 --> 20:38.780] Because most of the people had other formats saved off, especially PyTorch, and probably most of you in the room, including me, if something works, I normally don't change it. [20:39.400 --> 20:43.580] And while they might know that their model is secure, other people don't. [20:43.580 --> 20:45.300] And that's what Hugging Face wanted. [20:45.340 --> 20:59.320] So what they did was they created a service where anybody could go, create a URL for their Hugging Face repository, it would take the PyTorch file, convert it into a SafeTensors format, and then try to push to that repository. [20:59.860 --> 21:02.760] And then all of this was done inside of a container. [21:03.340 --> 21:15.320] And what we realized was that it was actually loading those PyTorch files in an insecure way, which meant that when the PyTorch file was being loaded, you could execute arbitrary code on the server. [21:15.400 --> 21:22.840] And then we decided to look a bit further, and we noticed that the spaces, so that container, actually persisted across users. [21:22.840 --> 21:28.940] So that meant rather than just messing with my file, I could mess with Chloe's file once it was actually run. [21:28.940 --> 21:34.360] And not only that, you could potentially even steal private users' repositories. [21:34.360 --> 21:43.280] Because the service allowed you to upload your private key, which would then load in your private files, and then convert them as well. [21:43.280 --> 21:50.640] Which means, you know, if Google or some of the other big ones have those private files that they don't want people to know about, I can just steal it and run away with it. [21:52.220 --> 21:55.980] And people were actually using the service by the time we exploited it. [21:55.980 --> 22:00.820] So this one was not exploited, so I want you to make sure that nothing's wrong here. [22:00.820 --> 22:07.220] But as you can see here, there is a pull request from sfconvertbot, which was the bot being used. [22:07.220 --> 22:11.060] And you can see that it was actually merged into the repository. [22:11.600 --> 22:27.900] And when we actually looked at how many people actually downloaded this one file, which, if the attack hadn't been stopped, would have potentially been exploited, we can see that in the last month, there had been 3.8 million downloads of this one file. [22:28.000 --> 22:34.740] So imagine if, you know, the 500 plus thousand repositories on Hugging Face were all affected. [22:34.740 --> 22:38.400] So these AI infrastructure vulnerabilities are a big deal. [22:38.800 --> 22:41.260] We see the same thing with MLOps. [22:41.260 --> 22:43.600] So we like to say, you know, people... [22:43.600 --> 22:50.800] they rush into things, they try to get things working, and they don't always think about, you know, whether that feature should be in there. [22:50.820 --> 23:00.860] And what we're seeing a lot of times in these AI vulnerabilities is that vulnerabilities that we saw years ago are coming back, and we're seeing them again. [23:00.860 --> 23:12.980] So obviously we have our, you know, Pickles, our unsafe serialization library, and then to our surprise, there's actually, you know, safe libraries like JSON that are actually being vulnerable which was... that was a surprise. [23:13.100 --> 23:15.340] But we're also seeing missing authentication. [23:15.380 --> 23:21.180] So we're seeing some services that are hosted externally that have no authentication at all. [23:21.220 --> 23:24.060] We're seeing hard-coded keys, plain text passwords. [23:24.060 --> 23:27.540] I mean, the list goes on and on, and I mean, I couldn't even fit it all on the page. [23:27.540 --> 23:28.940] It goes, like, all the way down here. [23:28.940 --> 23:34.140] But if you are looking for these vulnerabilities, look for the things that you thought were extinct. [23:34.980 --> 23:40.140] And then how many of you guys have seen this meme about, you know, any sort of software library? [23:40.140 --> 23:41.200] Yeah, okay. [23:41.240 --> 23:44.600] So we are seeing the same thing again. [23:44.620 --> 23:49.200] And a lot of these AI development frameworks, there's vulnerabilities being found. [23:49.200 --> 23:50.440] However, that's not an issue. [23:50.440 --> 23:54.700] I mean, we want vulnerabilities to be found because that means vulnerabilities are being fixed. [23:54.760 --> 24:01.640] However, what we're seeing is that once vulnerabilities are being reported to these projects, there's pretty much three things that happen. [24:01.900 --> 24:05.580] The first is that as soon as it was reported, the people patched it. [24:05.580 --> 24:08.980] However, they still left the unsafe option in there. [24:08.980 --> 24:13.240] So that means that you could load it securely if you use the default parameters. [24:13.320 --> 24:17.840] However, with a certain optional parameter, you might still be able to load the insecure format. [24:18.560 --> 24:24.260] We've also seen that some people decide to patch, add in a way to do it securely. [24:24.260 --> 24:26.660] However, that weighs off by default. [24:26.680 --> 24:29.160] So you can still be exploited unless you know about... [24:29.520 --> 24:31.280] I mean, who here reads documentation? [24:32.400 --> 24:33.740] Okay, a few of you. [24:33.940 --> 24:40.480] Yeah, so you're not going to know about an AI vulnerability in the framework, so why would you? [24:40.600 --> 24:42.540] I mean, unless you read through the documentation. [24:42.860 --> 24:52.020] And then finally, what we're also seeing is that there's some frameworks out there that are just completely ignoring it and saying that it's intended behavior and not an actual vulnerability. [24:52.940 --> 24:56.260] So NumPy load is one of the ones from the start. [24:56.420 --> 24:59.820] And as you can see, there's an optional parameter called allow pickle. [24:59.820 --> 25:02.200] If you set that to true, you can be exploited. [25:02.200 --> 25:03.740] However, normally you don't. [25:03.740 --> 25:13.760] And thanks to the open source nature of artificial intelligence, we were able to do some searching and we can see that on GitHub there are 87,000 files that use this insecurely. [25:13.880 --> 25:16.580] And that's insecurely, not just using it. [25:16.580 --> 25:18.820] We also have PyTorch load. [25:18.820 --> 25:24.320] And what this framework does is there's that insecure load on start. [25:24.320 --> 25:27.620] However, you can set the optional parameter for weights only. [25:27.620 --> 25:33.720] But as we saw, people do not read documentation and it's going to make the other number look bad. [25:33.720 --> 25:38.900] And 573,000 files are using this insecurely. [25:39.020 --> 25:43.340] Well, I'm going to hand it back to Chloe to talk about the open source nature of AI. [25:44.340 --> 25:46.020] Thank you, Cass. [25:46.020 --> 25:47.020] All right. [25:47.020 --> 25:48.500] Let's do this. [25:49.120 --> 25:50.120] All right. [25:50.320 --> 25:52.280] Isn't that creepy looking, by the way? [25:52.280 --> 25:56.260] Like, if I ever open a watermelon and it looks like that, I don't think I'm going to eat that. [25:56.260 --> 25:59.640] Actually, I probably would swear off ever eating watermelon again. [25:59.820 --> 26:12.620] Anyway, when it comes to verifying open source AI models, it is definitely fraught with so many challenges like inconsistent code quality, hidden security vulnerabilities, and complex licensing issues. [26:12.780 --> 26:15.720] There are biases in pre-trained models, of course, as well. [26:15.720 --> 26:29.940] And then you have poor documentation and then you have to deal with the rapid evolution of AI, which really does further the need of having transparency because right now it isn't transparent. [26:29.940 --> 26:35.160] And this is complicating things when it comes to vulnerability management. [26:35.240 --> 26:38.500] And yeah, this talk is kind of like... [26:39.660 --> 26:42.480] Any Brooklyn Nine-Nine people out here? [26:43.500 --> 26:44.280] Okay. [26:44.540 --> 26:46.240] I have to ask this quick question. [26:47.500 --> 26:50.080] Is Amy Santiago your favorite character? [26:52.000 --> 26:52.800] One of them? [26:52.800 --> 26:53.080] Okay. [26:53.080 --> 26:53.880] Thank you. [26:54.360 --> 26:56.760] That feels great to hear. [26:56.760 --> 26:57.900] She's also my favorite. [26:57.900 --> 27:00.740] I also love his character, too, by the way. [27:00.740 --> 27:01.500] All right. [27:02.120 --> 27:18.340] So, when it comes to open source foundations of AI, the thing is finding these vulnerabilities definitely has some issues because an open source AI system is aided by accessible code and community efforts and specialized tools. [27:18.540 --> 27:21.200] However, complex contributions, rapid... [27:22.080 --> 27:23.360] Oh, my God. [27:23.360 --> 27:25.560] I'm always struggling to pronounce this word. [27:26.460 --> 27:27.740] Evolution. [27:28.500 --> 27:29.560] Anyway. [27:29.660 --> 27:33.080] And specialized knowledge can introduce security flaws. [27:33.440 --> 27:38.940] Frequent updates, dependencies, and gaps in testing further contribute to these risks. [27:38.940 --> 27:47.900] And vulnerabilities stem from inadequate reviews, as we know, poor implementation, dependency issues, backdoors, insufficient security practices. [27:48.420 --> 27:50.900] As you can tell, there's a lot of issues. [27:50.900 --> 28:02.760] It's been the issues we've had with traditional, but now it seems like an extra layer of everything because there's rapid development, there's misconfigured models, and now you also have to worry about social engineering as well. [28:02.760 --> 28:04.840] These all increase the risks. [28:05.180 --> 28:10.140] And to be honest, I think our next talk at DEF CON, and don't anyone steal this idea, okay? [28:10.140 --> 28:13.420] I'm just putting it out there, is AI-assisted code reviews. [28:13.560 --> 28:16.500] That sounds really interesting because that's emerging right now. [28:17.400 --> 28:30.940] Anyway, as you see, this is a long list, and it's definitely missing other things probably on this list, but reporting AI vulnerabilities is incredibly tough because it's unclear who owns what and the responsibilities. [28:31.300 --> 28:36.440] Not just that, but the technical complexity and the need for specialized knowledge. [28:36.440 --> 28:49.020] Of course, we have to worry about legal fears, reputation risk, and coordination issues that tend to complicate the process, while inadequate reporting channels and resource constraints really do discourage thorough reporting. [28:49.020 --> 28:55.400] This has been a problem for us at Hidden Layer a few times, that we actually had to get CISA involved. [28:55.720 --> 28:57.060] And they were wonderful. [28:57.060 --> 29:03.000] They helped us get in touch with people, so then we could get some serious vulnerabilities patched. [29:03.200 --> 29:09.360] So, quick summary, is that AI vulnerabilities are complex and distinct. [29:09.360 --> 29:13.880] And the threats, like prompt injections and data poisoning, are out there. [29:13.880 --> 29:20.360] And there's rapid developments and reliance on open-source frameworks, that introduces all these types of risks. [29:20.360 --> 29:31.040] So, managing these vulnerabilities demands improving reporting, but also stronger partnerships, including with CISA and other organizations, especially when it comes to disclosure. [29:31.580 --> 29:33.900] So, we do have a call to action. [29:33.900 --> 29:35.780] We're all in this together. [29:35.940 --> 29:36.760] That's right. [29:36.760 --> 29:40.080] We all can take a step forward and do something together. [29:40.080 --> 29:43.100] And the call to action is to partner with us. [29:43.200 --> 29:49.640] We need to enhance security for AI vulnerability disclosure and ensure comprehensive protection against vulnerabilities. [29:49.980 --> 29:55.680] So, we'll be right over here for Q&A, but if you want to get involved with us, do let us know. [29:55.980 --> 29:59.760] I know we're out of time, but yeah. [29:59.760 --> 30:02.040] Anyway, thank you so much for having us. [30:02.040 --> 30:03.540] Thank you, AppSec Village.