1 00:00:15,980 --> 00:00:19,930 Thanks for coming to our talk, to the fireside chat with me and Lucas here. 2 00:00:19,930 --> 00:00:29,350 Hopefully we can give you some cool insight on how our CRS works, what we did, what didn't work, and how we ultimately did it. 3 00:00:30,690 --> 00:00:33,630 So first, just to introduce myself, my name is Will Gibbs. 4 00:00:33,630 --> 00:00:37,330 I go by Clasm on a lot of platforms. 5 00:00:37,330 --> 00:00:39,830 I'm a PhD student at CephCom. 6 00:00:39,970 --> 00:00:46,610 I captained the Shellfish CTF team for about five years before getting tired and then quit. 7 00:00:47,170 --> 00:00:52,530 And then the past two years, I've been leading AICC with this guy next to me, Lucas. 8 00:00:52,770 --> 00:00:54,830 And I've played a couple of Pwn2Owns. 9 00:00:54,830 --> 00:00:58,150 We've won a couple thousand dollars there. 10 00:00:58,810 --> 00:01:00,770 Yeah, and I'm Lucas. 11 00:01:00,770 --> 00:01:04,230 I'm a PhD student at UC Santa Barbara. 12 00:01:05,110 --> 00:01:12,990 I'm also a current captain of Shellfish, and we've been leading the AICC team together. 13 00:01:12,990 --> 00:01:17,070 And, you know, the DARPA events are always a fun one. 14 00:01:17,070 --> 00:01:27,650 I've done a couple through my times, and so I'm really kind of more from the traditional vulnerability-finding competition angle that I approach the problem from. 15 00:01:28,570 --> 00:01:35,530 So just to give another brief intro to, like, Shellfish, this is, I think, our 20th year at DEF CON. 16 00:01:36,590 --> 00:01:39,830 We're a team with a pretty long history of just doing cool stuff. 17 00:01:39,830 --> 00:01:44,390 We like open-sourcing things, hopefully making the world a little bit of a better place. 18 00:01:44,990 --> 00:01:49,270 But Shellfish is a combination of three different universities. 19 00:01:49,270 --> 00:01:52,530 We have ASU, UCSB, and Purdue. 20 00:01:55,590 --> 00:02:01,670 So one thing that we just want to kind of inform everybody is what it's like to build this system, right? 21 00:02:01,670 --> 00:02:08,370 Because behind this really cool system that we built is the blood, sweat, and tears of all of our team members together. 22 00:02:09,830 --> 00:02:17,090 Yeah, and I mean, this is, as you've heard, we're three universities from, like, three different places in the country entirely. 23 00:02:17,090 --> 00:02:20,530 And so, you know, I'm sure every team has had trouble coordinating. 24 00:02:20,530 --> 00:02:24,210 But as you can imagine, there was a lot of Zoom meetings involved. 25 00:02:24,590 --> 00:02:34,050 But at some point, you kind of want to get together and, you know, hang out in person, meet the people you're working with, and really get down to it and build the system to the extent that you can. 26 00:02:34,190 --> 00:02:43,390 And then sometimes that ends up with everyone on the couch standing around and, like, trying to really figure out what to build and what to build next. 27 00:02:44,710 --> 00:02:47,350 And this includes, you know, several birthdays. 28 00:02:47,350 --> 00:02:53,730 We actually had a running joke, you know, we were together so often that a new hackathon actually just meant a new birthday celebration. 29 00:02:54,070 --> 00:02:57,050 We'd usually have, like, one or two at least during every single one. 30 00:02:57,050 --> 00:02:58,950 Yeah, we called it meeting time at some point. 31 00:02:58,950 --> 00:03:01,730 And of course, the troubles were not always virtual. 32 00:03:01,730 --> 00:03:08,070 Sometimes your car explodes, sometimes bees invade your house, sometimes you just run into problems. 33 00:03:08,130 --> 00:03:11,170 And you have lazy workers, you have people that like sleeping on the job. 34 00:03:12,050 --> 00:03:19,350 But yeah, so I think we're going to go a little bit through the main design principles of how we approach the problem. 35 00:03:20,550 --> 00:03:28,610 And we're going to go through what the system looked like for semifinals, because I think it's going to be very interesting to see how that evolved as the models got better. 36 00:03:28,630 --> 00:03:30,550 So do you want to walk us a little bit through? 37 00:03:30,550 --> 00:03:33,590 Yeah, well, so first, let's talk a little bit. 38 00:03:33,590 --> 00:03:38,570 For everybody who doesn't maybe necessarily know all the details of the AI Cyber Challenge. 39 00:03:38,650 --> 00:03:52,390 But the goal was to create an entirely autonomous system that from end to end is able to take an open source project, open source software, find a vulnerability, and then patch that vulnerability that you've found. 40 00:03:52,910 --> 00:03:54,610 Like I said, entirely autonomous. 41 00:03:54,610 --> 00:03:58,230 We, during the actual runtime of the competition, we just had to submit it. 42 00:03:58,230 --> 00:04:02,550 And then we waited, biting our nails, hoping that, like, it didn't burn down in its entirety. 43 00:04:04,070 --> 00:04:06,790 But so that's the basis of the competition. 44 00:04:06,790 --> 00:04:14,130 And in order to achieve something like this, we created a somewhat complex interconnection of components. 45 00:04:14,130 --> 00:04:21,090 But this is a big overview of what our semifinal system was that we were actually trying to build. 46 00:04:21,090 --> 00:04:22,630 Yeah, and I mean, in theory, right? 47 00:04:22,630 --> 00:04:23,170 In theory. 48 00:04:23,170 --> 00:04:27,970 I think a lot of the components on here ended up not looking as much as we'd expected. 49 00:04:27,970 --> 00:04:28,730 They transformed. 50 00:04:28,730 --> 00:04:29,650 They transformed. 51 00:04:29,650 --> 00:04:31,810 But yeah, I mean, there was... 52 00:04:32,550 --> 00:04:37,550 Do you want to talk a little bit about, like, how we approached it from, like, traditional analysis versus LLMs? 53 00:04:37,550 --> 00:04:42,970 Yeah, so back when this competition started in 2023, we didn't... 54 00:04:42,970 --> 00:04:46,790 First of all, we're all binary analysis, traditional program analysis people. 55 00:04:46,790 --> 00:04:47,890 We like bytes. 56 00:04:47,890 --> 00:04:49,190 We don't like source code. 57 00:04:49,330 --> 00:04:51,930 And this competition was entirely source code. 58 00:04:51,930 --> 00:04:53,310 And it's also LLMs, right? 59 00:04:53,310 --> 00:04:54,870 The AI Cyber Challenge. 60 00:04:54,870 --> 00:04:57,750 None of us know anything about AI, or at least we didn't, right? 61 00:04:57,750 --> 00:05:00,490 I feel like now we have a pretty decent grasp. 62 00:05:01,970 --> 00:05:08,450 But the goal was to take just any arbitrary open source project and see if we can find bugs in it. 63 00:05:08,450 --> 00:05:18,410 And we thought initially that, oh, we'll find some, you know, 10,000-line piece of software or maybe one of our own internal projects, see what we can come up with. 64 00:05:18,510 --> 00:05:22,310 But instead, the very first challenge that we got was what, Lucas? 65 00:05:22,310 --> 00:05:28,010 It was the Linux kernel, which dropped in, I think, December of 23. 66 00:05:28,710 --> 00:05:32,030 And we were at a hackathon when this dropped. 67 00:05:32,070 --> 00:05:37,310 And we were just testing on, like, our biggest test problem at the time, which had, like, 10,000 lines of code. 68 00:05:37,310 --> 00:05:38,450 Yeah, something like that. 69 00:05:38,790 --> 00:05:43,930 And then they dropped the Linux kernel, and it's, like, multiple millions of lines of code. 70 00:05:44,170 --> 00:05:51,590 And we just kind of, like, sat there and then proceeded to completely ignore that that happened and work on our system as it stood. 71 00:05:51,590 --> 00:05:52,470 Yeah, yeah. 72 00:05:52,470 --> 00:05:57,590 So there's a big difference between planning for 10,000 lines versus several millions. 73 00:05:57,590 --> 00:06:01,030 So that's where this big diagram behind us kind of came from. 74 00:06:01,130 --> 00:06:05,050 We first had to figure out how to ingest this, right? 75 00:06:05,110 --> 00:06:13,270 We had OSS fuzz projects that were coming in, and so we needed to figure out what do we need to build, what do we want to build, right? 76 00:06:13,270 --> 00:06:19,410 There's several components that we'll talk about later that require, like, five or six different build phases, right? 77 00:06:19,410 --> 00:06:21,370 So this isn't just one thing that's happening. 78 00:06:21,370 --> 00:06:31,690 And we started out in October, and one of the first goals was, like, okay, just get a running system that does some of this task fully automatic end-to-end, right? 79 00:06:31,690 --> 00:06:39,610 Because we were really kind of very scared that, you know, as you tend to do, if you over-engineer everything, then you might end up with nothing at the end. 80 00:06:39,610 --> 00:06:41,690 So that was kind of, like, the original goal. 81 00:06:42,030 --> 00:06:45,850 So let's walk through this diagram a little bit for everyone. 82 00:06:45,850 --> 00:06:47,650 So we start with our building. 83 00:06:47,650 --> 00:06:51,590 Then we go to what we call our POI generation, or point of interest, right? 84 00:06:51,590 --> 00:06:58,750 And this can be anything from static analysis, dynamic analysis, to asking the LLM, hey, can you see a bug here, right? 85 00:06:59,550 --> 00:07:01,510 Then we move to our point of interest. 86 00:07:01,510 --> 00:07:03,370 Which we definitely did in finals, too. 87 00:07:03,610 --> 00:07:05,010 Which was very effective. 88 00:07:05,170 --> 00:07:06,310 No, we did not do that. 89 00:07:06,310 --> 00:07:11,210 Which moved on to our POI validation stuff, which is really just fuzzing, right? 90 00:07:11,790 --> 00:07:21,050 Even if something says, hey, there's a bug here, like CodeQL, I'm sure everybody's seen thousands of alerts that say, hey, there's a really important bug here, you need to fix it right now. 91 00:07:21,090 --> 00:07:25,250 But if you don't have an input that can actually get you there, you don't know if it's really important. 92 00:07:25,250 --> 00:07:28,210 So that was one of the bigger challenges, I think. 93 00:07:28,210 --> 00:07:31,770 Yeah, and I mean, I don't think we started out building most of the systems. 94 00:07:31,770 --> 00:07:34,290 We kind of started out building the things we knew. 95 00:07:34,510 --> 00:07:38,770 So obviously the first thing was, like, we built the fuzzers. 96 00:07:39,870 --> 00:07:44,550 But very quickly we realized that there was one part of the problem that we couldn't really handle. 97 00:07:44,550 --> 00:07:46,750 And that was patching, right? 98 00:07:46,750 --> 00:07:51,370 Because we'd done literature research before into automated patching. 99 00:07:51,490 --> 00:07:58,970 And it generally kind of boiled down to effectively like, oh, I'm going to turn this less than or equal into a less than. 100 00:07:59,990 --> 00:08:00,950 But then... 101 00:08:01,570 --> 00:08:02,530 Oh. 102 00:08:03,330 --> 00:08:07,570 But that was the first kind of point where we started building in these LLMs. 103 00:08:07,630 --> 00:08:10,470 And then that kind of spurred the first couple components. 104 00:08:10,470 --> 00:08:13,590 Do you remember a couple of the ones that we did initially that were like... 105 00:08:13,590 --> 00:08:14,610 All the LLMs. 106 00:08:14,610 --> 00:08:29,750 I think we had like a query generator where we tried to automatically generate like CodeQL or SemGrep queries where asking the LLM, please, please, please, pretty please, generate us a well-formatted query for this. 107 00:08:29,750 --> 00:08:32,870 And back in 2023, it was GPT 3.5. 108 00:08:32,870 --> 00:08:34,370 That did not work. 109 00:08:34,410 --> 00:08:34,990 Yes. 110 00:08:35,050 --> 00:08:38,510 We tried our hardest, but it just could not get the format right. 111 00:08:38,510 --> 00:08:43,070 We added five or six other agents on top of it to try and well-form it. 112 00:08:43,070 --> 00:08:47,950 At this point, we were spending 10 minutes generating one query and it cost us like $10. 113 00:08:48,050 --> 00:08:48,450 Yeah. 114 00:08:48,450 --> 00:09:00,070 And I mean, in the semifinals, just for context, every team was limited to each target of $100 of LLM budget and I think 200 cores in total. 115 00:09:00,270 --> 00:09:03,150 And so we were really kind of strapped for cash. 116 00:09:03,150 --> 00:09:07,070 And so just spending $10 on a query that we're not really sure works. 117 00:09:07,070 --> 00:09:07,290 Yeah. 118 00:09:07,290 --> 00:09:17,950 Imagine your boss comes up to you and says, I need you to find an ODE in the Linux kernel, but you have $100 and I'll give you three machines in my closet. 119 00:09:18,950 --> 00:09:21,130 It was that kind of challenge. 120 00:09:21,130 --> 00:09:22,670 We were really scrappy. 121 00:09:22,670 --> 00:09:26,070 And then you do and you mess it up a little bit and then what happens? 122 00:09:26,210 --> 00:09:37,250 And then, you know, the funny thing about the early LLMs is that you could do things like ask it, hey, based on this stack trace, where do you think the bug is in the Linux kernel? 123 00:09:37,250 --> 00:09:41,650 And it says, oh, I see this Java exception in your Linux kernel. 124 00:09:41,650 --> 00:09:43,750 I think that's really important for you to fix. 125 00:09:43,750 --> 00:09:46,290 Yeah , there's definitely an index that went out of bounds. 126 00:09:46,290 --> 00:09:49,950 And I think what ended up happening was we forgot to give it the stack trace. 127 00:09:49,950 --> 00:09:54,010 We just forgot to put it in and the LLM just decided to make one up. 128 00:09:54,010 --> 00:09:57,170 Yeah, rather than saying, hey, I don't see the data that you're seeing here. 129 00:09:57,170 --> 00:09:59,010 It's a no, obviously there's a bug here. 130 00:09:59,010 --> 00:10:00,610 The user is telling me there's a bug here. 131 00:10:00,610 --> 00:10:07,530 Yeah, but I think what we kind of ended up boiling down to as the main components, do you kind of want to walk us through the main steps from start to finish? 132 00:10:07,530 --> 00:10:11,550 Yeah, yeah, so like I said, we have the building, we have the fuzzing, we have the poise. 133 00:10:11,550 --> 00:10:15,670 But remember, part of this competition is making valid patches, right? 134 00:10:15,810 --> 00:10:20,830 So we initially tried with, hey, you have this crash, you have this stack, this stack trace. 135 00:10:21,390 --> 00:10:23,190 Can you just make a patch, right? 136 00:10:23,190 --> 00:10:30,190 The stack trace tells you, oh, the line 173 in the C file is crashing. 137 00:10:30,310 --> 00:10:32,130 Can you fix this? 138 00:10:32,130 --> 00:10:35,750 And as it turns out, that's not really very effective, right? 139 00:10:35,750 --> 00:10:42,670 Because I'm sure anybody who's done any amount of triaging knows that the bug is not necessarily at the crash location. 140 00:10:42,670 --> 00:10:54,910 So we had to come up with a triage engine of a couple different components that was actually capable of looking at the crash locations and trying to identify, is the root cause really at the crash site, or do we have to look somewhere else for this? 141 00:10:54,910 --> 00:11:09,090 Yeah, and I think the general approach that we kind of followed with most of these LM components is we tried to build them the way we would solve the problem, and then tried to teach the model, at least in the early components. 142 00:11:09,090 --> 00:11:15,670 I think you were working on hooking it up to GDB and just trying to let it debug. 143 00:11:15,670 --> 00:11:18,710 Yeah, yeah, the early models were really not good with freeform input. 144 00:11:18,710 --> 00:11:22,770 They would really try and do everything, and I mean everything, that they could. 145 00:11:22,770 --> 00:11:25,870 You really had to constrain them in order for them to be able to work well. 146 00:11:25,870 --> 00:11:44,030 And I think that kind of translated into, for example, once you then, let's say the LM is able to magically guess where the bug is, or maybe it is a bug that is simpler to reason about and it figures it out, then when you have to produce a patch, oftentimes the LM is there also kind of constrained, 147 00:11:44,030 --> 00:11:45,610 at least at the time it was. 148 00:11:45,690 --> 00:11:53,970 So our patchers for semifinals, for example, would only ever patch one function at a time, and it couldn't do anything beyond one function. 149 00:11:53,970 --> 00:11:55,830 You had to really kind of shoehorn it in. 150 00:11:55,830 --> 00:12:02,130 I think this gave birth to one of the core tenets of our system, which is trust but verify. 151 00:12:02,250 --> 00:12:06,830 You have all of these LM components that can give you really good, really solid output. 152 00:12:07,050 --> 00:12:14,550 Some of them can one-shot bugs or tell you exactly, hey, this is the input that you need to reach this location, and it works. 153 00:12:14,790 --> 00:12:23,850 But for the other 90% of cases where it says, hey, here's the input, and you're like, this is a PDF, I'm asking you to generate me something for SQLite, right? 154 00:12:24,630 --> 00:12:31,890 You try... we have every single step, or every single phase, the output can be verified in some manner, one way or another. 155 00:12:31,990 --> 00:12:38,090 And then giving that feedback if that doesn't work to the LLM really seemed to help and improve the system as a whole. 156 00:12:38,130 --> 00:12:40,510 And I think every single component had something like this. 157 00:12:40,510 --> 00:12:44,890 Yeah, and I think even for most of the components, we tried to build in redundancy. 158 00:12:44,890 --> 00:12:53,650 So other than for the patching where there really wasn't an alternative, it was mostly we would build the LLM on the side, and we would have a traditional analysis component. 159 00:12:53,850 --> 00:13:01,050 So for example, for the fuzzers, we had grammar fuzzing, where the LLM would try to write input descriptions of what the input looks like. 160 00:13:01,930 --> 00:13:08,790 And then a fuzzer could take that and then explore the program state fully, or more extensively than it could otherwise. 161 00:13:08,790 --> 00:13:14,770 Yeah, I think... what do you think the coolest component is that we have in the system? 162 00:13:14,830 --> 00:13:17,110 I think in semifinals or in finals? 163 00:13:17,910 --> 00:13:19,110 Let's go finals. 164 00:13:19,110 --> 00:13:22,990 Okay, I think in finals, I think there's a couple cool ones. 165 00:13:22,990 --> 00:13:35,850 I think one of the cooler ones that I really like, which was where we ended up doing that, just ask the LLM where the bugs are, is one of the tasks in the AI Cyber Challenge was these Delta Mode tasks, where you weren't just given a source code project, 166 00:13:35,850 --> 00:13:40,350 but you were also given some changes to that project, and you had to find bugs that were introduced. 167 00:13:42,870 --> 00:13:46,330 And that actually turned out to scope the problem quite a lot. 168 00:13:46,330 --> 00:13:58,010 And that kind of led to us figuring out that we had built the C generation component, we literally just asked the LLM, write a Python script that reaches this specific vulnerability. 169 00:13:58,730 --> 00:14:05,270 And I think that was kind of like the red line through all the teams that everyone found worked surprisingly well. 170 00:14:06,110 --> 00:14:10,570 I think it's like traditional binary people and people who play CTFs all the time. 171 00:14:10,770 --> 00:14:20,810 We really thought that this would be a harder problem to solve, that our jobs were much harder and the machine could never do it, and we're really good and they're really bad. 172 00:14:20,810 --> 00:14:26,150 Yeah, but now we're excited to just point fingers of like, go here, go here, go here. 173 00:14:26,990 --> 00:14:36,710 But yeah, I think being able to restrict the problem like that turned the problem into something where it was like, oh, for $2, you can now validate your hypotheses. 174 00:14:36,710 --> 00:14:46,150 And as people doing science, that's pretty cool if you're like, don't have to spend thousands of dollars to just test single things. 175 00:14:46,150 --> 00:14:53,790 Well, speaking of spending thousands of dollars, I think my favorite component from our final system is probably the grammar generation. 176 00:14:53,790 --> 00:14:59,570 So for people who don't know, when you're fuzzing, you can also use grammars in some systems. 177 00:14:59,570 --> 00:15:03,930 And these are just formats that specify, hey, this is what a PDF looks like. 178 00:15:03,930 --> 00:15:05,770 Here's where the magic bytes go. 179 00:15:05,870 --> 00:15:09,250 Here's where certain groups or elements or something like that goes. 180 00:15:09,250 --> 00:15:19,710 So that you can generate well-formed inputs and you're not spending a million years inside fuzzing the parser when really you want to fuzz other functionality and other parts of it. 181 00:15:20,450 --> 00:15:32,590 But so we, and by we, I mean Lucas, ended up building this really cool LLM-based grammar component where you can say, hey, I want to reach this location in the program or I think this is an interesting area to explore. 182 00:15:32,690 --> 00:15:41,290 Let's try and generate grammar based on all the structs that you see along the way, along the data flow that you see along the way, and hit it. 183 00:15:41,490 --> 00:15:53,670 Yeah, and I mean, I think we built a lot of cool components into the system, but also one thing that I think is worth mentioning, especially in this context where we can explore a little bit further, is we had a lot of components that didn't make it. 184 00:15:54,470 --> 00:15:58,570 And we had a lot of components that were built for different types of the system. 185 00:15:58,570 --> 00:16:02,210 Do you remember some of the early ones where we were like experimenting that were like super cool? 186 00:16:02,210 --> 00:16:05,610 Yeah, I think, so this competition was really very cool. 187 00:16:05,790 --> 00:16:15,130 But ultimately it came down to memory corruption, command injection, and I think SSRF was the main kind of grouping. 188 00:16:15,890 --> 00:16:22,490 But before they had announced this list, we just kind of went freeform and tried to generate vulnerabilities for whatever we could. 189 00:16:22,490 --> 00:16:25,550 We explored with XSS for web pages. 190 00:16:25,550 --> 00:16:29,950 We didn't know that it was going to be constrained to only C and Java, so we're like, maybe there's some web stuff. 191 00:16:30,030 --> 00:16:31,710 We explored with CSRF. 192 00:16:31,710 --> 00:16:38,990 We actually had a really cool component with CSRF, which this is more of like a logic flow bug, right? 193 00:16:38,990 --> 00:16:50,330 For those of you who aren't familiar with the cross-side request forgery, it's essentially, can I do some action as like a non-authenticated user or someone else that's not supposed to do this? 194 00:16:50,330 --> 00:16:58,010 And this is more of a logic game of, can you deduce whether or not this action was taken when it was not supposed to be done? 195 00:16:58,010 --> 00:17:00,410 And it turns out that LLMs aren't too bad at this. 196 00:17:00,410 --> 00:17:07,830 Yeah, and I think even in Jenkins, we ended up finding one that was just patched a week before that the LLM definitely hadn't seen. 197 00:17:07,830 --> 00:17:15,430 Yeah, we had accidentally found a one day where you were able to leak all of the heap data, the heap stack data. 198 00:17:15,430 --> 00:17:16,530 Oh, the other one. 199 00:17:16,530 --> 00:17:18,930 Do you want to explain the screaming LLM? 200 00:17:19,270 --> 00:17:20,310 Yeah, yeah, yeah. 201 00:17:20,310 --> 00:17:35,590 So another cool component that we didn't actually have time to fully flesh out and maybe wasn't 100% accurate, but was very cool is OpenAI allows you to look at the actual probabilities of different log probes of your request. 202 00:17:35,590 --> 00:17:47,430 So we told the LLM, scream when you see a bug in the code, and then look at all of the tokens that it went through, look at the log probability, and see, hey, it actually spiked in this location. 203 00:17:47,930 --> 00:17:56,770 And more often than not, it turned out that it found things like, hey, this buffer that was allocated is allocated with a hard-coded size, or it looks like it's under allocated. 204 00:17:56,770 --> 00:18:03,730 And manually verifying this seemed to be true, but it gave a little bit too many false positives, I think, for our final system. 205 00:18:03,730 --> 00:18:18,190 And I think one thing that I like about these ideas that we can explore further is like, we were trying this out, and it actually turned out that you could pinpoint exactly when the LLM started screaming, and then you could kind of use that to identify like, 206 00:18:18,190 --> 00:18:22,710 oh, this is where the bug starts, and then, but we never really got to exploring that. 207 00:18:22,710 --> 00:18:23,430 No, no. 208 00:18:23,430 --> 00:18:26,690 But I think a lot of our components definitely evolved from semifinals. 209 00:18:26,690 --> 00:18:26,930 Yeah. 210 00:18:26,930 --> 00:18:29,810 What do you think, which one do you think evolved the most? 211 00:18:30,230 --> 00:18:35,150 I mean, I think by far the most was the triaging engine. 212 00:18:35,900 --> 00:18:46,350 The, we ended up with like multiple different triaging engine, one with like a more traditional approach that was doing statistics, and then you guys were doing the LLM. 213 00:18:46,350 --> 00:18:47,710 Yeah, we were doing some LLMs. 214 00:18:47,710 --> 00:18:51,550 So we had people who were doing fancy program analysis, right? 215 00:18:51,770 --> 00:19:09,530 Science, which really boiled down to like, fuzz a little bit, see the location that crashes, do a little crash exploration, see the areas that kind of crash, and then generate a list of probable functions of like, oh, I think the root cause is over here or within these like 10, 216 00:19:09,530 --> 00:19:10,290 20 functions. 217 00:19:10,290 --> 00:19:11,750 But that's not fun. 218 00:19:12,330 --> 00:19:14,450 That's like numbers and stuff, right? 219 00:19:14,450 --> 00:19:18,110 Why do that when you can just ask an LLM to do it for you? 220 00:19:18,590 --> 00:19:20,510 But it didn't quite work just like that. 221 00:19:20,510 --> 00:19:21,870 It did, it did. 222 00:19:22,650 --> 00:19:25,470 I'm maybe skipping over some more technical aspects, but yeah. 223 00:19:25,470 --> 00:19:28,410 It was, it ended up being very cool and very, very useful. 224 00:19:28,410 --> 00:19:28,650 Yeah. 225 00:19:28,710 --> 00:19:30,550 But I thought it was very fun. 226 00:19:30,550 --> 00:19:35,850 We ended up hooking up GPT to GDB, right? 227 00:19:35,850 --> 00:19:39,170 As well as JDB for Java, and that was a huge pain. 228 00:19:39,170 --> 00:19:39,430 Yeah. 229 00:19:39,630 --> 00:19:51,590 But giving it kind of like an early MCP server access that allowed it to do things like set breakpoints, run the program, alter arguments, inspect memory, these types of things. 230 00:19:51,590 --> 00:19:52,690 Look at pointers. 231 00:19:52,690 --> 00:19:55,390 Look at, it really likes looking at pointers. 232 00:19:55,390 --> 00:19:58,370 It looks, it likes looking at pointers a little too much. 233 00:19:59,010 --> 00:20:01,270 So we kind of, we stopped that. 234 00:20:01,270 --> 00:20:02,750 We stopped that in its track. 235 00:20:03,750 --> 00:20:07,070 But it was really cool to see our initial like, oh, freeform. 236 00:20:07,070 --> 00:20:09,530 Let's just give the LLM access to GDB. 237 00:20:09,530 --> 00:20:10,930 That was very bad. 238 00:20:10,930 --> 00:20:13,850 But when you say, hey, you can set only breakpoints. 239 00:20:13,850 --> 00:20:17,890 You can step through a couple times and then see what happens. 240 00:20:17,990 --> 00:20:18,570 Reformulate. 241 00:20:18,570 --> 00:20:20,250 Tell me where you want to look at next. 242 00:20:20,250 --> 00:20:23,010 Tell me what's likely to have happened. 243 00:20:23,010 --> 00:20:27,990 And then go through this whole cycle again until you reach what you think is the actual root cause. 244 00:20:28,370 --> 00:20:33,790 And I think we had about a 60 to 70% success rate with finding the root cause in that approach. 245 00:20:33,790 --> 00:20:42,490 And one thing I really liked about that was I'm always, I've always been kind of more, it kind of illustrates the differences of opinion in our team even. 246 00:20:43,090 --> 00:20:48,490 I've always been of the opinion that you just take the expensive model, you throw it at it, it'll be much better. 247 00:20:48,750 --> 00:21:05,210 But then they were trying out the debugging stuff and all of a sudden one of the cheap ones like 4.0 ended up being as good as the expensive one, but it was like 20 times cheaper so you could run it 20 times longer and all of a sudden the output was better. 248 00:21:06,790 --> 00:21:12,690 And that was, I'm still not quite sure I believe it, but I can stand corrected. 249 00:21:12,690 --> 00:21:24,490 I think that was the real science that I had done is matrixed pretty much all of the large providers and the models that they had and then ran it against our set of inputs and expected outputs. 250 00:21:24,510 --> 00:21:39,070 And it came out that GPT 4.1 mini, I think, had about a 90% success rate where GPT 4.1 regular had 95% success. 251 00:21:39,070 --> 00:21:45,930 So it was only a marginal jump in terms of ability, but it would cost 10 times less. 252 00:21:45,930 --> 00:21:51,730 Yeah, I mean, I think we built a lot of cool stuff for semi-finals, but I think we have about five minutes left. 253 00:21:51,730 --> 00:21:53,690 So we should skip a little bit ahead. 254 00:21:53,890 --> 00:22:01,570 So one thing I think is our system from semi-finals, there was a lot of engineering went into just building the system, right? 255 00:22:01,570 --> 00:22:05,450 Because artificial had to run fully autonomously. 256 00:22:05,450 --> 00:22:07,510 We couldn't touch it once it started. 257 00:22:07,510 --> 00:22:09,730 There was no introspection whatsoever. 258 00:22:09,930 --> 00:22:16,110 And so that requires a lot of engineering and making sure there's like redundancy and foolproof stuff. 259 00:22:16,650 --> 00:22:24,350 But by the end, we had a pretty modular design system that we could plug and play in components and test them out. 260 00:22:24,350 --> 00:22:27,950 Yeah, I'm sure this is all very legible to everybody sitting down. 261 00:22:28,390 --> 00:22:32,670 But this huge spider web essentially represents our entire CRS. 262 00:22:32,670 --> 00:22:34,330 It is from left to right. 263 00:22:34,770 --> 00:22:36,890 Left is input and right is the output. 264 00:22:36,890 --> 00:22:42,970 But you can see that there's a ton of interconnected components that happen along the way that's all feeding into each other. 265 00:22:42,970 --> 00:22:47,030 Uh, we can skip this a couple of these slides. 266 00:22:47,030 --> 00:22:48,950 But this is where we initially had started. 267 00:22:48,950 --> 00:22:52,190 You can see there's like, I don't know, 20 components maybe. 268 00:22:52,210 --> 00:22:55,410 And I think five survived to the end of finals. 269 00:22:55,810 --> 00:22:59,770 For semi-finals, we ended up generating something that looks like this. 270 00:23:00,050 --> 00:23:03,010 You can see there are 25 to 30. 271 00:23:03,010 --> 00:23:06,790 Some fish that are swimming backwards, which was intentional for sure. 272 00:23:07,510 --> 00:23:09,210 Representing the data flow. 273 00:23:09,210 --> 00:23:09,690 Yeah . 274 00:23:11,770 --> 00:23:15,670 And then this is actually our submission to the semi-finals. 275 00:23:16,730 --> 00:23:20,250 Real quick, Shellfish does everything late. 276 00:23:20,570 --> 00:23:23,570 This is something that we cannot change about ourselves. 277 00:23:23,570 --> 00:23:29,130 I think this was maybe 30 minutes before the actual final submission, where we'd be toast. 278 00:23:29,130 --> 00:23:32,190 But we ended up getting all the GitHub actions to run. 279 00:23:32,190 --> 00:23:35,270 And we ended up getting lucky because they extended the deadline by a day. 280 00:23:35,270 --> 00:23:36,110 They did, they did. 281 00:23:36,110 --> 00:23:36,930 But we were ready. 282 00:23:36,930 --> 00:23:37,710 We had submitted. 283 00:23:37,710 --> 00:23:38,010 Yes. 284 00:23:38,010 --> 00:23:38,870 We had submitted. 285 00:23:39,050 --> 00:23:43,130 And this whole thing landed us as one of the semi-finalists in the competition. 286 00:23:43,130 --> 00:23:46,090 One of the seven teams out of, I think, 40 plus. 287 00:23:46,090 --> 00:23:46,370 Yeah. 288 00:23:46,370 --> 00:23:49,510 That managed to submit a fully functioning CRS. 289 00:23:49,550 --> 00:23:53,230 Yeah , I like to think it was 42 just because I like the Hitchhiker's Guide reference. 290 00:23:53,230 --> 00:23:54,130 Okay, okay. 291 00:23:54,130 --> 00:23:55,550 I'm sure there's a real number somewhere. 292 00:23:55,550 --> 00:23:56,110 Yeah. 293 00:23:57,590 --> 00:24:01,250 And I have to say thanks to all of our wonderful team members. 294 00:24:01,510 --> 00:24:03,350 This is our semi-finals team. 295 00:24:03,350 --> 00:24:05,770 You can see we have like 20 or 30 people up here. 296 00:24:05,770 --> 00:24:10,390 All of them contributed greatly to the actual end of the competition. 297 00:24:10,390 --> 00:24:10,910 Yeah. 298 00:24:12,010 --> 00:24:16,430 But let's dive a little bit into the finals because I think our system wasn't quite the same. 299 00:24:16,430 --> 00:24:21,770 And I think one of the biggest ones was the massive increases in resources for finals. 300 00:24:21,770 --> 00:24:27,690 So we had said that for the semi-finals it was $100 of LLM and like three machines. 301 00:24:27,690 --> 00:24:30,110 For finals we had how much, Lucas? 302 00:24:30,110 --> 00:24:36,690 I think it was like $50,000 of LLM credits and like $80,000 of Azure Compute. 303 00:24:36,690 --> 00:24:38,690 So that buys you a lot of fuzzing cores. 304 00:24:38,690 --> 00:24:40,690 It also buys you a lot of prompts. 305 00:24:40,690 --> 00:24:48,130 Yeah, each one of these boxes you see up here is a different 64-core machine that we were actually running our entire CRS on. 306 00:24:48,130 --> 00:24:50,570 Yeah, and just seeing it come up and down was super cool. 307 00:24:50,570 --> 00:24:50,950 Yeah. 308 00:24:50,950 --> 00:24:59,310 But I think one thing that's also cool is because we now had a running system, we were able to add a lot more components that we only had for finals. 309 00:24:59,310 --> 00:25:02,830 Do you have a couple ones that you liked for the ones that we added after? 310 00:25:02,830 --> 00:25:04,750 That we added after the semi-finals? 311 00:25:04,750 --> 00:25:07,350 I mean, after getting the actual GDB stuff to work. 312 00:25:07,350 --> 00:25:08,510 That was pretty nice. 313 00:25:08,550 --> 00:25:14,710 I think maybe our several different approaches to one-shot bug discovery. 314 00:25:15,250 --> 00:25:21,670 Initially, we had just one component that would look at set syncs in Java and attempt to generate a seed that reached there. 315 00:25:21,670 --> 00:25:24,410 But afterwards, we're like, LLMs are actually pretty good now. 316 00:25:24,570 --> 00:25:26,930 We can just give them a couple pieces of input. 317 00:25:26,930 --> 00:25:30,110 We can give them CodeQL queries and we can say, hey, hit this location. 318 00:25:30,110 --> 00:25:32,930 I think we had two, three different components? 319 00:25:32,930 --> 00:25:33,450 Two? 320 00:25:33,450 --> 00:25:35,510 We just had different instances of the same. 321 00:25:35,510 --> 00:25:36,430 I see, I see, I see. 322 00:25:36,430 --> 00:25:44,610 One thing that also I think goes under the radar a lot is that a lot of the things we built were built for the LLMs of that time, right? 323 00:25:44,610 --> 00:25:51,910 So one other shift that happens a lot is as the models get better, we can trust them to do more of the job. 324 00:25:52,370 --> 00:25:59,490 So for example, for the grammar writing, initially, it was like, oh, go from function A to B. 325 00:26:00,230 --> 00:26:05,630 But then as these models got better, we were like, oh, you want to decide yourself where you're going to go? 326 00:26:05,630 --> 00:26:06,270 Go for it. 327 00:26:06,270 --> 00:26:08,910 Set yourself some goals and just run wild. 328 00:26:09,030 --> 00:26:14,590 I think the other thing that helped was the context for the models quintupled in size by the time of finals, yeah. 329 00:26:14,590 --> 00:26:16,250 Yeah, and also for patching, I think. 330 00:26:16,250 --> 00:26:18,870 Do you want to talk a little bit about how the patching changed? 331 00:26:18,870 --> 00:26:19,530 Yeah, yeah. 332 00:26:19,530 --> 00:26:25,410 So the patching went from just we have this root cause to give me the patch. 333 00:26:25,410 --> 00:26:33,930 You can see we have this big knowledge base behind us that represents every single piece of vulnerability that we found to root cause that we triaged to patch that was generated. 334 00:26:33,930 --> 00:26:36,290 And we were actually able to link these things together. 335 00:26:36,730 --> 00:26:46,090 And during this whole time, we were running every patch that we produced against every input that we also produced to create this huge graph of what's actually best at patching what. 336 00:26:46,090 --> 00:26:54,530 Because sometimes you would get patches that only slightly extended a buffer boundary, so your crash no longer crashed, but anything new would probably also crash it. 337 00:26:54,530 --> 00:27:04,350 So we ended up being able to integrate this and use this knowledge base to say, hey, we only patch four of these 10 vulnerabilities and this other patch patches seven. 338 00:27:04,350 --> 00:27:06,850 Here's all this information, generate a better patch. 339 00:27:06,850 --> 00:27:08,690 And it turns out that that works pretty well. 340 00:27:08,690 --> 00:27:22,070 Yeah, and then as our knowledge base grows, right, we also added more components to do this where one thing I really liked from the organizer side was that your patches had to survive everyone else's attempt to break them. 341 00:27:22,990 --> 00:27:32,550 And so we have a lot of stuff in our patches that we fuzz them for a while to make sure that the surrounding area is also safe. 342 00:27:32,550 --> 00:27:35,030 But we also send LLM agents there. 343 00:27:35,650 --> 00:27:39,530 And then that allows us to even better cluster bugs together. 344 00:27:39,950 --> 00:27:41,830 I think we're out of time here. 345 00:27:41,830 --> 00:27:43,710 Sorry for yapping so long. 346 00:27:44,090 --> 00:27:45,330 But I would like to... 347 00:27:45,330 --> 00:27:48,290 I've stopped the screen somehow. 348 00:27:48,790 --> 00:27:50,350 Yes, you can see this. 349 00:27:50,350 --> 00:27:53,890 Just a big shout out to everybody for our finals team who managed to make it. 350 00:27:53,970 --> 00:27:56,070 This was a huge endeavor for two years. 351 00:27:56,070 --> 00:27:58,470 We all sacrificed so much to actually make it. 352 00:27:58,470 --> 00:28:00,870 Yeah , I think like 40 plus people at some point. 353 00:28:00,870 --> 00:28:04,850 Yeah, in total, the amount of people that had touched the system was probably about 40 plus. 354 00:28:04,850 --> 00:28:05,710 Yeah, yeah. 355 00:28:05,710 --> 00:28:07,310 And we couldn't have done it without them. 356 00:28:07,330 --> 00:28:09,050 Yeah , well, that's our time. 357 00:28:09,050 --> 00:28:09,730 Thank you , guys.