Skip to content(if available)orjump to list(if available)

How a single line of code could brick your iPhone

e28eta

I’m fascinated that they aren’t requiring an entitlement for all usage of setting & posting notifications through this API. A way to share 64 bits of information (at a time) to any process on the device? That is right in the wheelhouse of tracking a user across apps.

I don’t specifically know the types of things that you’d want to share across apps, but there’s a long history of cross process information channels being removed or restricted.

If the system is storing values for you, and isn’t keeping track of which app they came from, now you’ve got persistent storage across app deletion & re-install, as long as there isn’t a reboot in between.

I think you could easily use it to work around IDFA or IDFV resets, as a simple example.

95014_refugee

The exploit as described doesn't "brick" the device; that would require permanently disabling it. A tethered restore would be all that's required to recover in this case.

mook

More importantly, the single line only forces a reboot; even if we consider needing external fixes to be a brick, the title is still incorrect.

SamBam

It doesn't just force a reboot, it forces a never-ending loop of reboots, rebooting each time you reboot it.

> The result is a device that’s soft-bricked, requiring a device erase and restore from backup.

Requiring a device erase isn't a full brick, no, but it's still pretty serious.

the__alchemist

From observation, "brick" has evolved, as things do in language. In practice, it rarely means the traditional definition you refer to, but the softer one used here.

fc417fc802

And for that reason I wouldn't hassle laymen over it but among the HN crowd I expect a bit more care. An "anything goes" attitude makes communication more difficult.

"Soft brick" is the correct term that already exists.

codetrotter

Also, although HN readers probably have many devices in their homes there are people out there who have only a phone and no computer. For them this would be pretty catastrophic. Hopefully they’d take their device to Apple or a third party technician

Kerbonut

Almost like a "soft"-brick, if you would.

dmckeon

Thus, perhaps "loafed" as in something brick-like, but which may also be soft. And a "loafed" device, being idle, would be loafing.

taneq

You could say the device was pillowed. :D Although given the typical behaviour of old phone batteries, I guess that’s a little ambiguous.

two_handfuls

Ah yes, the Goebbels effect, also known as "A lie told a thousand times becomes the truth."

cantrecallmypwd

Correct. The terminology is wrong. It's an annoying, repeated DoS that doesn't ruin the device permanently but could lose user data if it must be erased.

taneq

“Bricking” isn’t a rigorously defined term, it’s more like “realtime” in the sense that it comes with an implicit “(for this particular user in this particular scenario)”. For most users a device is bricked if it doesn’t turn on and work when you press the power button. For most readers here, using dev tools to re-flash a bootloader would be fairly easy but if USB stops working it might be game over. I’m sure there are a few around who could de-cap an ASIC and circuit bend it back to life.

cantrecallmypwd

Incorrect. Bricking means a device becomes a doorstop that cannot be resurrected or repaired by the user non-invasively. That's the whole point of the term.

dado3212

Neat, $17,500 is pretty good, I’m so used to these blog posts being for peanuts, or where companies fix the vulnerability but don’t pay out at all. Apple’s gotten better about this since 2019.

nativeit

I read a comment under the story about the recent YouTube vulnerability where one could unmask the related Google account and its owner using the standard YouTube API (something similar to that anyway), and they explained a lot of lesser-known nuances in establishing values for bounties like these, and it helped explain a lot (not all) of the reasons for what might seem like low-ball/high-ball valuations on the surface. If I can find their comment I’ll post back, it was really insightful. That said, there are also plenty of examples of people just getting shafted.

croisillon

williamscales

That’s definitely the one I thought of

cantrecallmypwd

Maybe Zerodium would've paid $75k but that would be less ethical because Israel and America would weaponize it.

_rrnv

Great work! This is my favourite type of vulnerability, simple, effective and brutal. Reminds me of a time two decades ago when with a friend from uni we theorised about a perfect server vulnerability where you’d exploit a machine by pinging it. And of course, two years ago it was in fact discovered as CVE-2022-23093.

Rygian

Ping of death was already a thing two decades ago.

https://web.archive.org/web/19981206105844/http://www.sophis...

jasongill

It was actually almost 3 decades ago, making me feel extremely old - the period right at the end of '96 and into mid '97 when this was a popular way to cause mischief via IRC was truly a magical time

anyfoo

Hard to believe that during those times in IRC, you were used to automatically (and proudly) advertising your IP address, your exact client version, and the means for a direct connection to your client without any server in between (CTCP, literally “client-to-client protocol”). And all of that most often with no packet filter whatsoever, not even NAT, in between.

Everything was plaintext, including “authentication”, which was (at best) just asking the “ident server” on the same machine as your client who you claimed to be, which was considered sufficient because, after all, to run identd on its “privileged” low port meant you were an “administrator” (i.e. root of a unix machine).

chasd00

Death on flaxxen wings

driverdan

When I was in college circa 2001 we used to prank each other with the ping of death and other crash exploits. Also random IPs on the college network when we were bored. It was crazy how long it was around for and how easy it was to exploit.

dgfitz

This link doesn’t show me anything useful.

giantrobot

Try scrolling down. On mobile (maybe because of ad blockers) Wayback pages have a full screen of white space above the page contents anymore for me. This happens on pretty much every Wayback page I've tried. It's also relatively recent and I'm not sure the exact cause.

NitpickLawyer

Back in the dial-up days you could disconnect someone by adding ATH commands to a ping payload field.

brontitall

Only if their modem didn’t implement the Hayes command set properly or you could otherwise control the per-character timing of the OS sending. It required a pause (1sec by default), “+++” with no pauses, another pause, _then_ the ATH command

NitpickLawyer

I had an external USRobotics 56k modem, I was immune. But the many many "bulk" no-name modems were vulnerable. You could ping entire ranges of dial-up IPs and watch the results on big IRC channels. Uhmmm, allegedly :)

wat10000

Which was fairly common, as Hayes had a patent on those pauses.

mycall

Commas provided 2 second pauses

cryptoegorophy

I remember you could brute force passwords by brute forcing in sequence single characters to access anyone’s disk on a giant dialup network. Crazy times.

bslanej

I’m too lazy to look it up but there was some string you could send over IRC that would make some routers drop the connection immediately - if you pasted that string in a big channel you would see dozens of people immediately disconnect.

aaronmdjones

An 0x01 control character (CTCP) followed by

    DCC SEND whatever 0 0 0
https://modern.ircdocs.horse/dcc#dcc-send

This caused the DCC ALG helper in ancient Linux kernels to close the connection, as they failed to parse 0 as a valid IP address. Users connecting to IRC servers over TLS were immune, as the ALG helper in the router could not observe the traffic.

This is what breaks DCC in general -- to use DCC on IRC while connecting to the server over TLS and behind a NAT, you must instruct your client to use a specific range of ports for DCC and preforward those ports to your machine in your router, as the ALG helper cannot mark the incoming connection as RELATED (and forward it through to you) as it cannot see the outgoing command that caused the incoming connection to occur. You must also instruct your client to determine the correct external IP address to advertise, as the ALG helper will be unable to rewrite it when the router does masquerading.

urbandw311er

Nice. I can only imagine what a crap day in the office it was when the iOS core team reviewed that one.

andrekandre

  > That single line of code was enough to make the device enter “Restore in Progress”.

  > as established before, any process could send the notification and trick the system into entering that mode.
sleep data, sleep...

shrx

> Looking into the binaries, SpringBoard was observing that notification to trigger the UI. The notification is triggered when the device is being restored from a local backup via a connected computer, but as established before, any process could send the notification and trick the system into entering that mode.

This should probably be reworked regardless if the patch described in the article was implemented.

keepamovin

This was an epic read. That very old skool API was so powerful! Cool demo seeing it trigger all this low-level states for iOS. I wonder what happened to notify_post now..

moduspol

Doesn't this imply that third-party apps with their own notification schemes could be impersonated similarly? They wouldn't be able to brick the phone, obviously, but they could potentially trigger other actions.

doesnt_know

I get that it's potentially lower priority since a user needs to actively install a malicious app, but that timeline doesn't exactly feel me with confidence...

jonplackett

Anyone know how long ago that system would have been introduced?

It seems like such an obvious security concern. Maybe it was pre-AppStore? And more assumed trust in other apps?

lilyball

Darwin notifications are so old they don't have any availability annotations (block-based darwin notification APIs like notify_register_dispatch() were introduced in macOS 10.6 / iOS 3.2, but the rest of them are declared as always available). They absolutely predate any notion of an AppStore, of being able to install apps without implicitly putting a lot of trust in the app to not be malicious.

plorkyeran

The notification API is quite old (iOS 3). It's explicitly an untrusted API that you shouldn't use for something like showing the restore in progress UI, so I suspect that was something written quite a bit later. Widget extensions are iOS 14. There's older ways to run background tasks, but none of them would give the soft brick. Background fetch, for example, originally didn't run until after you launched an app for the first time after restarting.

duskwuff

This is an internal broadcast notification API (akin to dbus on Linux), distinct from the API used to display notifications to the user.

plorkyeran

Yes, I am aware. I'm not sure what makes you think I was talking about UI notifications?

MBCook

Wasn’t it in OS X before that?

plorkyeran

Documentation claims 10.6, which is the equivalent OS X version (both are the 2009 releases).

brcmthrowaway

Ultimately, does this require installing a sketchy app in the first place?

piyuv

Lots of credible apps use lots of dependencies. Find an abandoned one, get your code into it, …

g-b-r

Or a reputable one with that line of code included (in one of the updates, after having built a good reputation); maybe dormant until a certain date.

MBCook

Or a bug in some good app that allows an attacker to execute the right thing.