Alright, so yeah, let's get started. So I want to start off by introducing the team. This was a long and fun, most of the time, road getting here. It took a lot of people, and it took a lot of effort, and I want to start off by acknowledging those people. Several of them are here today to help talk about Buttercup and some of the technical decisions we made. But some of them aren't, so I want to make sure that they're recognized here. So I'll start off. I was already introduced, I was the overall team lead for both the semifinals and the finals, and I was also the lead designer of the Buttercup system. I was the primary author of the original concept paper that won the white paper contest. My co-designer for this is Ian Smith. He was also the lead on our vulnerability discovery component for the semifinals and finals. Ron Etcheson, here today with us, he was in charge of AI-based seed generation, and he was in charge of that for both the finals and the semifinals. Henrik Brodin was our orchestration lead for the finals. In the semifinals, we had Eric Kilmer and Francesco. Here they were co-leads for that in the semifinals, but had to go work on other projects for the second half of this competition. Ricardo was in charge of our patcher. Some truly Herculean efforts from him, building our rather complex patching system. Evan Downing, also here with us today, ran contextualization. And then we also had a couple of code mercenaries that helped us out along the way. Boyan was one of the system developers. He worked with us on the semifinals and the finals. We also had a couple of people that worked as an internal red team. We had them tasked with building out challenges that would stress the capabilities of Buttercup along the way. So I want to acknowledge Alessandro and Brad for working on building some of these extra challenges that made up our test set for both the semifinals and the finals. And last but not least, there's a couple of other folks who helped us out in the beginning. In the semifinals, with some various tasks, so that's Akshay, Will, who's in the audience. Raise your hand, Will. Hi-er. Eric's over there, too. Raise your hand, too, yeah. And then Alan Sally is not here today. All right, so I'll start off with a brief origin story. I know most of you probably know what the AICC is. But just in case you don't, in case you've wandered in here from one of the various other villages, the AI Cyber Challenge is a two-year competition where teams are tasked with designing novel, automated, and AI-driven cyber reasoning systems that can automatically find and patch bugs in open-source software. There are three components to the AI Cyber Challenge. The first was a small business track white paper contest where seven teams won a million dollars in seed funding to participate in the competition by submitting concepts for their cyber reasoning systems. Trail of Bits was one of those teams. The semifinals was held last year at DEF CON where 39 teams participated. Seven teams advanced to the finals. We were obviously one of those teams as well. And then the finals were held here at DEF CON this year with the top three teams all receiving cash prizes. We were the second place finishing, so you actually can't see it down there, but we, yeah, Buttercup finished second, and this is now the end of the competition. So if you're not familiar with how it's structured, this is a very brief overview. Each team creates a cyber reasoning system. They deploy their code onto a competition organizer-provided infrastructure. It doesn't have access to the internet, but it does have access to third-party LLMs and a competition API. The cyber reasoning systems get tasked with challenge projects, which look like open-source code repositories. They're given a certain amount of time and money to try and find and patch vulnerabilities within those challenge projects. And when they find the vulnerabilities, they're able to submit this to the competition API and score points. If they're able to find vulnerabilities, they're able to then try and patch them, which they can also score additional points, but this is still subject to the original time and money budget per challenge. All right, so let's talk a little bit about the design of Buttercup. As I mentioned before, we originally submitted a concept before the rules of this competition were clear, but our guiding principles from the beginning were an acknowledgement that conventional software analysis is really good at solving certain problems, and AIML-based approaches work really well for certain problems, and oftentimes they're complementary. So, our goal was to break down this problem end-to-end of finding and patching vulnerabilities and choose the best technique to solve each sub-problem. And most importantly, we want to acknowledge that large language models have limitations. They also have a lot of power for developing systems that work at scale, but we don't want to ask LLMs to do things that they're not good at because that's counterproductive. So, when we broke the problem down, we fundamentally had to do four things. We had to discover and prove the existence of vulnerabilities, contextualize vulnerabilities so that we can use large language models for certain tasks, we need to create and validate patches, and then we need to orchestrate all these tasks effectively and scale them so that we can maximally use our resources and maximize our score. All right, so this I am not going to describe everything on here. This was actually our original concept, which was tremendously more ambitious than what we actually built. This was largely a design that myself and Ian came up with before we knew the rules of the competition. Once we actually came into contact with the rules, it turns out some of the things we wanted to do were illegal, so we had to get rid of those. It turns out some of the things that we wanted to do were not going to work within the competition API structure, so we had to can those. Ultimately, we came out with the pipeline that you see here. Ultimately, Buttercup has an orchestration system that takes challenge projects, it downloads them, pushes them through a vulnerability discovery phase where we use a combination of static analysis, dynamic analysis, and large language models to discover vulnerabilities in systems. We have a contextual analysis phase, which gathers up additional code facts that we need to do effective patching and effective vulnerability discovery on subsequent rounds. And this information is also fed to our patch generation agent, which is a multi-agentic system that creates patches, validates them, makes sure that they work, makes sure that they fix the vulnerabilities that we discovered, and also more importantly, that they don't clobber other functionality. Alright, so with all of that said, we spent three months working on Buttercup in the semifinals. We submitted it and we took it to DEF CON last year, where we did quite well. So if you're not familiar with what this looks like, these are achievements that each cyber reasoning system won throughout the semifinals. Achievements we're giving for being the first team to find a particular vulnerability, or the first team to patch a particular vulnerability. So these are like first blood style bounties. This doesn't mean that other teams couldn't also find these vulnerabilities and score points, it just meant that we were the first. So the vulnerability, or the achievements that you see boxed in red, were ones that were won by Trail of Bits. We won 10 of them, and I think there's about 42 total achievements that were given. We did quite well in the semifinals, and as I mentioned already, we did advance to the finals. This is a readout of the heat map of the five different challenge projects, the vulnerabilities that were discovered and patched by all teams collectively. The ones marked with our company logo there are the ones that we received achievements for finding and patching first. So if you take a look a little bit deeper in the data, and you look at how we perform by different CWV types, you'll see that we did quite well on C challenges. Any type of vulnerability we were able to find, we were also able to patch. But we also did have some gaps. Notably, we had something go wrong with Java tile challenges. We actually still don't know what happened, because some of the data we needed was never made available. But, you know, spoiler alert, we did fix it for the finals. So we did have some, you know, we had quite a bit of work to do. We didn't run away with the semifinals. We were kind of in a cluster of three teams at the top. Alright, so now let's talk about what I think most of you are really here to see, which is what our finals winning CRS looks like. So I'll start off by kind of summarizing some of the lessons that we learned in the semifinals. Ultimately, we were successful, so it kind of validated our approach, but we obviously acknowledged the big gap for handling Java style challenges. And we also identified some shortcomings in our vulnerability discovery pipeline, where we were kind of missing out on certain types of vulnerabilities, certain CWB types. There were also a number of rule changes for the finals that changed how Buttercup 2.0 looked compared to Buttercup 1.0. Namely, that the scale was massively increased. In the semifinals, we had four hours and $100 to process each challenge project. And in the finals, everything was grouped together, but we had in the final round, we actually had like $50,000 in LLM credits, and I think $80,000 in compute. So a massive scaling challenge was part of our effort for Buttercup 2.0. There's also a little bit of some more complex scoring changes added. Static analysis alerts were added that had injected an element of uncertainty. They could be true positives, false positives, but ultimately we don't want to dig too much into the weeds on that. So because of a lot of these changes and a lot of the lessons learned, we basically built Buttercup 2.0 from scratch. We started over. We carried forward a lot of code, particularly from our patching system, but a lot of the infrastructure changes really made it clear that it was better for us to start over from scratch and not carry forward any of the technical debt that we had on the first version of Buttercup. And a big part of this is that we wanted the ability to easily change the scale and cost of deployment for the various rounds. One quirk of the finals for AICC is that they actually had exhibition rounds. We had practice rounds, and they were progressively increasing the scale and number of challenge projects that we had to face. So we didn't want to have to reconfigure the system for a week before each round. We wanted to be able to easily reconfigure it. But ultimately our high-level concept for Buttercup remained the same as it did in the semifinals, which, if you recall, looks like this. So I've been talking for a while, and now I want to hand it over to some of the really talented people on the team who led various aspects and let them talk about some of their technical aspects of their components. So first, Henrik. Hi. Thank you. So I'll say something about orchestration. And orchestration is the glue that connects all these other components that finds and patches bugs that my amazing colleagues built. And I'll talk specifically about submission processing, as I think that's probably the most interesting part. That is the part that decides how, what, and when we submit to the competition API. And we chose a somewhat conservative approach, as we wanted to maintain a high accuracy score, or accuracy multiplier for our project. And some of the guiding principles for this was that we always required a POV, and a POV is like an input that triggers a vulnerable state in the program or a crash. Further, we also actually never claimed that a serif broadcast would be invalid. And this was done to maximize our confidence in the submissions. Also, for the actual process, we had like four main steps. And the first step is that we would filter out any trivially duplicate POV by just looking at stack trace information. Second step would be that we look at POVs that have similar stack traces and group them together, and we consider them examples of the same underlying vulnerability. And the third step is that we would look at the patches. If a patch remediates several POVs, we would also group those POVs together, as we would consider that patch remediating a single vulnerability. And finally, we would monitor as we get more and more POVs from fuzzing and other components to make sure that the patches are still valid and fixes the problem. And this all results in us trying to submit a single bundle for a group of POVs that we consider representing the underlying vulnerability, along with a patch that remediates it, and potentially a serif broadcast as well, if applicable. So, some notes about the orchestration and submission processing. Thank you. All right, thanks, Henrik. All right, next up is Ron Acheson. He's going to talk about our vulnerability discovery component. Yeah, so the vulnerability discovery strategy at a high level was combined fuzzing with LLM input generation. So first, on the fuzzing side, we used standard OSS fuzz fuzzers, we used LibFuzzer and Jazzer, and we had many fuzzing workers that ran short campaigns on the available harnesses, and then we merged the corpuses from these fuzzing workers using a merger bot, which only preserved inputs that increased the code coverage. And so we had a shared corpus for each harness that we were fuzzing. Then we also had the LLM input generation component that contributed to the same shared corpus that the fuzzer used. So this is how we had the LLM feed inputs that would then benefit the fuzzer. So now to dive into the LLM component a little bit more. So, for the LLM component, which I worked on, there were basically two main goals. The first goal, as I mentioned on the previous slide, was to support fuzzing. We knew that we could use LLMs to create inputs that would bootstrap the fuzzer and that would unblock the fuzzer. So that was the first goal, and we had a couple tasks that were designed for that, to support that goal. And these tasks looked like LLM agents that would use tools to collect context about the codebase and then generate inputs to support that goal. And then the second task was to do independent vulnerability discovery. And so this meant basically a task that was similar to the other tasks, but was more expensive to allow the LLM to explore the codebase a sufficient amount and reason about bugs, test the hypotheses, and create inputs that could trigger bugs that it identifies. And then for that workflow, any inputs that it found that trigger a bug, it would submit those independently of the fuzzer. So those were the two tasks that the LLM component worked to support. Alright, thanks. Up next is Evan to talk about our contextualization section. Sure. So one of the goals that we had as well was to create something called a program model, which allowed us to extract various properties from each challenge source code. So specifically we used two popular static analysis libraries, TreeSitter and CodeQuery. And what this did is allowed us to extract various properties about the source code repository, like function contents, call graphs, types, etc. And what we did is we packaged this all up into our own library and allowed the LLMs for both the patcher and the C generator using Langraph's tool library to interface and query those different properties. So for example, if the patcher started with a specific function and it realized that that function made different calls to its callers and callees, it could query this static analysis library for the answers to those questions. All right, next is Riccardo to talk about the patcher. Yeah, the patcher was a multi -agent system with three main agents working together to generate the patch. And the data flow between these agents were mainly programmatic , so are coded into Buttercup's codebase so that we had more control over the whole process and we could insert more checks and guardrails around LLM calls. However, when one of these agents failed, we relied on LLM to unblock the process and resolve the issues. In terms of the codebase, the whole patcher is less than 6,000 lines of code, it's all Python, and we use Langchain and Langraph for implementing the multi-agent system. We also use, as a main model, the OpenAI GPT 4.1 without reasoning, although we fall back to Cloud Sonnet 3.7 in case something happened to OpenAI. Next slide, please. So this is the overall architecture of the patcher. We have as input a vulnerability with a stack trace, and the first thing the patcher does is retrieving additional context through the contextualization part that Evan just talked about, like retrieving type definition, code definition around the functions mentioned in the stack trace. And also, we were looking for test instructions in the project, because they were not always given by the organization, so we tried to determine these instructions ourselves. All this context goes to the first agent, which is the security engineer agent, that tries to determine the real root cause of the issues described in the stack traces. And it provides this analysis to the next agent, the software engineer agent, that takes the root cause analysis, the stack traces, maybe the diff if it's available, and plan a strategy , essentially, to patch the code base. It then implements the patching strategy, and this patch goes to the quality engineer agent that actually validates the patch by building it, trying to see if the POV was actually fixed, and then checking whether we broke any functionality test. And then there were some extra validation steps involving LLM to actually ensure the patch did not accidentally fix the RNS code, or other files that were not allowed by the competition. And this is the process when everything goes right, but, of course, some steps can fail, and in that case... Next slide, please. In that case, these agents go to another agent, which is the reflection agent, that takes the overall state of the patching, the error that was generated, and extra information, and tries to determine what to do differently in order to unblock the patching process, where to go, if the POV was not fixed, maybe we need to generate a new root cause analysis, or maybe we need to do a different patching strategy, and so on, or maybe we need to retrieve additional context about the project we are analyzing. So we go in this loop until we find a good patch. And that's the patcher, how it works. All right, thanks, guys. All right, so how did we do in the finals? So the finals for AICC consisted of three exhibition rounds and one final score round. The exhibition rounds didn't count towards the final score. They were basically practice rounds for us to work out bugs and kinks with deploying Buttercup at scale, and then also figure out with some stylized examples how well we were actually doing. So we were the best performing cyber reasoning system in round one, but this was admittedly a bit of a small round. It consisted of two different challenge projects, each with one synthetic vulnerability inserted. So Buttercup found both vulnerabilities and was able to patch both vulnerabilities, and it also did so without submitting any incorrect POVs or any incorrect patches. So other cyber reasoning systems found the vulnerabilities, but some of them had submitted some incorrect patches, and others did not find all the vulnerabilities and did not patch all the vulnerabilities. Also interesting was that Buttercup was really resource non-intensive. In that first round, we had a $30,000 budget available for compute and large language model credits, and we used less than $1,000 to get the best result. So naturally, we were kind of riding high into exhibition round two, where we completely barfed and broke on the first batch of challenges, and for a while there, we were not quite sure what went wrong, and we were a little down on ourselves, but ultimately found that we had a relatively small and kind of trivial bug. Basically, we were using some system data to name certain files within our system, and depending on the type of challenge, those file names could get too long, and they could cause a hard crash that even the magic of Kubernetes couldn't restart and fix. So it turns out that we had actually crashed and barfed on that first round of challenges, but it wasn't because of any of our ability to process or any other shortcomings of the system. We later found out that when we re-ran this on our own schedule, that we actually performed quite well, even though in the actual round we were only able to process about three of the 18 challenges they sent us. So I'm happy to say we bounced back in exhibition round three. There were about 26 challenges that we were provided, and we found and patched vulnerabilities in 20 of them. We didn't have any information for how other teams were doing. We had to wait until the finals to find that out. And here in the second round, or the scored round, Buttercup came in second place, winning us a $3 million prize. So out of the various challenge projects, we found 28 different vulnerabilities and were able to make patches for 19 of those vulnerabilities. We had a rather large budget, and we only used $40,000 of it. That was pretty evenly split between compute and large language model credits. And we also achieved a greater than 90% accuracy, which was one of our keys to success. Digging into the data a little bit, we haven't had a ton of time to look into this. We'll have more on our blog about this in the coming months as we get a chance to look through all the data that we get from DARPA and dig through it. Looking at our achievements on the tablets outside of the booth, we figured out that we were able to find at least one POV that nobody else did. So we were able to cover some ground that other cyber reasoning systems weren't covering. We also found at least one non-synthetic vulnerability, which we're not 100% sure right now because we haven't looked at it, whether that constitutes Buttercup having found a zero day, like an honest-to-goodness vulnerability that the organizers didn't know about, or if there was some sort of issue where it was maybe introduced by some of their synthetic vulnerabilities, but they weren't aware of it. We have to dig into that a little bit, but we've proven that Buttercup can find vulnerabilities in real-world systems. We can run it at scale, and it can be quite successful with relatively low costs. So you might ask, like, how did we come in second place? The keys to our success, if you look at the scoring algorithm, really came down to accuracy and doing well on all tasks. So a couple of cyber reasoning systems were kind of in the same cluster as us, kind of vying for second, third, and fourth place, but we had 90% accuracy, whereas the third place finishing team had only 45%. They had a higher tolerance for false positives, and our lower tolerance for false positives ended up netting us second place. Also, the fourth place team, or the fifth place team, I'm not quite sure, I have to look at it again, but there was one team that scored lower than us, but found more vulnerabilities, but they were less successful at patching them, which was worth significantly more points in this competition. So by doing well at all phases of the competition and being highly accurate and eliminating false positives to the maximum degree possible, that's what got us into second place. All right, so you might be asking yourself now, okay, I want to try it. I want to see what this thing is all about. So, you're in luck. We've open-sourced Buttercup. We've open-sourced both the original source code as we submitted it for the semifinals and for the finals. So you can see the full-scale, unadulterated, messy versions of Buttercup if you like. Fair warning, these are code bases that are fairly coupled to the competition infrastructure that was provided to us by DARPA. They aren't very user-friendly. So over the last month, we've been hard at work building you a stand-alone variant of Buttercup that you can download and it's scaled down to run on your laptop. So there's an example challenge that was an actual challenge that was used in some of the exhibition rounds. And even on your laptop, you can run Buttercup, you can install it with a couple of commands, and you can find and patch a vulnerability in less than an hour on a commodity hardware. So we really believe in making the security tools that we build available to everybody so we can improve the state of security for everyone. And that's why we've made our version of Buttercup available and we intend to maintain it with a portion of the winnings that we've won here in the finals for AICC. So you can get all of these now. They're open source right now. They're on GitHub and we also have a couple of blog posts on our website detailing how to use them and how to get the most out of them. So we hope you enjoy those and that is the end of our talk. Four minutes ahead of time. Thank you very much.