start	end	text
16420	21900	We are team All You Need Is a Fuzzy Brain.
21900	27380	We're actually very excited to have the opportunity to speak here.
27380	31940	As you can see, we have four members of our team here.
31940	34740	Actually, we have eight in total.
35060	41360	Most of them are Texas A&M students and faculty members.
41360	43740	My name is Jeff Huang.
43740	49040	I'm a professor of the computer science department at Texas A&M.
49040	52240	I'll let these folks introduce themselves.
52560	54020	Hi, everyone.
54020	55220	My name is Zixuan.
55440	58660	I'm a PhD student of Professor Huang.
59320	62880	I'm honored to be here to share the ideas of our CRS here.
62880	64140	Nice to meet you guys.
64140	65520	Enjoy DEF CON.
66120	68740	Hi, my name is Matthew Woodcock.
68740	72520	I am going into my sophomore year of undergraduate, actually.
72520	77180	Also at Texas A&M, and I've had the privilege of working with Dr.
77180	78620	Huang and the entire team.
78620	79520	It's been wonderful.
80160	84020	Hi, I'm Qingxiao Xu, and I'm also a graduate student.
84020	89700	And I'm very happy to be here and to share our great CRS work with you guys.
89700	91180	Thank you.
91260	92740	Go to the next slide.
96380	108780	Okay, the first most important part I want to show the first slide is we have formally open sourced our CRS.
108840	118440	The top one is the version that we submitted for the AICC finals.
118760	123240	So this is identical to whatever was submitted.
123240	128040	At the same time, we have a local version, which is on a different branch.
128040	135040	So this branch will allow you to run on your desktop with a Docker image.
136000	140540	We also open sourced our semi-final CRS.
140540	143780	So the third one was actually very, very simple.
143780	149180	It actually contained only maybe 500 lines of Python code.
150500	153860	Okay, so go to the next one.
154620	167860	First of all, I want to spend some time talking about the name because this is probably the biggest lesson we have learned throughout this challenge.
168060	170980	All you need is a fuzzing brain.
170980	177520	As you can easily tell, this was inspired by the famous transformer paper.
177520	184020	But what's interesting here is the brain is not fuzzing.
184380	189260	I know most folks here in cybersecurity love fuzzing.
189260	195920	But what I want to say or what we want to say is the big thing here with AI is the brain.
195920	204940	We can see the large language models as the brain of our system versus fuzzing is actually minimal.
204940	207420	If you go to the next slide.
208440	214840	In fact, in our entire CRS, we had minimal fuzzing.
214840	217800	In the semi-final, we had zero fuzzing.
217800	226340	In the finals, we had a very basic version of fuzzing, which turns out had minimal influence in our whole system.
226340	238020	If we just take out those fuzzing components in our final CRS, I would say our score won't change at all.
238380	243500	Typically, if you run our CRS, you will see some things like this.
244860	247240	Fuzzing was not performed.
248220	255500	You only execute the target code and some single input or set of inputs generated by large language models.
256580	258860	Okay, here is the agenda.
259800	264730	The four of us will talk some of the major components in order.
266720	269120	If you go to the next slide.
270860	277440	I want to say three things before the students introduce their components.
277440	281080	Number one, this is a fantastic challenge.
281120	291520	We were able to involve not only academic professors in this competition.
291520	297700	We also have lots of graduate students and undergraduates, including Masu, who is sitting here.
297700	310020	I want to thank the organizers from DAPA and DAPA-H and their leadership for organizing this event.
310440	312940	This is a great challenge.
313400	316760	The two highlights at the very beginning.
316760	327220	Number one, today's large language models are already very, very good for discovering and patching code-level vulnerabilities.
327220	337400	With the right context engineering, you can probably achieve the same level of performance as we are doing in our CIS.
338340	349500	Number two, the key thing is how to build a reliable AI-based system, which contains tons of engineering.
351560	356000	We look at the logs after the results announced yesterday.
356000	360680	We found after day four, we never submitted anything.
360680	363060	There were seven days or more than seven days.
363060	367040	All the submissions we had were in the first two days.
367580	372660	Very likely our system crashed due to some unreliability issues.
372660	374380	All right.
382320	400020	Well, from the result shown yesterday, and our CIS actually has a very unique point, is that we find a vulnerability within five minutes, which is called the most speeded CIS.
400020	411640	We are happy with that because we are actually designing many, many different strategies for different challenges with different difficulties.
411760	417960	We have a very aggressive, very greedy, basic strategy for easy tasks.
417960	419900	That's why we are fast.
420080	426000	And actually, from the framework side, we are actually running everything in parallel.
426000	434360	We have 96 worker nodes, and we have 23 strategies, and all of them are run in parallel.
436040	441120	And now, let Qingxiao introduce some of the framework of our CIS.
443930	445410	Hi, everyone.
445450	451770	I will give an introduction to our CIS system.
451770	454390	This is an overview of our CIS.
454390	459110	It's quite complicated, but I'll break it down and introduce each of the components.
459190	462430	We have, in total, four services.
462470	469910	So, first, our CIS web service will receive a task and determine if it's delta or full scan.
469910	474630	And then the worker service handles it.
474630	480170	And actually, in our worker services, we are running hundreds of worker nodes in parallel.
480170	486090	And in each worker node, they'll be doing the exact same work for different fathers.
486090	494570	And during which, we have our static analyst service, which will provide analyzing to assist our worker services.
494570	506500	And if a POV and patch is found in our worker service, it will be passed to submission service, which does the validation, de-duplication, and bundle.
507660	508980	Matthew?
510500	511820	Next.
512480	513100	Yeah.
513100	518830	That was the high-level idea, and now I will walk you through our workflow step-by-step.
519240	526940	So, first, our web services receives a new task, determines if it's delta or full scan.
526940	535180	And then it passes the information, and it will send this task to our analysis service.
535180	549580	So, in our static analysis service, we'll do reachability analysis, co-pass analysis, and we have language-specific analysis, which we use different tools for C and Java projects.
550100	552120	And... next, please.
552220	552740	Yeah.
552740	558300	And also, our web services will assign the fathers to our worker nodes.
558300	566860	And before that, we actually have a specific design in our web service, which is a task distribution with workload awareness.
567260	574320	And for each of the fathers, we have three harnesses built with different sanitizers.
574400	578280	So, we assign the fathers to each of the workers.
578280	581240	That is, there's one worker for each of the fathers.
581240	588900	And in each of the workers, the things are running the exact same with different fathers provided.
589480	590620	And... next.
590620	591340	Yeah.
591340	594880	Let's take a specific worker node, for example.
594880	599940	So, we have father X, and it's being assigned to worker X.
601880	606500	And so, we already have, like, hundreds of worker nodes running in parallel.
606500	611000	What happens inside a worker is that we have more threads running in parallel.
611000	615600	We have more than 20 strategies for POV and for patching.
615600	623220	So, we create, like, 20 or 30 strategies for our POV strategies and patching strategies.
623220	626920	And we also have a very unique X patching strategy.
627120	629100	And... yeah.
629100	637640	They will be running in parallel, and that actually explains our very fast speed.
637640	644160	And in this worker X, what happens first is it builds the Docker image and builds the father.
644160	650100	And it focuses on this specific father, and then it runs our strategies.
650100	655140	Actually, from here, they will take over and introduce our strategy...
655140	657820	Well, hello again.
657880	662480	Well, let's dive deeper into the core of our CRS.
662480	669480	We are going to talk about POV generation, patch generation, and another strategy called X patch.
669480	674320	And then we're going to talk about how do we submit Bundle to the competition API.
674640	678040	Basically, I want to add one more thing about the framework.
678180	683060	So , we are actually... the whole CRS is written in two programming languages.
683160	689200	The web services are written in Go, and the strategies are written in Python.
689200	693400	We, in total, have 23 different strategies.
693580	698520	And 10 for maybe Stelda scan, and 10 for full scan, and 2 for X strategies.
698760	700180	And, well, here we go.
700180	710120	So, basically, for POV generation, patch generation, you can think the inner core of the system is actually a multi-round chat with AI.
710340	714320	Well, also, our name is fuzzing brain, but, you know, less fuzzing here.
714320	722100	Well, basically, we let large language model to decide what is the vulnerability and where the vulnerability is.
722100	736760	And after the model generate the location, the vulnerability info of the code snippet given, we're going to let another model to generate a Python code.
736760	743420	And this Python code will output a set of blob input file as fuzzing input.
743420	748260	And then we will run the fuzzer provided by the competition.
749160	756820	And if there is a crash, which means that we find vulnerabilities in a given repository, right?
756820	758360	And everything goes well.
758360	781780	And if it failed to trigger the vulnerability, we feed back some runtime information from the fuzzer, from static analysis tool, and other context, like related functions, or other kind of things to the large language model to let it generate more inputs again.
781780	783120	Next, please.
783120	790400	And for the patching, fortunately, now we get a valid POV, and now we need to do patching, right?
790480	799320	And for patching, the first thing we're going to do is to find what functions are we going to patch, right?
799340	802480	Which we call the target functions in our system.
802560	806980	Basically, we also let large language model to do such kind of thing.
806980	814640	Large language model will read the POV we generate and the code of the code base, right?
814640	818320	The target code to generate a JSON file.
818320	825520	Actually, you can think of it as a list of the functions that the model thinks should be changed or should be patched.
825520	835000	And then, based on the list of the target function, we let large language model to generate a full code after the patch.
835000	846940	And this is quite different from what other team did, because we actually generate the full patched code, not the defiled directly.
846940	861180	And the next step is to override the original buggy function with the function after the modification, which we overrided the original function, right?
861180	871840	And we try to build a project to try to compile it and try to validate whether it can trigger the vulnerability again and whether it can pass the test.
871840	876920	And if everything goes well, we're going to use git div to generate a div file.
877300	881280	This is kind of a stable way for us to generate a div file.
881280	890600	If we just let large language model to generate the file, it will cause some error, format error, metadata error, some kinds of like that.
891520	894060	And, yeah, we use git div to generate div.
894060	900100	So in this case, our div file can definitely apply to the source code.
900100	901080	Next one.
901460	902200	Yeah.
902800	908560	However, things may not go very well in the real life.
908560	916900	Imagine if we cannot find the valid POV within maybe 45 minutes, one hour, what should we do?
917380	927800	We actually provide X strategy, which we let large language model to do patch with no POV information.
928320	936840	Here, the logic is, there are a lot of details here, but overview logic is that large language models scan all the reachable functions.
936840	941560	These reachable functions are generated by static analysis service.
941600	952500	You can think it's a call pass graph from the entry point of the father to whatever, because we don't know the target function, right?
952500	961820	And let large language models scan all the reachable functions from the father and to rank top five vulnerable functions per common of a common vulnerable.
961820	967880	This is stored in a catalog, like for C, for Java, we have some CWEs, right?
967880	971620	For each CWE, we may have a top five vulnerable functions.
971800	980440	And there's a confidence level, and this indicates how likely large language models think the function is vulnerable.
980800	986060	And after that, we actually have a list of target function again, right?
986060	988140	And the next step is to try to patch it.
988140	989620	It's trying to patch it.
989620	990660	Next one.
991260	992220	All right.
993360	998880	And the next step is almost the same as what we talked about in a patching slide.
999340	1005840	And after that, we run funding for 60 seconds to validate if there is something wrong with it.
1005840	1010000	And then we generate the div file via git div.
1010000	1011260	It's the same.
1011340	1012400	And next.
1012680	1015920	Since we already have POV, we already have patches.
1015920	1022220	And we are going to submit it to the competition API to get score, right?
1022580	1024080	This is important.
1024080	1035880	Well, we actually build another agent service between the CRS and the competition API, which is called submission service.
1035880	1045680	And this service is actually taking charge of deduplication because it has all the POVs.
1045680	1049080	It has all the patches for specific tasks.
1049460	1060580	So here, if a new POV is generated, it will send to the submission service first for deduplication.
1060580	1064160	Here, for each POV, we generate a signature.
1064160	1067820	It basically consists of a crash type and a crash trace.
1068020	1072260	You can extract it from the sanitizer report, right?
1072260	1083740	And based on this information, we can determine whether this POV is duplicated with some POV we found previously, right?
1083740	1088640	And this is what we did for deduplication.
1088640	1099940	And then we match the POV and the patches to form different bundles to make the final submission to the competition API.
1100400	1107280	And also, this submission service is also taking charge of serif report parsing.
1107280	1114440	Remember, we have all the POVs and patches for specific tasks in the submission service, right?
1114440	1118840	So one of the strategies here is that we parse the serif report.
1118840	1126180	And if this report indicates some POV we found previously for a specific task, then we can directly use it.
1126180	1130480	We can directly submit it if it has a valid patch, right?
1130480	1138340	And this is the logic of our POV, our patching strategy, and something like that.
1138340	1139440	Next.
1141320	1145300	And then let Qingxiao introduce Static Analysis product.
1145300	1153140	Hi, I just want to clarify more on what kind of information can our Static Analysis service provide.
1153140	1159600	So the CodeQL is applied for Java project, and I'll just introduce this one.
1159600	1169840	So what we have in our Static Analysis is we extract the function metadata, and we do reachability analysis and call pass analysis.
1169840	1173440	That is from the entrance function in each of the file.
1173620	1184560	We use CodeQL to run the query scripts and see what kind of reachable functions can be reached from the entrance function.
1184560	1196780	The information that will be passed to our worker nodes is for each fuzzer it will store all the reachable functions, and for each reachable function we will store all the possible call pass.
1197120	1203940	And as Zuo has mentioned before, we are trying to parallelize running everything in parallel.
1203940	1219580	So intuitively we try to run the reachable function query scripts in parallel, but we found that the actual latency in our Static Analysis is building the connection with our CodeQL databases.
1219580	1229420	So instead of doing that, we actually concatenate all our query scripts in one, so that we only need to build connection with our databases once.
1229420	1242480	And in this way, we actually reduced our time of doing Static Analysis for each of the projects in less than five minutes, which actually depends on the project size, but it's still very fast.
1242480	1245160	And that's for the Static Analysis.
1254470	1261170	So now I'm excited to talk to you all about the surprises and challenges that we encountered throughout this project.
1261230	1268100	Because there were a couple, but the ones we wanted to highlight were first off, the improvement speed from large language models was dramatic.
1268530	1271570	Part of my task was looking at model evaluation.
1271570	1280390	And so from week to week, sometimes people will get, I guess, a little bit used to the pace of increase, but really just taking a step back and looking at it.
1280390	1292130	We have some examples that we thought were worth mentioning, but from 3.5 to 4.0, at least for the GPT models, and then, I guess, especially recently, the competition between different model providers has really gotten awesome.
1292310	1294870	Cloud 3.5 and then GPT 01.
1295430	1298450	And as it gets better, it's helped us with patch generation.
1298450	1306230	So many of these large language models can often successfully generate these complex structures of working code in just one to two attempts.
1306950	1312230	In fact, for our CRS, actually 90% of our CRS's code was done with AI.
1312230	1313550	We used Cursor.
1314550	1315150	90%.
1315150	1321190	And that's 50KLOC of Go, 50KLOC of Python.
1322010	1326250	And then the last is building a reliable CRS is highly challenging.
1328470	1339250	We've had a lot of improvements, actually, since the semifinals, but testing and debugging some large language model-based components, working with large language models, that can be frustrating.
1339250	1342310	But what's really frustrating is sometimes having to deal with rate limits.
1342370	1343470	We have fallback models.
1343470	1349070	For example, we have a hierarchy of what we'll go to if we end up facing rate limits.
1349070	1350450	Then we have race conditions.
1350950	1352710	And I already mentioned fallback models.
1356040	1357680	Yes, indeed.
1357940	1362520	And here are some examples for some specific challenges.
1362960	1375900	And as you can see, developing a CRS using multiple programming languages with concurrent strategies can cause a lot of concurrent bugs in our CRS.
1375900	1388640	Well, just as I mentioned, we use Golang, we use Python, and it is pretty hard to debug such kind of thing, debugging Python code is painful for us.
1388640	1391240	We spend mountains of time on it.
1392060	1395800	And there will be a case study later, right?
1396940	1402060	It's an example of race conditions, which we encountered in the competition.
1402880	1408740	And for the full scan challenges, we are given, actually, the full code base.
1408740	1411760	And you can imagine how large is it, right?
1411760	1435940	And in this case, even we have a lot of different strategies to shrink the size of the searching space, the searching space is still very, very large because the functions, the data flow track is very, very long.
1435940	1438880	Maybe the vulnerability is pretty deep, right?
1438880	1444180	I remember there was one challenge in semi-final about Linux kernel is an example challenge.
1444180	1446080	That is really painful.
1447000	1452940	And patch generation, actually, is also the challenge we faced.
1452980	1461500	And sometimes we can generate a POV, we can generate a patch that can pass the POV test, which mitigates the vulnerability.
1461500	1466900	However, it actually destroys the function of the program itself.
1466900	1489190	And this is quite common in nowadays programming because when we are using large language models to write codes, and sometimes the large language model focuses on some limit area to fix the vulnerabilities, however, it will break the overall functionality,
1489600	1491260	which is really bad.
1491260	1512280	And the last one is that since we are getting a longer and longer context window, if the vulnerability is harder to find or harder to patch, LLM will have very, very severe hallucination problems when generating content.
1512280	1518460	And this is really a headache for us to deal with.
1518460	1521820	And here we go, a case study.
1522460	1529740	So one thing I'd like to highlight is building reliable AI-based state is super, super challenging.
1529740	1531320	I want to give you an example.
1531700	1536780	I've been doing, actually, research on race condition in the last 10 years or so.
1536780	1543120	I find myself still got hurt by race condition in my own code.
1543280	1546200	So this was race condition.
1546200	1552340	We took us probably 20 hours of our time finding out the root cause.
1552340	1560200	So we find there was an exhibition run which submitted many false positive POEs.
1560440	1564620	And we were, you know, surprised, how could that happen?
1564620	1571580	And it ended up there are race condition between these three lines of code.
1571580	1580420	Imagine there are multiple processes running the same thing and checking if POE success.
1580420	1587560	If yes, submit that POE with the blob input generated by AI.
1587560	1596940	And that blob path basically stored two instances of the POEs generated by two processes.
1596940	1599600	One is success, one is fail.
1599600	1604660	Because of the race condition, we submitted false positive ones.
1605380	1608980	So that basically killed us 20 hours of time.
1612070	1615270	Okay, we only have a few minutes left.
1615270	1629550	I want to, you know, from my perspective of research in this field, I think that a few important things I would hope our cybersecurity researchers to pursue.
1629550	1646990	Of course, out of this final, I think that more than 50, you know, cybersecurity challenges, I think only 77, wow, it's a big number, but still that 23% not being discovered.
1646990	1649390	So there is a gap still.
1649390	1658810	I think one way to improve this gap is to further improve the capability of both frontier and open models.
1658810	1663930	Number two, developing evaluation and training data sets.
1663930	1672050	Out of this competition, we have accumulated a huge amount of data, and this data are very valuable for training purposes.
1672650	1680070	Of course, more advanced agents, you know, if you just stick to one model, you can develop more advanced agents on that.
1680070	1685270	And also debugging, testing debugging tools for building such systems.
