1 00:00:00,000 --> 00:00:01,140 All right. 2 00:00:01,140 --> 00:00:07,660 It is with great honor that I welcome to the stage Adam Shostak. 3 00:00:13,110 --> 00:00:14,230 Thank you. 4 00:00:14,230 --> 00:00:14,750 Thank you. 5 00:00:14,750 --> 00:00:18,630 It's a pleasure to be here at the AppSec Village. 6 00:00:18,770 --> 00:00:22,850 And I want to give you a slight word of warning. 7 00:00:23,110 --> 00:00:32,570 These are the least DEF CON-y slides you're going to see because there were some speaker issues and I'm stepping in at the last minute. 8 00:00:32,570 --> 00:00:35,670 So you don't have the crazy anime. 9 00:00:35,670 --> 00:00:39,210 You don't have some other stuff that I would have put in if there was time. 10 00:00:39,210 --> 00:00:46,310 But I want to talk, I want to share with you some thoughts on threat modeling in the age of AI. 11 00:00:47,290 --> 00:00:52,870 And I want to make the slides advance. 12 00:00:53,190 --> 00:00:55,350 And they are not advancing. 13 00:00:55,350 --> 00:00:56,610 Hey, Araz? 14 00:00:59,430 --> 00:01:03,330 The keyboard seems to be entirely locked out. 15 00:01:03,330 --> 00:01:04,370 Oh, there we go. 16 00:01:04,670 --> 00:01:07,450 What button am I hitting to make that happen? 17 00:01:07,630 --> 00:01:09,070 There we go. 18 00:01:10,530 --> 00:01:11,250 All right. 19 00:01:11,250 --> 00:01:12,530 We've got something that works. 20 00:01:12,530 --> 00:01:15,370 I'm not going to bother to introduce myself. 21 00:01:15,370 --> 00:01:18,870 I think many of you might know I do a lot work on threat modeling. 22 00:01:20,930 --> 00:01:21,890 Okay. 23 00:01:23,310 --> 00:01:24,190 Sorry. 24 00:01:24,550 --> 00:01:25,770 Thank you. 25 00:01:26,090 --> 00:01:30,510 You'll have to yell at me because I forget to speak when I forget to speak into the mic. 26 00:01:30,510 --> 00:01:38,210 Anyway, when we used to think about the age of AI, we used to think about, you know, Terminator. 27 00:01:38,210 --> 00:01:41,790 And if you're old like me, you might think about HAL 9000. 28 00:01:42,990 --> 00:01:46,030 And this was going to be the age of AI. 29 00:01:46,070 --> 00:01:50,330 But instead, instead, it's things like this. 30 00:01:51,310 --> 00:01:55,490 It's way less threatening looking, way less cinematic. 31 00:01:57,330 --> 00:02:07,450 But what I want to share with you, I want to start with just a really quick overview of threat modeling, give you an introduction in case you have not threat modeled or not succeeded at threat modeling. 32 00:02:07,450 --> 00:02:14,790 Going to talk about how we apply those techniques to artificial intelligence systems, really to LLMs. 33 00:02:15,370 --> 00:02:16,910 And then I'm going to flip over. 34 00:02:16,910 --> 00:02:20,170 I'm going to talk about how we use LLMs to secure systems. 35 00:02:20,170 --> 00:02:28,890 I'm going to go a little faster because there was an awesome talk here at like 1230, which went way more into depth on that question than I was planning to. 36 00:02:28,930 --> 00:02:33,190 If there's time, we're going to talk about residual and uncontrollable dangers. 37 00:02:33,510 --> 00:02:36,990 And then I'm going to try to leave time for questions. 38 00:02:37,750 --> 00:02:39,950 So quick little overview. 39 00:02:39,950 --> 00:02:48,470 Actually, before I get into an overview of threat modeling, how many of you here have threat modeled a system in real system? 40 00:02:48,850 --> 00:02:50,210 Many, many. 41 00:02:50,290 --> 00:02:53,510 Cool, but not all, not all in that. 42 00:02:54,210 --> 00:02:57,030 No criticism, but that bums me out a little bit. 43 00:02:57,030 --> 00:02:59,990 So I would love for you to do a little bit of threat modeling. 44 00:02:59,990 --> 00:03:01,290 What is it? 45 00:03:01,290 --> 00:03:05,830 It is using models to help us think about security. 46 00:03:05,830 --> 00:03:13,750 It's abstracting away some details so we can see the forest rather than the trees or the twigs. 47 00:03:13,930 --> 00:03:25,770 And I think of threat modeling, the reason I spend my time and energy on threat modeling is because I think threat modeling is the measure twice cut once of cybersecurity. 48 00:03:25,870 --> 00:03:40,570 And if you do any sort of physical maker activity, you do things building with wood or building with concrete, you measure twice before you do something so you don't make a mistake and waste material. 49 00:03:40,590 --> 00:03:50,450 The material that we waste in our software projects is human time and energy when we build the wrong thing. 50 00:03:50,470 --> 00:04:08,550 And then we either need to rewrite it, we either need to rewrite it because we didn't build the right thing, or we get into these crazy arguments with people who are really focused on we need to ship this on Friday and we're saying no. 51 00:04:09,450 --> 00:04:17,590 And if we threat model, we can anticipate these problems, we can find these problems when there's time to do something about them. 52 00:04:17,590 --> 00:04:27,170 And that's why I think it's so important to learn these techniques and to apply these techniques across all of the systems we work on, including AI. 53 00:04:27,470 --> 00:04:32,550 And this applies to the things we produce, it applies to the things we deploy. 54 00:04:37,130 --> 00:04:38,850 And so how do we do this? 55 00:04:38,850 --> 00:04:42,410 We do this by asking four very simple questions. 56 00:04:42,410 --> 00:04:43,590 What are we working on? 57 00:04:43,590 --> 00:04:44,930 What can go wrong? 58 00:04:44,930 --> 00:04:46,490 What are we going to do about it? 59 00:04:46,490 --> 00:04:48,190 Did we do a good job? 60 00:04:48,190 --> 00:04:55,750 There are lots of specific techniques, things like data flow diagrams help us answer what are we working on. 61 00:04:55,750 --> 00:05:14,030 Tools like Stride and Kill Chains help us answer what can go wrong in structured ways that we can teach the folks around us, that we can do in a way where we don't have this problem of ask two AppSec experts, get three different answers. 62 00:05:14,030 --> 00:05:18,210 It really annoys the folks around us to experience that. 63 00:05:18,210 --> 00:05:23,890 If you have not seen it, I want to recommend you go to the Threat Modeling Manifesto website. 64 00:05:23,890 --> 00:05:33,310 15 or so of us built out this manifesto talking about the techniques, talking about how to threat model effectively. 65 00:05:33,610 --> 00:05:40,350 And one of the things I've learned in the last year is that we underemphasize boundaries. 66 00:05:40,350 --> 00:05:48,030 And so I just want to mention the importance of using threat modeling to identify where the boundaries are that we're going to defend. 67 00:05:48,030 --> 00:05:55,030 I want to emphasize the value of using threat modeling to say where can we make more boundaries? 68 00:05:55,030 --> 00:06:01,290 Where can we add defenses that allow our systems to operate more securely? 69 00:06:01,930 --> 00:06:10,490 And this where are the boundaries is something that I've been hearing from more and more people that they're not doing quite as well as they could be. 70 00:06:10,490 --> 00:06:13,770 And so I wanted to share that little detail with you. 71 00:06:13,930 --> 00:06:18,250 So let's move to how do we threat model AI? 72 00:06:18,450 --> 00:06:24,610 And I'm going to talk I'm going to talk about two of these four scenarios. 73 00:06:24,610 --> 00:06:27,670 I think there are four scenarios we can think about. 74 00:06:27,670 --> 00:06:36,990 And this little model really helps me understand because these AI conversations go off in all sorts of directions. 75 00:06:36,990 --> 00:06:42,290 People have so many things that they're thinking about when we say AI or LM's. 76 00:06:42,290 --> 00:06:45,790 So the first scenario, AI for offense, right? 77 00:06:45,790 --> 00:06:48,830 Help have the AI write me a phishing campaign. 78 00:06:48,830 --> 00:06:50,850 Have the AI write me malware. 79 00:06:50,870 --> 00:06:51,830 This is cool. 80 00:06:51,830 --> 00:06:53,470 Not going to talk about it. 81 00:06:53,970 --> 00:06:55,270 AI for defense. 82 00:06:55,270 --> 00:06:58,930 This includes things like spam filters. 83 00:06:58,930 --> 00:07:00,230 Defender copilot. 84 00:07:00,230 --> 00:07:02,110 Not going to talk about it. 85 00:07:02,110 --> 00:07:04,590 I'm going to talk about AI for business. 86 00:07:04,590 --> 00:07:13,690 When we deploy an LLM, how do we threat model that LLM so that we can deploy it in a safer pattern? 87 00:07:13,910 --> 00:07:16,930 And I'm going to talk about AI for software development. 88 00:07:17,570 --> 00:07:19,830 That will be my second focus. 89 00:07:20,050 --> 00:07:24,010 So what are we working on with AI? 90 00:07:24,610 --> 00:07:25,130 And 91 00:07:28,310 --> 00:07:36,070 when I think about this, CISA has actually released some great threat model diagrams. 92 00:07:36,070 --> 00:07:37,210 I'm going to show these to you. 93 00:07:37,210 --> 00:07:38,630 By the way, the slides are available. 94 00:07:38,630 --> 00:07:42,730 I apologize for the ugly URL at the very bottom there. 95 00:07:42,730 --> 00:07:47,430 But the slides will be available so you can get to these. 96 00:07:48,570 --> 00:07:51,050 And so I'm going to show you three models from CISA. 97 00:07:51,050 --> 00:07:58,090 I'm going to show you some examples of how we might build models and how they might help inform what we do. 98 00:07:58,550 --> 00:08:03,170 And then I'll talk about how to ask what can go wrong with each of them. 99 00:08:03,930 --> 00:08:12,690 So CISA has this model for building a large language model and validating it. 100 00:08:12,690 --> 00:08:19,590 They've got a model for deployment and they have one for the operational environment. 101 00:08:19,590 --> 00:08:25,990 And each of these three scenarios opens us up to different threats. 102 00:08:25,990 --> 00:08:29,190 The what can go wrong is different. 103 00:08:29,210 --> 00:08:34,710 And you can borrow CISA's work as you're getting started. 104 00:08:34,710 --> 00:08:40,090 You can say which of these three most resembles what we're doing. 105 00:08:40,090 --> 00:08:47,590 And then you modify their diagram to more accurately portray what you are doing. 106 00:08:48,290 --> 00:08:58,390 So when we get to adding an LM to our business, we get random messages in Hebrew and we can send a quick reply. 107 00:08:59,030 --> 00:09:03,070 That doesn't usually happen to me, but I'm borrowing Araz's laptop. 108 00:09:03,070 --> 00:09:04,730 Thank you for the loan here. 109 00:09:06,650 --> 00:09:11,670 So when we're... I'll pay him back in a little bit. 110 00:09:14,290 --> 00:09:15,170 All right. 111 00:09:15,170 --> 00:09:16,250 Well, whatever. 112 00:09:16,290 --> 00:09:24,130 So when we add an LLM to our business, you know, maybe we've got a skilled admin and they're doing things with the product. 113 00:09:24,530 --> 00:09:27,450 And then we can put an LLM in there. 114 00:09:27,450 --> 00:09:31,910 We can help the enthusiastic newbie use our product. 115 00:09:31,910 --> 00:09:36,650 And we can just put an LLM there and then it sends commands straight to the product. 116 00:09:36,650 --> 00:09:39,510 Does anyone here think that's a good idea? 117 00:09:40,290 --> 00:09:41,690 You're hired. 118 00:09:41,970 --> 00:09:43,790 Somewhere else. 119 00:09:45,190 --> 00:09:48,650 So we can draw these really simple models, right? 120 00:09:48,650 --> 00:10:04,810 We can say, hey, the LLM should send a command suggestion and then the command suggestion should go back to the newbie so that the newbie can say, maybe that's not the right thing, or maybe the LLM is going to summarize. 121 00:10:04,990 --> 00:10:08,950 And so we can find different deployment scenarios. 122 00:10:08,950 --> 00:10:16,650 And there is no engineering which is as cheap as sketching random stuff in PowerPoint. 123 00:10:16,650 --> 00:10:22,990 Everything else that you're going to do is way more expensive and slower. 124 00:10:23,450 --> 00:10:36,610 But using these, again, really dumb, I shouldn't say dumb, using these really simple diagrams really helps us develop more secure products. 125 00:10:37,030 --> 00:10:38,570 Well, that was weird feedback. 126 00:10:38,570 --> 00:10:39,210 All right. 127 00:10:39,210 --> 00:10:48,250 The other thing I want to talk about when we think about what are we working on with LLMs is the importance of training data. 128 00:10:48,490 --> 00:10:51,970 Is your training data preselected and curated? 129 00:10:51,970 --> 00:10:55,150 Is it coming to you live from the internet? 130 00:10:55,510 --> 00:11:06,070 If it's coming to you live from the internet, do you remember Tay, the Microsoft chat bot on Twitter that turned into a Nazi inside of 24 hours? 131 00:11:07,210 --> 00:11:10,430 And by the way, this was old Twitter. 132 00:11:10,450 --> 00:11:13,890 Now who knows how little time it would take. 133 00:11:15,610 --> 00:11:22,470 Knowing what your training data is, where it's coming from, is crucial. 134 00:11:22,970 --> 00:11:32,530 And I can't ‑‑ I literally cannot tell you how many conversations I've been in where the folks with the training data literally didn't know where it came from. 135 00:11:32,530 --> 00:11:34,510 Yeah, we spidered the internet. 136 00:11:35,010 --> 00:11:36,230 Okay. 137 00:11:36,230 --> 00:11:41,650 Let's talk about that because it leads to answers to what can go wrong. 138 00:11:43,250 --> 00:11:47,250 And so the different answers, very different threats. 139 00:11:47,650 --> 00:11:50,170 And so that's what are we working on. 140 00:11:50,170 --> 00:11:54,790 Ways to answer what are we working on when we're working with LLMs. 141 00:11:54,790 --> 00:12:00,250 And there are lots of ways to discover what can go wrong with LLMs. 142 00:12:00,250 --> 00:12:02,950 And I'm going to walk you through a set of them. 143 00:12:02,950 --> 00:12:09,430 Before I do, I want to mention that LLMs are just software. 144 00:12:09,430 --> 00:12:20,290 The systems that we deploy around the LLM to enable the LLM, stride threats still apply, kill chain threats still apply. 145 00:12:20,290 --> 00:12:31,930 Those fundamental building blocks are still really useful as we're threat modeling a system with an LLM at its heart or around the edge. 146 00:12:32,150 --> 00:12:37,770 And so I'm going to walk through a set of these catalogs and talk about each one. 147 00:12:38,950 --> 00:12:40,210 Yeah. 148 00:12:40,910 --> 00:12:42,210 Do that. 149 00:12:42,210 --> 00:12:48,530 So the OWASP's top ten for LLM applications. 150 00:12:48,590 --> 00:12:50,710 This looks really nice. 151 00:12:50,710 --> 00:12:54,690 There's a lot of hard work that went into this model. 152 00:12:55,070 --> 00:13:02,650 And I'm going to say, I do not love this model. 153 00:13:02,730 --> 00:13:06,010 I really ‑‑ I'm somewhat frustrated by it. 154 00:13:06,010 --> 00:13:10,470 Because I think a whole bunch of it has nothing to do with LLMs. 155 00:13:10,470 --> 00:13:15,350 So, for example, insecure output handling. 156 00:13:15,590 --> 00:13:18,710 This is a problem with any system that you build. 157 00:13:18,710 --> 00:13:22,710 Why do we need a slot in an LLM top ten? 158 00:13:23,070 --> 00:13:25,250 Model denial of service. 159 00:13:25,390 --> 00:13:29,730 Denial of service is a threat, it's part of stride. 160 00:13:29,730 --> 00:13:31,490 We should be finding it anyway. 161 00:13:31,490 --> 00:13:34,830 We don't need a slot for that. 162 00:13:34,830 --> 00:13:37,710 Supply chain vulns, same thing. 163 00:13:37,710 --> 00:13:41,430 Sensitive information disclosure and model theft. 164 00:13:41,430 --> 00:13:46,350 In my mind, one of those is a subset of the other. 165 00:13:46,490 --> 00:13:52,750 Again, why do we need to use these slots for those things? 166 00:13:52,750 --> 00:13:58,050 And I believe there are actively better things we can use those slots for. 167 00:13:58,050 --> 00:14:03,750 For example, hallucination, inexplicability, bias. 168 00:14:03,750 --> 00:14:10,450 And then we can just wrap all of those others into insecure design and deployment. 169 00:14:10,930 --> 00:14:17,150 And so we could get better, I believe, than the LLM top ten from OWASP. 170 00:14:18,650 --> 00:14:21,290 Then there's Microsoft's list. 171 00:14:21,290 --> 00:14:30,530 And Microsoft has published a lot of ‑‑ a lot, a lot, a lot on LLMs and security. 172 00:14:31,350 --> 00:14:35,410 And as some of you may know, I worked there for a long time. 173 00:14:35,410 --> 00:14:39,630 I'm proud of a lot of the work that came out of the teams I was part of. 174 00:14:40,510 --> 00:14:53,030 And I wish that Microsoft was doing a better job of explaining why their thinking evolved from one of these to the next. 175 00:14:53,090 --> 00:14:58,170 I wish they were doing a better job of marking old ones as deprecated. 176 00:14:58,170 --> 00:15:09,850 I wish they were doing a better job of making these things practical and applicable in engineering work. 177 00:15:10,070 --> 00:15:22,910 And so while I believe that they release a great deal of very, very useful content, I wanted to mention this because you might expect that same quality in their LLM security work. 178 00:15:22,910 --> 00:15:26,310 And I look forward to it getting there. 179 00:15:27,650 --> 00:15:33,070 The next one I want to talk about is the Berryville Institute of Machine Learning. 180 00:15:33,210 --> 00:15:42,330 Some of you may be familiar with Gary McGraw who was at Cigital, wrote, I don't know, seven books on application security. 181 00:15:42,330 --> 00:15:45,970 And these days he's leading a think tank, the Berryville Institute. 182 00:15:46,470 --> 00:15:56,850 And they have an opinionated set of experts who have produced three really solid sets of analyses. 183 00:15:57,010 --> 00:16:00,490 One is a taxonomy of AI threats. 184 00:16:00,490 --> 00:16:05,390 One is an architectural risk analysis of a generic machine learning system. 185 00:16:05,390 --> 00:16:14,590 And by the way, Gary incorrectly calls threat models architectural risk analysis because he spent his time as a consultant. 186 00:16:14,730 --> 00:16:16,790 And Gary knows that I tease him . 187 00:16:16,790 --> 00:16:20,070 We've had a lot of arguments over this. 188 00:16:20,110 --> 00:16:23,630 And maybe in the next five to ten years he'll get it right. 189 00:16:24,430 --> 00:16:30,570 The most recent one they've released is an architectural risk analysis for LLMs. 190 00:16:30,570 --> 00:16:32,230 It's really good. 191 00:16:32,230 --> 00:16:33,470 It's thoughtful. 192 00:16:33,470 --> 00:16:35,990 It's in depth where it needs to be in depth. 193 00:16:35,990 --> 00:16:38,110 It's short where it can be short. 194 00:16:38,110 --> 00:16:39,770 And I love it. 195 00:16:40,050 --> 00:16:51,450 And in the last month or so, there's a fellow who's adapted Elevation of Privilege, the card deck, to machine learning. 196 00:16:51,450 --> 00:16:54,710 And so he's released Elevation of Machine Learning. 197 00:16:54,710 --> 00:17:13,430 And I love it because it makes for a fun way, an enjoyable way to engage with the content of the Berryville analysis, which is in some white papers that can feel a little dense. 198 00:17:13,430 --> 00:17:24,510 And so I encourage you to both read those white papers and to download Elevation of MLSEC because it's a pretty cool tool. 199 00:17:26,050 --> 00:17:26,950 All right. 200 00:17:26,950 --> 00:17:30,250 How am I doing on time? 201 00:17:31,990 --> 00:17:34,110 I'm doing okay. 202 00:17:34,490 --> 00:17:37,890 Oh, I am not doing as okay on time as I thought. 203 00:17:37,890 --> 00:17:38,270 Cool. 204 00:17:38,270 --> 00:17:39,030 No, we're good. 205 00:17:39,030 --> 00:17:40,370 We are totally good. 206 00:17:40,470 --> 00:17:52,230 So I said I might go a little bit fast on this section because there was a great talk earlier today on using LLMs to help us develop software. 207 00:17:52,270 --> 00:18:03,070 So how many of you used LLMs to develop software, like actual production stuff? 208 00:18:03,070 --> 00:18:05,470 Why so few? 209 00:18:06,090 --> 00:18:08,150 No, I'm serious. 210 00:18:08,150 --> 00:18:13,570 Having an LLM develop software with you is really awesome. 211 00:18:15,850 --> 00:18:19,790 It's an accelerator in a lot of situations. 212 00:18:19,810 --> 00:18:21,890 This conference, this deck was for another thing. 213 00:18:21,890 --> 00:18:23,270 Ignore those words. 214 00:18:23,310 --> 00:18:27,250 So the first thing I want to say about this, it's deeply scary, right? 215 00:18:27,250 --> 00:18:29,310 The LLM takes our data. 216 00:18:29,810 --> 00:18:32,490 It takes our intellectual property. 217 00:18:32,490 --> 00:18:34,630 It takes our trade secrets. 218 00:18:34,630 --> 00:18:38,730 And I think the trade secrets are the nastiest of this. 219 00:18:38,730 --> 00:18:45,850 Because once you don't actually pay close attention to protecting trade secrets, you can lose those secrets. 220 00:18:45,850 --> 00:18:51,630 You don't lose copyright, you don't lose trademark, but you can lose trade secrets. 221 00:18:51,750 --> 00:18:55,750 And so I think that's very scary. 222 00:18:55,930 --> 00:18:57,990 And so that's the output side, right? 223 00:18:57,990 --> 00:19:00,590 We're sending data to the LLM. 224 00:19:00,590 --> 00:19:06,830 The input side, what comes back to us is also really scary. 225 00:19:07,350 --> 00:19:12,190 We get insecure, vulnerable code out of these things. 226 00:19:12,650 --> 00:19:24,990 We get uncopyrightable code as a product of the AI or worse, we get someone else's copyrightable code integrated into our code and that's awful. 227 00:19:26,730 --> 00:19:29,430 I'm going to skip over that. 228 00:19:29,430 --> 00:19:33,070 So let me talk about using LLMs to help threat modeling. 229 00:19:33,070 --> 00:19:41,750 How many of you have provided a user story in Epic or something else to an LLM and said write me a threat model? 230 00:19:41,750 --> 00:19:43,710 Has anyone done this experiment? 231 00:19:44,210 --> 00:19:45,650 A few of you? 232 00:19:45,650 --> 00:19:46,050 Okay. 233 00:19:46,050 --> 00:19:47,390 I'm going to talk about what happens. 234 00:19:47,390 --> 00:19:52,090 I've been spending a lot of time on these experiments because I think it's fascinating. 235 00:19:52,270 --> 00:19:54,750 I think it's important to understand. 236 00:19:55,810 --> 00:20:00,350 And so there's some obvious limits. 237 00:20:00,350 --> 00:20:01,730 I'll talk about those. 238 00:20:01,730 --> 00:20:08,330 But there's also some really exciting opportunities that make this attractive, that make it worth trying. 239 00:20:08,390 --> 00:20:10,290 And those are speed, right? 240 00:20:10,290 --> 00:20:13,830 I get a threat model in a minute instead of an hour. 241 00:20:13,970 --> 00:20:15,350 There's scale. 242 00:20:15,350 --> 00:20:21,770 I can go to 25,000 developers and say pump this into an LLM and ask it for help. 243 00:20:21,770 --> 00:20:24,110 I don't have to train those developers. 244 00:20:24,550 --> 00:20:41,350 I can get some degree of consistency and maybe maybe if we ask the LLMs the right questions, we can get better answers than asking all of our developers. 245 00:20:41,350 --> 00:20:46,130 That would be really cool if we can make it work. 246 00:20:46,130 --> 00:20:48,030 There are some really obvious limits. 247 00:20:48,030 --> 00:20:50,250 The LLM can hallucinate. 248 00:20:50,830 --> 00:20:53,210 We can habituate to it, right? 249 00:20:53,210 --> 00:21:04,010 So if the LLM is right 75, 80, 90% of the time, people will stop paying attention to what it's doing. 250 00:21:04,010 --> 00:21:05,910 They'll be like, yeah, that seems reasonable. 251 00:21:05,910 --> 00:21:07,290 That seems reasonable. 252 00:21:07,290 --> 00:21:08,610 Oops. 253 00:21:09,150 --> 00:21:11,930 And this is a well‑known human bias. 254 00:21:11,930 --> 00:21:16,690 It's hard to remain vigilant when the thing normally works. 255 00:21:18,070 --> 00:21:26,330 And so if you just send your code to an LLM, and I did this. 256 00:21:26,330 --> 00:21:33,170 I was writing some code for that other event and I moved it to a new directory and it broke. 257 00:21:33,190 --> 00:21:41,850 And it broke because there was a JWT and a cache file that I didn't know existed because I didn't understand the code that I was using. 258 00:21:42,550 --> 00:21:46,770 And so I'm like, okay, now I know that this thing exists. 259 00:21:47,010 --> 00:22:01,430 Let's see if I can ask the LLM leading questions and have it tell me that there's a security dependency on a local file where I might want to, I don't know, set permissions or pay attention to who's accessing it. 260 00:22:01,430 --> 00:22:06,830 I could not get any LLM to tell me about this file. 261 00:22:06,830 --> 00:22:08,270 It was really frustrating. 262 00:22:08,270 --> 00:22:11,510 I asked it the most leading questions I could. 263 00:22:11,510 --> 00:22:15,730 Like, where does the JWT token get stored? 264 00:22:15,730 --> 00:22:17,210 I don't know. 265 00:22:18,870 --> 00:22:26,690 And so these raw LLMs for threat modeling are way less effective than I would like. 266 00:22:26,690 --> 00:22:29,530 And you can get smarter with prompting. 267 00:22:29,530 --> 00:22:34,990 You can get smarter with here's what the output looks like, use this methodology. 268 00:22:36,450 --> 00:22:45,650 The retrieval augmented generation, chaining, helps a little bit, but it starts to require engineering, not just using a raw model. 269 00:22:46,750 --> 00:22:57,650 There's a really important thing here, which is that we write tests for the LLMs to determine whether or not they're actually giving us good answers. 270 00:22:57,650 --> 00:23:12,330 If we don't know what good looks like, we can't easily compare between Claude, chat GPT, Gemini, quick hint, don't try and get Gemini to threat model for you. 271 00:23:12,330 --> 00:23:18,990 Everything you do will trigger its safety functions and it will say, like, I can't give you hacking advice. 272 00:23:23,320 --> 00:23:30,480 So LLMs are currently best at tasks which are smaller than threat modeling. 273 00:23:30,620 --> 00:23:39,820 So when you say, what are we working on, you can ask an LLM to give you an architectural design for the thing you want to build. 274 00:23:40,080 --> 00:23:53,200 You can ask it to summarize what code is doing, discover what existing code does, this is super useful, and it relates to the question of what are we working on. 275 00:23:53,200 --> 00:23:59,580 You can ask it to make simplified system models and sometimes it does a pretty good job at that. 276 00:24:00,220 --> 00:24:02,220 You can ask what can go wrong. 277 00:24:02,220 --> 00:24:06,340 Maybe you can ask what can go wrong with every story. 278 00:24:06,600 --> 00:24:08,740 And you can ask what should we do. 279 00:24:08,740 --> 00:24:15,940 And it turns out that if you ask LLMs really specific questions about how to fix phones, they are not bad. 280 00:24:15,940 --> 00:24:21,080 If you ask them very general questions about what to do, they're God awful. 281 00:24:22,640 --> 00:24:27,780 You might also get them to write some mitigation code or mitigation test code for you. 282 00:24:30,300 --> 00:24:36,620 So I'm going to jump over some of this to leave time for questions. 283 00:24:37,600 --> 00:24:38,580 Let's see. 284 00:24:38,580 --> 00:24:42,040 But I do just want to mention one thing. 285 00:24:42,040 --> 00:24:47,840 So a lot of talk about the AI apocalypse, which I don't put a lot of faith in, I don't believe. 286 00:24:47,880 --> 00:24:58,860 But there are real problems in the real world today with AI that are very important for us to be thinking about, especially for folks who come here to DEF CON. 287 00:25:01,500 --> 00:25:06,640 It's impossible to get a job today without your resume going through AI. 288 00:25:06,960 --> 00:25:11,560 People who are traveling internationally get impacted by this. 289 00:25:11,560 --> 00:25:19,380 People have been arrested here in the United States because some stupid computer program thinks their face matches another face. 290 00:25:21,000 --> 00:25:23,960 There are pornographic deep fakes. 291 00:25:23,960 --> 00:25:26,960 There's the people who label these things. 292 00:25:26,960 --> 00:25:29,080 There's lots and lots of real problems. 293 00:25:29,080 --> 00:25:31,760 I could do a whole talk on this with time. 294 00:25:32,040 --> 00:25:43,120 Last thing I want to point out is that many of the security problems we have with LLMs are because of code data mingling by design in the LLM. 295 00:25:43,240 --> 00:25:46,760 We have no idea how to fix these things. 296 00:25:46,760 --> 00:25:50,880 It's going to make safe deployment of AI very challenging. 297 00:25:52,040 --> 00:25:57,800 So to summarize, talked a little bit about what threat modeling is, why we do it. 298 00:25:57,800 --> 00:26:05,080 Talked about how the four question framework applies well to machine learning systems and LLMs. 299 00:26:05,560 --> 00:26:13,880 I think ML will help us with software security and all of this makes for a fascinating time to be in the field. 300 00:26:14,320 --> 00:26:16,840 So with that, I just want to say thank you for listening. 301 00:26:16,840 --> 00:26:20,100 I apologize that I keep dropping the mic too far from my seat.