Live data from Hacker News

A Saudi woman's iPhone revealed hacking around the world

reuters.com

141–150 of 184 posts

Re: A Saudi woman's iPhone revealed hacking around the world

#141
post #3
post #2

"The image files tricked the iPhone into giving access to its entire memory, bypassing security and allowing the installation of spyware that would steal a user's messages." Seems like there is a lot behind this summary of the hack. How does an image file trick the iPhone into all that?

Here's the writeup: https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i... edit, previous discussion: https://news.ycombinator.com/item?id=29568625

Wow, so basically:

1. iMessage has a feature to send and receive GIFs

2. These GIFs are copied to a specific path early in the message processing pipeline (even before the message is displayed)

3. But the copy code doesn't just copy the GIF. It uses the CoreGraphics APIs _renders_ the image to a new GIF file at the destination path.

4. The code uses the ImageIO lib to guess the image format, ignoring the .gif file extension. So you can trick this code to accept a non-GIF file.

5. You can use the above to invoke one of over 20 image codecs that were not intended to be invoked in this code, including the CoreGraphics PDF parser.

6. CoreGraphics PDF parser has a very specific vulnerability in its JBIG2 image codec.

7. JBIG2 takes an image of text, identifies repeating glyphs and uses that fact for better compression. To avoid confusing slightly differing glyphs in things like images of poor quality prints (think e and é, or 3 and 8), it has a way of applying a diff over each instance of an identified repeating glyph.

8. This logic has an integer overflow bug: the 'number of symbols' variable is a 32-bit integer, which can be overflowed using a carefully crafted file. Now the attacker can can set the buffer for symbols to a much smaller value.

9. Making a long story short, this allows overwriting heap memory, setting arbitrary values in the objects used in the JBIG2 logic.

10. The JBIG2 logic uses AND, OR, XOR and XNOR operations when iterating through these objects (to apply the 'diff' on glyphs). The attacker can craft a file that strings together these logic operations so that it basically forms a software logic circuit.

11. So this exploit basically emulates a computer architecture inside an image codec, which can be used to operate on arbitrary memory!

Is that right? If so, this is mind-blowing.

Re: A Saudi woman's iPhone revealed hacking around the world

#142

Isn't the walled garden and locked down OS/hardware supposed to prevent these things?

No. It is supposed to mitigate these things. In a complex real world system there's no such thing as perfect security.

No, it's supposed to make Apple's shareholders rich. It doesn't do jack (as the article clearly shows) for security.

Re: A Saudi woman's iPhone revealed hacking around the world

#143
post #92
post #88

Earlier quoted context omitted.

The tech is the easy part: iOS/Android have the best security teams in the world, and an unlimited budget, and sandboxing is an old, proven tech. I guess that the politics here are the real barrier.

Not only politics, the reason why some languages and OSes rule, is that real progress only happens one generation at a time, to put it in a more friendly wording.

"Science progresses, one funeral at a time."

https://en.wikipedia.org/wiki/Planck%27s_principle

As a general principle in life, it's quite frightening considering ever increasing life spans.

Re: A Saudi woman's iPhone revealed hacking around the world

#144
post #141
post #3

Earlier quoted context omitted.

Here's the writeup: https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i... edit, previous discussion: https://news.ycombinator.com/item?id=29568625

Wow, so basically: 1. iMessage has a feature to send and receive GIFs 2. These GIFs are copied to a specific path early in the message processing pipeline (even before the message is displayed) 3. But the copy code doesn't just copy the GIF. It uses the CoreGraphics APIs _renders_ the image to a new GIF file at the destination path. 4. The code uses the ImageIO lib to guess the image format, ignoring the .gif file ex…

If a hack can be called beautiful, this fits the bill. How do people come up with these?

Re: A Saudi woman's iPhone revealed hacking around the world

#145
post #141

Earlier quoted context omitted.

Wow, so basically: 1. iMessage has a feature to send and receive GIFs 2. These GIFs are copied to a specific path early in the message processing pipeline (even before the message is displayed) 3. But the copy code doesn't just copy the GIF. It uses the CoreGraphics APIs _renders_ the image to a new GIF file at the destination path. 4. The code uses the ImageIO lib to guess the image format, ignoring the .gif file ex…

If a hack can be called beautiful, this fits the bill. How do people come up with these?

Being trained in Israeli intelligence corps, moving to civilian life, retaining your spook skills and being funded by Saudi billionaire prince who hates human right activism and criticism.

Re: A Saudi woman's iPhone revealed hacking around the world

#147

Earlier quoted context omitted.

By all the things the US does for them, they must be really important.

Well look at the map. Look at neighbors. Look how many 9/11 culprits came from there. Look what is in the ground. US is more than happy to keep such dictators in place to get access and control over all this and more. It really doesn't matter how many people they behead or cut to pieces in their embassies, if you are not US citizen you mean little to nothing and its explicitly stated in US laws. I guess common americ…

Your use of the word happy is a bit of a stretch. Welcome to realpolitik. Presently Germany is more than "happy" to look the other way on Ukraine for desperate need of Russian gas.

Re: A Saudi woman's iPhone revealed hacking around the world

#148

Earlier quoted context omitted.

Holy shit. My relatives have asked me in the past "could this [image|video|other supposedly innocuous file format] be a virus or hack my phone?". I've always told them not to worry. Can't do that anymore.

One of the earlier iPhone jailbreaks was a tiff image... complicated decompression/rendering algorithms leave room for implementation errors, which can be taken advantage of. https://en.wikipedia.org/wiki/JailbreakMe#JailbreakMe_1.0_(i...

At some point it was also used as a way to get a custom firmware onto a PSP.

Then modders somehow managed to update the batteries' firmware (cf "Pandora battery") and use that. Sony couldn’t patch it, and it was basically game over for them until they released a new generation of hardware, with motherboards immune to the trick.

Fun times.

Re: A Saudi woman's iPhone revealed hacking around the world

#149

Earlier quoted context omitted.

That's not a solution. You're just piping the outside data into your sandbox; it can have bugs too.

This is why I run a 1-task only Windows VM inside a Linux VM on a Mac. Ain’t nobody ripping through x3 0-days for my chats.

If you're a targeted journalist, they'll go through more than three to get you. Full chains are fairly long these days.

Re: A Saudi woman's iPhone revealed hacking around the world

#150

Earlier quoted context omitted.

There's been buffer overflows/RCE exploits in all sorts of software that can parse images since, well, forever . I remember more than 20 years ago seeing a notice about the embedded Internet Explorer rendering engine in Microsoft Outlook Express having an RCE zero day which could be exploited by simply loading an image in the body of an email. Rich multimedia parsing display systems in messaging apps are a very tempt…

Why a messenger app needs a picture viewer?

Because people send each other pictures?
Post reply on HN