Earlier quoted context omitted.
It seems we're now at the point where anything Turing complete can be a vector. Wow...
this wasn't Turing-complete until they exploited it to make it so. JBIG2 executes arbitrary binary bitmap operations, but sequentially (no looping.) using the exploit they presumably found a way to send it into a loop, probably by overwriting the pointer to the next segment or something. theoretically I guess you don't need that, but you'd have to send a payload linear in size to the number of cycles expected to run…
A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
341–350 of 360 posts
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#342As other have commented, this is absolutely mind-bogglingly hard core. Kudos to the NSO group engineers who designed and built this (regardless of your allegiances and whether you like or dislike that they do this and whether it's objectively good or evil or somewhere in between, you have to admit that it's deeply technically impressive). Does anyone have a sense of who they sold this to and who used this particular…
> regardless of your allegiances and whether you like or dislike that they do this and whether it's objectively good or evil or somewhere in between, you have to admit that it's deeply technically impressiv Might as well praise German logistics circa 1940-1945.
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#343TL;DR - the ending of the post is all you need: “JBIG2 doesn't have scripting capabilities, but when combined with a vulnerability, it does have the ability to emulate circuits of arbitrary logic gates operating on arbitrary memory. So why not just use that to build your own computer architecture and script that!? That's exactly what this exploit does. Using over 70,000 segment commands defining logical bit operation…
They must have spent tons of engineering effort to create this virtual computer to act as their foundation for further exploits. They don't deserve any sympathy of course, but it must really suck that their foundation disappears immediately with the fixed vulnerability.
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#344Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#345This is mind boggling. NSO used a compression format's instructions to create logic gates and then from there "a small computer architecture with features such as registers and a full 64-bit adder and comparator which they use to search memory and perform arithmetic operations", all within a single pass of decompression. Combine this with a buffer overflow and you've got your sploit.
I read through this and my jaw dropped. Pretty amazing detective work and a really amazing exploit. Presumably you could run Doom on it :-). Sometimes I feel like it's hopeless but my brain cannot help but work on creating solutions to this sort of problem.
I wonder how much time it took to develop, I assume the whole general programming language from NAND gates is not something they had to come up with from scratch.
Putting the pieces together though, that's a work of art
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#346This is quite clever, but fundamentally it's only possible because of a buffer overflow. If the JBIG decoder had been written in Rust (just to cite one example of a language safer than C), this would have been impossible. Use dumb languages, pwn valuable prizes.
Containers and move/by-value semantics in C++ inherently avoid a lot of stuff, it's sad seeing so many C++ developers do not actually know the language and instead stick with a "C with classes" that doesn't provide any extra security compared with C.
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#347Earlier quoted context omitted.
Perhaps you should’ve read my reply from when you asked this several months ago: https://news.ycombinator.com/item?id=28521664
Seems most users don't know about https://hnreplies.com/
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#348Earlier quoted context omitted.
iOS does not allow the modification or generation of new executable code (at least, it will not at this stage of an exploit). So they are likely creating a weird machine to patch various data and then redirecting control flow with the altered state by overwriting a function pointer.
> […] then redirecting control flow with the altered state by overwriting a function pointer . The analysis calls this out specifically: > Conveniently since JBIG2Bitmap inherits from JBIG2Segment the seg->getType() virtual call succeed even on devices where Pointer Authentication is enabled Which is disturbing. Was the code compiled for the arch64e architecture in the first place, or it is a bug in the LLVM compiler…
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#349Earlier quoted context omitted.
ROP chains are similar in spirit but typically created by hand and thus not all that long (several dozen steps, at most). Creating a 70,000 step program via a Turing tarpit is very interesting.
I wonder how they test the code? Maybe they can write a meta VM using a testable environment(e.g. in C) and transpile it into the instructions that library uses?
Re: A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution
#350Earlier quoted context omitted.
I read through this and my jaw dropped. Pretty amazing detective work and a really amazing exploit. Presumably you could run Doom on it :-). Sometimes I feel like it's hopeless but my brain cannot help but work on creating solutions to this sort of problem.
Indeed amazing and also very well written article. I wonder how much time it took to develop, I assume the whole general programming language from NAND gates is not something they had to come up with from scratch. Putting the pieces together though, that's a work of art
All the steps are things you cover in a computer engineering degree (I think), but putting them all together in a tightly constrained environment (or even recognizing that the exploit can happen in the first place) takes a ton of skill, resources, and dedication.