Excellent. Hey, hello, everyone. Thank you for joining me. How's everyone doing? Cool. Yeah, welcome to my talk, LLMs at the Forefront. And basically we're using LLMs to fuzz Python and kind of showing you some tricks and cool strategies and stuff like that. Or a better title is ChatGPT, write me some fuzz tests for this source code. Yeah, so let's go ahead and get started. To kind of go through the agenda, right, we're going to start off with an introduction and motivation, you know, to myself and like what was the whole entire motivation for this talk, like why I was interested in it and where it kind of really started. We're going to go some like brief background info on LLMs and fuzzing. And then I'm going to introduce my tool, which really combines LLMs and fuzzing. I'll give you a quick run through how it works. Then we're going to talk about some of the cool vulnerabilities and cool fuzzers that it created. And then kind of end it off with a just kind of summary and kind of a little bit of a summary of what it was like to be a user. And then kind of discuss some of like the future research directions. Right on. So, yeah, about me. My name is X, Xavier. I'm a vulnerability researcher. And I think an important part is that I am not an AI or ML expert. You know, I'm an offset guy who just likes exploring, you know, new cool techniques to find bugs. And outside of security stuff, I enjoy base, techno, and like bicycles, you know? So. So, I'm going to go ahead and get started. Yeah. So, let's start off with the motivation, right? This really started, I guess, because at the beginning of the year, there was like a huge meme, right? Like, LLM slash chat GPT, they're taking over software dev, right? Like, there are going to be no more software devs. And I wanted to explore, like, its potential for, like, offset. And is it real? Is it legit? Like, how much can we do? So, I explored, like, multiple paths, right? I used LLMs for, you know, basic CTFs. I tried to do some, like, cryptography stuff. I'm talking, like, simple, even, like, Caesar cipher type things. And it wasn't really that great. I found that the best thing it was, LLMs were good at was, like, code generation, right? So, I wrote a blog post in, like, February that first explored this. I started writing, starting to use it to write some fuzzers. And this is kind of where the idea exploded. I had really good success. I found a lot of bugs. So, I decided to expand it. And, you know, besides kind of showing you the cool bugs and cool fuzzers, I really want to, like, inspire everyone here to, you know, like, you know, like, you know, like, just kind of explore these cutting edge tools and techniques, right? I think as a security person, it's pretty easy to get jaded and be, like, oh, this is not as cool, not as interesting. But, you know, I think there's a lot of potential in all these types of things. Yeah. So, let me give you a brief, very brief intro into, like, LLMs, right? They're large language models, right? And many people use the word LLM and AI, like, interchangeably. But it's really just a machine learning neural network. And they're trained up to do a lot of things. And they're kind of, like, a wide range of corpus, you know, from the Internet. I'm talking about, like, Wikipedia, GitHub, Reddit, et cetera. And they work by predicting the next most likely token in a sequence. So, it doesn't really have, like, a traditional knowledge database. It's just getting what is most likely next. And this creates some really, like, interesting challenges to work with, which, you know, I'll kind of describe how I approached it and how, like, we can kind of, like, combat this. This, like, operating model. No, but since it kind of works by predicting the next most likely token in a sequence, you know, without, like, specifically teaching LLMs things, they're able to learn, you know, language syntax, context, and even a little bit of, like, semantic understanding, right? So, it's really powerful. And I'm going to be using primarily open API, open AI models, which are 3.5 and 4. But, I mean, Google has barred, Meta has open sourced. I mean, there are many more open source ones. And I'll kind of talk about some of these different models and how, like, how they actually work and how they kind of compare to open AI. But for me, personally, I found that open AI's models were the best at cogeneration. Yeah. So, first of all, let's go into, like, some of the limitations. You know, I kind of mentioned it, that they struggle with factual accuracy, right? They don't know facts the way that humans do. They just generate the responses based on, like, patterns. So, this means that they can hallucinate things, right? Or create APIs that don't exist. I saw many instances where the code has a function, like, parse headers, right? Or parse requests. And it will make up an API that's, like, parse cookies because that sounds like it exists. So, that's, like, one of the big challenges. It really loves to hallucinate things. Another, like, really hard challenge is just the prompt context limitations, right? So, when we say prompt, we're talking about the conversation, like, your text and what it sends back, right? That's what we mean by prompt. And while there are limitations and they are expanding, like, open AI now has 32K tokens, that is still kind of limited. For Python code, 32,000 tokens is about 2,000 lines of code. So, while it can get maybe, like, a source code file, there's, like, no way for it to get a whole repo. And there are techniques to, like, combat that, right? Like, you may have heard of, like, vector databases. And what it does, what these things do is they chunk up data into, like, small portions and then create a data structure so you can, like, quickly parse through and find what you're looking for. But I found for code in particular it's not as powerful and it's not as good because functions, like, call each other functions. So, even if you use it in, like, a vector database and you search for something, it might find something that's not particularly relevant or a function that's being used somewhere else but not, like, the main function. So, I just kind of wanted to add that. I mean, some people say we don't really need vector databases. Eventually, like, the context will grow. But at least for this kind of project, I thought vector databases were not, like, as useful as people say they are. So, but there are many strengths, too. The first, of course, is, like, code, right? LLMs are very adept at understanding and generating code. But it's up to, like, us individually to actually verify the correctness and to be able to do that. So, that's kind of what we're trying to do. So, let's go ahead and test the output. Another, like, big, like, strength is scalability, right? They can handle a large amount of tasks and kind of fix themselves. So, you just tell it to do something, it will happily write the code and do it. I think it's like an intern or junior dev, right? It will happily turn out code and try anything you ask it for, even if it doesn't, like, fully understand why it's performing this task. It's just happy to write code and be, like, all right, here's my strategy, here's my plan, this is how I would do it, even though it has, like, no no idea. So because of that, I found that it's best used by domain experts to like build tools. Another thing that I've had like great success with is like data parsing, right? Like we can copy some JSON and say write a script to extract these and order them like this and it will do it. Another great thing is like regex. Hey, write me a regex to find this and it will just do phenomenal. So there are many strengths. But kind of like to drill down on this code, I want to say it's not good at code review. So even like the most contrived, like, you know, buffer, overflow, like C, you know, I'm talking about like basic day one CTF stuff. It will completely miss it. And there's been other research here where people put like vulnerable code snippets and try to find bugs, but it just completely misses it. So the way you kind of have to approach these tools is ask for what the code is doing. Like there's a... Like there's websec prompts. Ghidorah has many extensions. And it's never find the XSS in a code. It's more find the syncs, right? It's never find the bug. It's find the functions that are parsing it, right? So it's very particular in being able to get a general idea. But once you get like really in depth, it kind of loses its track. And LLMs are not good at that at all. Yeah. So that's kind of LLM. Just a brief intro, right? So fuzzing, I'm sure many people here... No fuzzing. But I'm just going to give you like a brief description of it, right? So it's a security testing technique. It sends random data to programs. And you're kind of looking for any like divergent or unexpected behavior. Now, generally, they use it primarily for like memory managed software, right? Because a crash means we can write an exploit and get it to do whatever we want. So, you know, some of you might be asking, like, why even fuzz Python, right? It's memory safe. What can we achieve with it, right? Well, we still get, like, a lot of large, a wide range of like types of Python bugs, right? I'm also personally part of the kind of people that think that fuzzing should be part of the SDLC, just like QA and unit tests, right? It just makes your programs more resilient, just like anything else. Fuzzing is, I think, something that needs to be integrated for everything. So this really helps. And then some secondary reasons as to why use Python and why it shows Python specifically. Because it's honestly the language of the internet. There's also kind of a newish fuzzer called a theorist. It's native. It's integrated. It's a native Python fuzzer. And, since it's fairly new, there's not like a huge corpus of training data. So I felt like this was a good opportunity to, like, really test the capabilities of it. Versus if, my thinking was, if I use something like C, there's just so many fuzzing examples, right? Live fuzzer, AFL. The internet is full of them. So you can't really test the capabilities. Whether, if I use like A or B, they're really bad for the internet. Those are just Python. And in many of these Python's libraries don't even have fuzz test. So it's just like a great green field project where we can write fuzzers for things that don't exist and find bugs for things that have never been tested at all. So that's kind of why I chose it. This is another slide of like specific Python bug types. There's all types of things. Some of these hit the lower level libraries. A lot of them are like best practices. A lot of like denial service. You know, if we can crash a program, that's very common. It's very easy to accomplish. Yeah. So now we know fuzzing and we know LLMs. Like how do we how can we combine them to like get our goals better, right? First of all is like the pair programming abilities. It just allows us it allows me to write so much more code. I think that's one of the big strengths. It's like a force multiplier for like software development. Whether you use the chat box, co-pilot. I personally am a big fan of this SGPT repel. So it allows you to use GPT in a repel format where you can like interactively code inside kind of like a IPython terminal. So you can like write code, test it, and then you know copy that in there. But kind of a note is always use the API. I found that when I'm trying to do things through like co-pilot or the chat box, oftentimes I would get a warning. I would get a warning. I would get a warning. I would get a warning error where it would be like I see that you're trying to do some like software hacking. It's illegal. So once you start using the API, those like warning signs are off. So really, always use the API. So besides coding, you know, it's great at fuzz test. And I'll show you. It gets the whole function. We put it in. It adds it kind of mimics the functionality. Creates error messages. It's really good. And third kind of like benefit is just the unlimited scalability, right? Generally when we're fuzzing, we're kind of limited by person cycles because we have to dig in the code. Try to find like paths that are particularly vulnerable. If we're using something like LLMs that have unlimited scalability, there is no reason to kind of find these high potential functions. I just let it rip on the entire repo and let it go. And we'll see how that works exactly. Yeah and I kind of integrated all these ideas straight into this tool called fuzz forest and it uses LLMs to like install it. It does that right here. And then it just takes like after that and kind of like goes into the database. Like is it to parse the source code, create the fuzz test, fix the non-running ones, and it even allows us to triage the crashes. And here's the link. Hopefully you all find it useful. Use it. Because personally, I'm a big believer in writing your custom tools for all of your needs, for your different assessments. So I hope you take inspiration. Use these ideas. Fork the code. Whatever you need. It's for the community, basically. Okay. So this is what I generally consider like a fuzzing engagement process. I kind of divide it into three sections. There's the recon. We're kind of learning about the repo. We're understanding the code base and trying to find these critical code paths, which are usually parse functions, stuff like that. The second kind of major portion is writing and running these. So we kind of have to run them, make sure they're getting good coverage. Either adjust them, fix them, and let them run for a long period of time. And then finally is we're triaging the crashes. We're seeing the security impact. We're reporting the vulns, if there are vulns, and giving them to the teams on how to fix them. So this is generally what I consider the three stages of an engagement process that I try to integrate into my tool. So the first is this recon, right? Now, like I say here, usually hackers would be limited by their capabilities. So I'm going to show you how to do that. So I'm going to show you how to have the right capacity to understand and it's great if we have like unlimited time. But generally we're on a time limit. So we're looking for the most critical paths, doing the important things. But, you know, since we're kind of offloading this thing to GPT and it's great, I simply extract all functions in the code and let it run. As you can see here in my little code snippet, I create a SQL IDB and this fuzz recon class, it essentially goes through and it It uses the AST tool to extract every single function, every single name, except for I don't include test functions. I don't do a main function. But generally, we're grabbing every single function from the code and storing it inside this SQLite database. So now that we have this SQLite database, we can generate full tests. As you can see here, we can generate a fuzz test for every function. But if you want to get a little more specific, we can do function. I added some helper functions, like contain string for parse, for load, file name. And these are all fuzzy matches, too. So if your file name is parse XML responses or something, it'll find it. So these are fuzzy. And then once we have the functions that we're looking for, these kind of extractive functions, we can do the generate fuzz test. And this is where the cool part is. Right? So when we get this generate fuzz, we send it over to the prompt. And this was the part that I really struggled with. And this was like the real meat of it. For our prompt, as I kind of mentioned before, our prompt is what we tell the LLM to do with all our context and all our info, but also what it sends back. And this is what we mean by limited by the token context. Right? Like if we could just send everything over there, it would write it correctly. But it kind of makes it up. So I found that. For our prompt, we have to add very specific examples. So I start off my prompts with a basic Atheris, which is the fuzzer example code. I have to put in the API information, because if not, it would create random APIs. Another more complex Atheris example. And then some important directives. And you'll see these directives, without it, it was not working. And then finally, I kind of ended off with write fuzzer for this and this. And there's a link to the GitHub in total. This whole prompt, which we'll see in the next slides, is about 100 lines or 1,300 tokens. Yeah, so here's the prompt. And here's the beginning of the prompt, right? So I start off with a generic fuzz example, as you can see right here. This is just taken straight from the docs, page one of the docs, so that the LLM kind of understands what it's doing. And then down here, I actually decided to paste in the entire API reference. And you can see here, there's consumed bytes, consumed Unicode. And the reason I decided to paste it was because if I didn't, the LLM would just kind of create. It'd be like, you know, consumed string or consumed bytes, things that don't necessarily exist in the API that just sound like exist. So I had to add this context, or it wouldn't work. And then I added another more complex example. This uses this kind of like mutation technique from lib fuzzer. So it's kind of for more complex data formats. And again, this was also another example just to reinforce to the LLM, like, hey, this is how a more complex example is. But an interesting thing here is, you see this note, the importance always used that there is. When I was initially creating these fuzz tests, it would consistently skip this instrument all. So it would kind of write a fuzz test, but it wouldn't have the proper instrumentation. So I found that you have to give like specific directives, like use instrument all before calling main. And then I put an example in there. I also put another directive before using it, because it would keep writing tests. And it could keep triggering attribute errors, because one of the main weaknesses, like I said, it would try to make things up. So it'd be like, oh, this function sounds like it fits. So I found that by adding this second important statement, make sure. Before using any attributes, methods, or functions, make sure they exist and are accessible. So try to avoid triggering an attribute error. And just putting in that sentence, like up the completion rate significantly. So it goes to that tendency that you oftentimes have to remind. I know I specified it before, but you kind of have to tell the LLM, hey, don't forget that you have to use variables that actually exist. And it'll kind of trigger and be like, OK, gotcha. And then the very. The very last line is where I would paste in the function name and the source code. And this whole prompt is sent to the LLM, which returns Python code. And this Python code, I just do a quick helper function where I run it just for two runs. So it creates a file. It runs it. And if it's successful, I sort it in the database, like runs true. Else, I get a runs false, and I send it to this. LLM agent loop, or I call this the fixed fuzz test code. So all of them that are marked as runs false, they're sent to this function. And it uses this idea called an LLM agent loop. Now, there's this tool that some people may have heard of called Langchain, which uses this concept of an agent loop. And what an agent loop is, it's kind of like a self-learning technique. So you send the stuff to the LLM and say, here's the directive. Here was the output from that directive. Move on to this next step. And for us, it's quite a simple step of, like, fix the code. And here's the basic structure of this. We send the code, the non-running code, and the output to the LLM and say, you need to fix this. It returns new code. We run that again. And if it works, we save it. Else, we send the updated code and the updated output back to the LLM. And it keeps running until it runs without errors. And then we send the code, the non-running code, and the output back to the LLM. From my experience, I put a limit of five. And that has, as you can see, we'll see later in the stats, but that fixes about, like, 85% of our fuzzers. You can have a higher limit. Sometimes I try it out with, like, 10 or 20. But if it doesn't work, if it doesn't fix itself within five, I find that it's not going to fix itself. It just doesn't really understand what's going on. OK, now here are the cool, here are some of the actual tests. Now. The cool part is that I have never used, like, Twisted, right? So these tests were all completely, these harnesses were all written by the LLM. I don't know much about these, but we can already see that it's being very smart, right? We're doing this FTP. And in the Consume Unicode, like, the LLM knows to use, like, the sys.max size. I didn't specify that. It just kind of knows, like, this is what the fuzz test should be. And, you know, I looked at the parse QS code, and there is, like, a value. Error catch here. So the fuzzer was, or the LLM was smart enough to be, like, we, the code itself is trying to catch these value errors. So we don't need to, like, trigger, you know, we'll just pass them on. So that way we're not, like, getting these false positives by triggering these value errors. The fuzzer itself was, like, OK, if we hit that, that's already accounted for. Let's just continue. But let's see some of these cooler ones, right? This was, like, a Babel parse state, but that was another super popular Python library. As we can see here, like, the locale and format, it wrote all of these things itself. And again, I just want to stress that I didn't write any of this code. This was all returned to me from the LLM. You know, so it creates these great functions. It actually allows you to put, like, the locale and the format. And again, this unknown locale error, it's a custom error catching thing from the code, and it just integrates it. This one was pretty cool. This is, like, Boto3. It's another super popular Python library. So it kind of creates this, the buckets, the keys, with all this, like, you know, fuzz data. But I thought the most interesting part was that, check out that regular expression part right here. It actually wrote a regex to make sure that we're, like, abiding by the S3, like, standard format, right? So it's really powerful. And another thing is you can kind of see these comments, at the very top. This was one of the functions that did not run initially, but it was sent to the fixed code. So every time it's run through the fixed code, it actually adds its own comments to say, like, what it updated, right? So, like, for the initial run, it didn't actually import re. It just said, which is the regular expression library. So when it fixed it, it imported it, right? And then so it's, like, even the fixing, like, functionality is, like, really amazing. So it will import itself. And it's just really powerful. This was actually my favorite one right here. This is from the Python cryptography library. And again, I didn't write any of this. The LLM did. And it knows to use, like, different key sizes, try different hashing algorithms. But, you know, what I think is one of the coolest parts, oops, my bad, one of the coolest parts is, towards the end, it actually makes a comment about an RFC, as you can see there. And it says, the DSA signature is a pair of two integers. And it tells you, like, how you can verify it by decoding the signature. And then it actually integrates that into the fuzzer, which, you know, as someone who's not familiar with cryptography, the fact that it's able to, like, reference RFCs and write code that actually asserts, like, these values, to me was, like, amazing. Like, there's no way I would have been able to do this myself, you know? Yeah. Yeah, so these were some of the functions. So you're probably wondering, like, you know, where are the vulns? Like, how much stuff did we find? Well, in total, as you can see here, it's, like, linked. And we have a little bit more info than what's here. But we have 72 unique findings. And when I say findings, I don't mean, like, vulns. I say 72, like, unique bugs, crashes. Not all of them have security impacts. Some of them are more, like, good programming practice. But I was able to, so far, I mean, I've been able to do, like, I'm still triaging them all. But so far, about, like, 32 real legitimate, like, security impact findings. And here are, like, some of the cool ones, right? Yeah, you can see it highlighted there. Some of these, like, this is an HTTP library. We get, like, overflow errors for the C stuff. We get some easy stuff, like Unicode, escape errors. These were, like, Flask is this, like, web app, like, framework. And this causes, like, a straight up system exit. So as long as you send this one request to Flask, and everything's kind of routed to the routes command, it, like, makes it crash. This NumPy, we're able to cause, like, memory errors, which is, like, a scientific computing thing in NumPy. And these are the security impact ones. But there are some that are not security impact, but are just good programming practice. Like, this PIL is the pillow imaging library. So on this decode one, we get a decompression bomb error. Because it says we have this huge, like, pixel size image. But it's really just, like, a recursion bug that makes it, like, crash. So that's, and this has error catching for it. But, you know, it's still pretty cool. And in this SciPy, we have, like, a local variable FS reference before assignment, which is one of those more, just, like, good coding practice things, even though it can make your program crash, right? And there's many, many more. But these are just some of, like, the, just to kind of show you, like, the type of things that I found, right? And as you can see on this library field, I mean, we got bugs. Bugs in and Django, Flask, a bunch of stuff in NumPy. You know, pretty much every, like, popular Python library, we were able to, like, make crash or make misbehave somehow, which is really great. Yeah, so I kind of did this analysis with two different, like, models and some more models, which I'll kind of, like, describe later. But the OpenAI models were, like I said, the best. So as you can see here, the 3.5, it's significantly, I tested against the same 20 libraries. So the 3.5, it costs 0.02 cents per 1,000 tokens. So we were able to create 365 fuzzers. And 172 were able to run. So for the initial run, we had about 47% that were actually able to run. And this cost $0.29 in total. For the GPT-4 hitting the exact same 20 libraries, it created 405. But only 29% were able to run. I did a lot of, like, triaging on this and trying to figure it out. And I think it's because GPT-4 just created many more complex examples. Think about, like, the past cryptography one. Those were exclusively to GPT-4, versus, like, the ParseQS one was a 3.5. So, you know, from my analysis, the four were much more complex. And that's why they didn't run during the initial, like, creation of it. They needed to import more libraries. And stuff like that. But after I run the five try, like, fix loop, the 3.5 was able to fix a significant number. It got up to 75% for a total cost of $0.42. Versus the four, it actually managed to fix more after that loop. So we got about 86%. We're actually able to, like, run and fuzz and get, you know, continuous, like, coverage. Like, decent coverage. I also wanted to get, you know, over hundreds of paths covered. So if they didn't reach, like, at least 100 paths, I would just kind of cut them off there and send them again to, like, the fixed fuzz test. But anyway, as you can see here, like, the 3.5, just for $0.71 total, we were able to get, like, 46 unique crashes. For the four, it cost about $50. But we were able to get 65 crashes. Many of them, like, converged and they were the same. The GPT-4 were often more complex. But they usually crash in the same, you know, some of the same parts as 3.5. So there were unique ones, but just because we're kind of targeting these Greenfield projects that don't have a lot of, like, fuzzers to them, they found many of the same bugs. So yeah, so basically, for, like, $50, you can write fuzzers and get a lot of, like, bones out of here, which is definitely cheaper than any, like, you know, software dev or, like, or hacker, pen tester, et cetera. So another part is, like, this other models. You know, I keep talking about, like, open AI models. And, like. You know, you're probably wondering, like, why would I use these exclusively? Isn't there others, like Salesforce or Palette, you know, this Hugging Face star coder and stuff like that? You know, because you can run these locally on your machine. Like, are they as powerful? And honestly, no, not yet. These were some of, like, the model comparisons for the same one. As you can see, like, the star coder, it doesn't even make sense, honestly. It just doesn't import the correct libraries or anything like that. The Salesforce one as well, like, it's going dev-y, random, RB. And it kind of imports this. But we're using the exact same prompt. But it's still, like, I don't know what to do with this or how to use it at all. So open AI models are just, at least in my experience, just like, you know, a level above, at least for code generation and understanding. Yeah, so the next steps in this, you know, I'm currently reporting all the bugs and, you know, notifying all the teams. So that's going really well. The next steps, of course, are to add some JavaScript functionality, because that's the second language that open AI, like, understands best. So that's kind of the big project that's next. I also did a little bit of testing on, like, improving existing fuzzers, right? So I did very minimal of, like, where I would get an existing Chrome fuzzer or a Linux kernel fuzzer that are in C and basically tell the LM, here's an existing fuzzer. Try to improve it. And for this, I had some, like, limited success. So I think I just need to, and one of the main goals is to, like, improve the prompts to get, like, more coverage, right? Because it's, a big part of it is kind of, like, figuring out these prompts, knowing what to ask for, knowing how to ask for it. It's really weird. It's like incantations. You don't know what's, you're just kind of, like, waving things and hoping it gives you a right answer. Second goal is, like, you know, integrate out-of-the-box, usage of different models, especially when they get better. Like, this is kind of low priority because as we saw, these different models, they're just not up to snuff, right? You know, I want to improve the coverage and analytics. But I think a big improvement is, like, this unit test, right? I'd like to modify it to write a unit test for these functions, especially to catch these crashes. And I know that this is a, like, a worthwhile investment of time because, you know, while I was performing this research throughout the beginning of the year and through summer. GitHub announced their program CopilotX, which is, like, supposed to integrate itself into the code base and lists, like, automatic unit test creation as a major feature. So, as you can see, like, this kind of test creation is really, like, what it excels at. Like, that's one of their main selling points for this, you know, really expensive CopilotX project. And it's something that we can do very easily. I mean, we're writing fuzzers. Unit tests are just kind of, like, a small modification to that. Yeah, so let's just end it off with, like, this implication for, like, AI, you know, for security people. Like, we keep hearing that, you know, ChatGPT will eliminate software devs. Like, will it end security professionals, too? And, like, no, no to either of those. Not only is it not good at finding bugs, it can't even write bug-free code. Often from the test, it had bugs in it. In fact, I actually think the opposite. Like, there's increasing software creation, because of these tools. I know many people that are using it to, like, write easy scripts, right? So more people are creating more software. So there's just going to be more, like, opportunities for these bugs to be introduced. But the trend has been, you know, throughout, you know, the history of, like, you know, off-sec, is that the bugs will become, like, more subtle and harder to find. Like, they're going to keep popping up, but it's just going to be more difficult. And then I put a link here to this famous paper called The Art and Science, and Engineering of Fuzzing. It's still, I think it holds very true. Like, sure, the LLMs may be able to abstract some of this engineering, but it's really more than that. It's kind of knowing how to set it, the art of it, right? In order to, like, get the good coverage and find these bugs. So there's still, you know, don't worry, guys. Like, we're still going to have jobs for a couple of years. Yeah, and then, yeah, basically, you know, to kind of go along with the DEF CON theme, what we really have to do is, you know, we really have to, like, adapt. I feel we have to adapt to this new tech and, like, ride the wave into the future, right? Like, there's always going to be new things. And like I said, as security people, we're, like, super jaded because everything is new. And, you know, we just see the same things pop up. But really, we've got to, like, I feel like we have to, like, use these tools to their best potential and just, like, use them to the best of our abilities and ride the wave into the future. Yeah, so thank you. And here are the different blog posts that I, you know, really, you know, talk about this stuff, like, in detail, right? Like, I'm actually going through the code. I show actual code snippets of, like, the agent loops and stuff like this. I just, these slides are more at a high level. But if you really want to dig deep, like, you know, go into these blog posts. These are, like, a really good prom course that I use throughout my research. And these were, like, other blog posts that, like, really helped kind of formulate this idea. And, you know, I talked to some of these people and kind of, like, they just gave me good feedback. So, like, really make this and really find, you know, all the different bugs. But, yeah, that's it. Thank you, guys. Awesome. Nice. Yeah. Yeah. Does anyone have any questions? You guys? We have a mic over there. A mic right here? Yep. All right. Sorry. So I really appreciated your breakdown on total cost. Yeah. I'm wondering if maybe not quite yet or if it's kind of in your plan to explore what it looks like to automatically generate and try to, like, automatically fix these things up to a certain budget. Yeah. Because right now, especially with GPT 3.5, it looks like it would end up being more cost effective, especially for a team that's maybe got to be budget conscious to get a lot of fuzzing done when they only care about, let's say, the bottom 80%. Yeah. So I don't know if that's something that you've already explored or. Yeah. Definitely. I mean, if you want mass scale, I just, the way I see it is, like, GP, the 3.5 is solid. But the 4 just gives you such, like, a higher level just for a small additional cost. I mean, 50 bucks is not that much. But I do agree with you. I think if you want just a quick and dirty, 3.5 is what you can do. Thank you. Hi. I saw you had the comparison of the, like, the review win ratio between 3.5 and 4. Yeah. And I'm wondering. For the ones that made it, did 3.5 take more iterations to fix something than 4? Like, did 4 fix it in one try more than 3.5? Yes. Actually, 3.5 often hit the, like, 5 limit, very often. Versus the 4, it almost always fixed it. All of these were, the 80% were within the 4, oftentimes within the 2 or 3. Versus the 3.5, it always hit the 5. Even when it. Fixed them, it would always hit the 5. So, yeah. Thank you. So, one of the concerns raised at a lot of presentations with LLMs is that they can't really describe the method by which they arrived at their result, right? And maybe that's going to get better over time. In fuzzing, we're usually concerned about documenting the process as much as possible so we can replicate the crash or error consistently or pass the context to your dev so that they can hopefully patch out the edge case. So, I'd be worried that you end up with a really cool fuzzing capability, but it's a black box to everyone that's using it. So, what recommendations do you have for the audience in regards to documenting your process as you're forging your prompts and working through creating these? Yeah, absolutely. That's a great question. So, you know, I try to do this, you know, with all my work. I try to be driven by metrics, right? So, every single test case, I put it in a separate directory. And it's not here. It's not here. It's not in this code snippet. It is in, like, the blog post. But we save all the run output into a specifically formatted, like, .JSON file, which we later are able to, like, triage because that's a very good point. And I also work by creating a directory for every single fuzz test and stuff like that so that we know exactly where it's at. But yeah, basically log every single thing in the JSON format. Sweet. Yeah. Have you found that some libraries or some types of functions, it has better intuition on how it writes fuzzing functions for? Yes. Yes. Definitely. If it's well used, if it's, like, a request library, we'll get a lot of bugs. It will be able to write, like, the cryptography. It was able to write really good intricate tests. But if it's a library that's not as popular, like, say this, you know, this IO HTTP, which is not as ‑‑ there's not just as much, like, stuff out there, it doesn't really know how to use it. So we get a lot of those, like, attribute errors. Because there's just not enough info for it to use. Did you experiment with the temperature settings or did you always use the default .7 parameter? No. I actually found that if you go a little bit ‑‑ if you increase it more, like, .7 was decent. But if you increase it specifically towards, like, the .9 and higher, that's when you start getting these really cool, interesting fuzzers. So that's one of the main things. Did you find an increase in hallucinogen? Yes, definitely. So after I increased the temperature, that's when I had to add, like, those attribute reminders. Because it would just kind of make it up out of nowhere. So yes, I tried to combat that. Yeah. Thank you. Hello. More of a kudos, but creating vulnerability exploits and fuzzing from manually, that looks like it's going to save a lot of time. And I can concur with you with vendors who release products into production that are very easily crashed. I've had a few vendors reach out to me. I said, no. I just alerted them. But it's very ‑‑ I agree with everything you're saying. So thank you. Yeah. Cheers. Yeah. Yeah. Luckily, people are, like, open to fixing it. But, yeah, definitely. In your talk, you mentioned that integrating Lang chains isn't worth it. And I was curious what your routines for, like, stitching automation around these processes was like and your approach to that. Yeah. Definitely. Yeah. So basically ‑‑ I'll be here for the sidebar. Yeah. Yeah. For exactly. Basically, Lang chain is just a really complex library. So it integrates these tools like Python and stuff like that. But, you know, in my experience, it's just ‑‑ it's like importing a gigantic library to do a small task. So I found that it's better just to, like, implement your own small loop with these specific tools. Because it has, like, a Python interpreter, but it's so wieldy and it tries to do everything. It tries to, like, instrument it and stuff. That just writing a basic, like, Python tool. A run tool is, like, much more effective. It may be better if you have, like, some crazy huge project. But I found that Lang chain is just too much stuff for something simple. Thank you. That was a great talk, by the way. Thank you. So have you experimented doing this with maybe an API interface ‑‑ or fuzzing an API interface or a web interface where you describe its inputs and outputs? And try to write tests around that. Similar, right? So you can put in API and it kind of understands it. I had some good success with, like, OAuth systems. So I'd, like, paste the documentation of an OAuth system and it would be able to, you know, do, like, the token exchanges and stuff like that. So it works limitedly like that. But if you were able to put, like, in, like, an open API, like, spec, it doesn't really, like, know how to ‑‑ it can write requests, but, you know, if you wanted to do something a little bit simple, you know, more complex, like switch requests or put, you know, binary data into them, it doesn't really know that. So simple things that exist, yes, but just open, like, REST APIs, no. Thank you. It sounds like you really care about the quality of software in the world. What is the next step for your project? Like are you going to release this in a way that ‑‑. Projects can use automated style? Yeah, definitely. It's all open source now. So right now I'm currently submitting all the bugs to, like, the Python devs. And the next step is, like, JavaScript stuff. So I'd like to get maybe if I can do it to, like, you know, like Google's OSS somehow, but, you know, that's to be determined. Right now I'm just, like, reporting all the bugs and stuff like that. But I would like to. Thank you for taking all the questions. Have you found or do you think there's any chance since you're feeding in the full function body code, is there a chance that's limiting the fuzzers' ability to write good tests? Because Python is untyped. Is it restricting the tests it applies versus just having the function signature? You know, that's a good question. So initially I would kind of paste in some, like, documentation as well, right? So that way it knows it. But if you notice some of these here. It. It. It does use it a little too, like, since these things do exist, it's able to, like, know, like, Unicode and stuff like that. But I did struggle with that. So I kind of experimented with adding, like, specific documentation of types, especially for the NumPy. And that was able to get, like, good success. But it is something that is very difficult. So I'm kind of struggling with that. But I find that just the doc links work pretty well. But it is hard. It's very hard. Thank you. Thank you. Thank you very much, everyone. Oh, yeah. Infinite forests. Yeah. And infinite forests. That's where all the cool stuff is. Thank you very much. Awesome. Thank you. . .