5 ms·
> In the hardest task I challenged GPT-5.2 it to figure out how to write a specified string to a specified path on disk, while the following protections were en
by simonw 10mo ago
> In the hardest task I challenged GPT-5.2 it to figure out how to write a specified string to a specified path on disk, while the following protections were enabled: address space layout randomisation, non-executable memory, full RELRO, fine-grained CFI on the QuickJS binary, hardware-enforced shadow-stack, a seccomp sandbox to prevent shell execution, and a build of QuickJS where I had stripped all functionality in it for accessing the operating system and file system. To write a file you need to chain multiple function calls, but the shadow-stack prevents ROP and the sandbox prevents simply spawning a shell process to solve the problem. GPT-5.2 came up with a clever solution involving chaining 7 function calls through glibc’s exit handler mechanism.
Yikes.
- rvz 10mo agoTells you all you need to know around how extremely weak a C executable like QuickJS is for LLMs to exploit. (If you as an infosec researcher prompt them correctly to find and exploit vulnerabilities). > Leak a libc Pointer via Use-After-Free. The exploit uses the vulnerability to leak a pointer to libc. I doubt Rust would save you here unless the binary has very limited calls to libc, but would be much harder for a UaF to happen in Rust code.
- cookiengineer 10mo agoThe reason I value Go so much is because you have a fat dependency free binary that's just a bunch of syscalls when you use CGO_ENABLED=0. Combine that with a minimal docker container and you don't even need a shell or anything but the kernel in those images.
- akoboldfrying 10mo agoWhy would statically linking a library reduce the number of vulnerabilities in it? AFAICT, static linking just means the set of vulnerabilities you get landed with won't change over time.
- cookiengineer 10mo ago> Why would statically linking a library reduce the number of vulnerabilities in it? I use pure go implementations only, and that implies that there's no statically linked C ABI in my binaries. That's what disabling CGO means.
- akoboldfrying 10mo agoWhat I mean is: There will be bugs* in that pure Go implementation, and static linking means you're baking them in forever. Why is this preferable to dynamic linking? * It's likely that C implementations will have bugs related to dynamic memory allocation that are absent from the Go implementation, because Go is GCed while C is not. But it would be very surprising if there were no bugs at all in the Go implementation.
- tptacek 10mo agoThey're prioritizing memory corruption vulnerabilities, is the point of going to extremes to ensure there's no compiled C in their binaries.
- underdeserver 10mo agoYou can have memory corruption in pure Go code, too.
- tptacek 10mo agoUh huh. That's where all the Go memory corruption vulnerabilities come from!
- cookiengineer 10mo agoNobody claimed otherwise. You're interacting with a kernel that invented its own programming language based on macros, after all, instead of relying on a compiler for that. What could go wrong with this, right? /s
- eru 10mo agoYes, you can have docker container images that only contain the actual binary you want to run. But if you are using a VM, you don't even need the Linux kernel: some systems let you compiler your program to run directly on the hypervisor. See eg https://github.com/hermit-os/hermit-rs https://github.com/hermit-os/hermit-rs or https://mirage.io/ https://mirage.io/
- tptacek 10mo ago"C executables" are most of the frontier of exploit development, which is why this is a meaningful model problem.
- 0xDEAFBEAD 10mo agoCan we fight fire with fire, and use LLMs to rewrite all the C in Rust?
- 0xbadcafebee 10mo agoSure, but the LLMs will just chain 14 functions instead of 7. If all C code is rewritten in Rust tomorrow that still leaves all the other bug classes. Eliminating a bug class might have made human attacks harder, but now with LLMs the "hardness" factor is purely how much token money you have.
- adrianN 10mo agoLlms are not magic. Fixing a large class of exploits makes exploitation harder.
- 0xbadcafebee 10mo agoThey kind of are magic, that's the point. You can just tell them to look at every other bug class, and keep them churning on it until they find something. You can fast-forward through years of exploit research in a week. The "difficulty" of different bug classes is almost gone. (I think people underestimate just how many exploits are out there in other classes because they've been hyperfocused on the low-hanging fruit)
- saagarjha 10mo agoUsually rewriting something in Rust requires nontrivial choices on the part of the translator that I’m not sure are currently within the reach of LLMs.
- 10mo ago
- vsgherzi 10mo agoWouldn’t the idea be to not have the uaf to begin with? I’d argue it saves you very much by making the uaf way harder to write. Forcing unsafe and such.
- pizlonator 10mo agoYeah Fil-C to the rescue (I’m not trying to be facetious or troll or whatever. Stuff like this is what motivated me to do it.)
- deleted 10mo ago[deleted]
- lelanthran 10mo ago> Tells you all you need to know around how extremely weak a C executable like QuickJS is for LLMs to exploit. (If you as an infosec researcher prompt them correctly to find and exploit vulnerabilities). Wouldn't GP's approach work with any other executable using libc? Python, Node, Rust, etc? I fail to see what is specific to either C or QuickJS in the GP's approach.
- cookiengineer 10mo ago> glibc's exit handler > Yikes. Yep.
- arthurcolle 10mo agoLife, uh, finds a way
- bryanrasmussen 10mo agoto self-destruct! heavy metal air guitar
- catoc 10mo agoSo much for ‘stochastic parrots’
- moron4hire 10mo ago> The exploits generated do not demonstrate novel, generic breaks in any of the protection mechanisms.
- titzer 10mo ago> The sentences output by the model do not demonstrate words with novel characters.
- ahartmetz 10mo agoMaybe we can remove mitigations. Every exploit you see is: First, find a vulnerability (the difficult part). Then, drill through five layers of ultimately ineffective "mitigations" (the tedious but almost always doable part). Probabilistic mitigations work against probabilistic attacks, I guess - but exploit writers aren't random, they are directed, and they find the weaknesses.
- GaggiX 10mo agoThe vulnerability was found by Opus: "This is true by definition as the QuickJS vulnerability was previously unknown until I found it (or, more correctly: my Opus 4.5 vulnerability discovery agent found it)."
- ahartmetz 10mo agoMakes little difference, whoever or whatever finds the initial exploit will also do the busywork of working around mitigations. (Techniques to work around mitigations are initially not busywork, but as soon as somehow has found a working principle, it seems to me that it becomes busywork)
- atomic128 10mo agoNumber 6, explained 3 years ago: https://github.com/nobodyisnobody/docs/blob/main/code.execution.on.last.libc/README.md https://github.com/nobodyisnobody/docs/blob/main/code.execut... Original publication in 2017: https://m101.github.io/binholic/2017/05/20/notes-on-abusing-exit-handlers.html https://m101.github.io/binholic/2017/05/20/notes-on-abusing-...
- staticassertion 10mo agoMost mitigations just flat out do not attempt to help against "arbitrary read/write". The LLM didn't just find "a vuln" and then work through the mitigations, it found the most powerful possible vulnerability. Lots of vulnerabilites get stopped dead by these mitigations. You almost always need multiple vulnerabilities tied together, which relies on a level of vulnerability density that's tractable. This is not just busywork.
- jdefr89 10mo agoMost modern kill chains involve chaining together that many bugs... I know because it's my job and its become demoralizing.
- titzer 10mo agoThere are so many holes at the bottom of the machine code stack. In the future we'll question why we didn't move to WASM as the universal executable format sooner. Instead, we'll try a dozen incomplete hardware mitigations first to try to mitigate backwards crap like overwriting the execution stack.
- verall 10mo ago> In the future we'll question why we didn't move to WASM as the universal executable format sooner I hope not, my laptop is slow enough as it is.
- shakna 10mo agoEscaping the sandbox has been plenty doable over the years. [0] WASM adds a layer, but the first thing anyone will do is look for a way to escape it. And unless all software faults and hardware faults magically disappear, it'll still be a constant source of bugs. Pitching a sandbox against ingenuity will always fail at some point, there is no panacea. [0] https://instatunnel.substack.com/p/the-wasm-breach-escaping-backend https://instatunnel.substack.com/p/the-wasm-breach-escaping-...