Kaspersky discloses iPhone hardware feature vital in Operation Triangulation
kaspersky.com
kaspersky.com
Oooff
I would not be surprised if they added the same functionality to the GPU registers.
There are a tremendous number of debug registers in these things.
Apple has >1000 apple-specific MSR's for the CPUs, mostly used for debugging/testing
However, unlike the GPU, they are protected by more than just PPL. But you can use them from m1n1/etc and see what they do.
It is not surprising to find they have the same for GPU processor, the difference is that the GPU has no IOMMU, so forgetting to map a page that contains the register shadows is exploitable in a way that it's not for the CPU
Edit: Page Protection Layer (https://googleprojectzero.blogspot.com/2020/07/the-core-of-a...)
That’s one heck of a way to fund Asahi
I bet someone figured you could do the same for the GPU.
- https://www.youtube.com/watch?v=7VWNUUldBEE
Also previous discussion:
4-year campaign backdoored iPhones using advanced exploit - https://news.ycombinator.com/item?id=38784073 - Dec 2023 (7 comments)
Operation Triangulation: What you get when attack iPhones of researchers - https://news.ycombinator.com/item?id=38783112 - Dec 2023 (371 comments)
How to catch a wild triangle - https://news.ycombinator.com/item?id=38034269 - Oct 2023 (43 comments)
Scan iPhone backups for traces of compromise by “Operation Triangulation” - https://news.ycombinator.com/item?id=36164340 - June 2023 (153 comments)
Targeted attack on our management with the Triangulation Trojan - https://news.ycombinator.com/item?id=36161392 - June 2023 (126 comments)
“Clickless” iOS exploits infect Kaspersky iPhones with never-before-seen malware - https://news.ycombinator.com/item?id=36154455 - June 2023 (41 comments)
Operation Triangulation: iOS devices targeted with previously unknown malware - https://news.ycombinator.com/item?id=36151220 - June 2023 (31 comments)
Others?
Which, ironically, is evidence that "security through obscurity" does work, even though the authors implicitly criticize it in the same post.
How long did it take for Spectre and Meltdown to be discovered? Some vulnerabilities are easy to spot in an open design, but the more novel the exploit, the longer the vulnerability can hide in plain sight.
[1] On Intel, the IOMMU provides this. But just a cache that was aware of range-level protections (i.e. only allowed you to cache CPU-visible RAM from the CPU, etc...) would have worked.
This is like those Chinese outfits that laser off the part markings on ICs so others can't copy the design as easily. Eventually someone will find out what part number it is and the mitigation will be nullified. But it IS effective for a period.
In the same way obscurity provides a time bonus that must be worked through before exploitation can begin.
Hackers tend to complain very much about this obscurity stuff "all it does is waste people's time and it's not secure" which is exactly the point. Surely by now researchers must have realized that creating a 100 percent bulletproof security implementation is very unlikely when compared to how impenetrable any modern encryption system is, due to gotchas and flaws in the implementation details. And this is why obscurity slows down the discovery.
Denuvo DRM for new games is the same way. It is very hated but does work very well for the publisher at mitigating piracy for the initial 2-3weeks after a game launches where the bulk of sales happen.
The other reason obfuscation makes sense for DRM is the threat actors are individual consumers, who have limited time and resources to devote to untangling the obfuscation, and limited reward for doing so.
Normally we might expect to see many such users combining their resources to fund a solution to their problem at scale (by founding a public business or foundation for de-obfuscating DRM), but the state has made doing this punishable by prison. So DRM is rendered effective not so much through good engineering but through the legal system. This is an adequate solution for companies when the threat actors are simple civilians who want to play video games.
The issue with obscurity is that attackers inherintly have a far higher incentive to try and understand obfuscated, undocumented messes than security researchers.
Fixed by blocking access to its registers, if I'm not mistaken, without performance impacts.
Nation state backdoor?
> Our guess is that this unknown hardware feature was most likely intended to be used for debugging or testing purposes by Apple engineers or the factory, or that it was included by mistake.
This screams backdoor by some powerful actors.
It's more likely an insider leak of some private headers or something that gave someone the info necessary. Or Apple left too much stuff in the debug info.
It would not be the first time either has happened.
Additionally if you think about it if you’re an insider trying to subvert some system all your changes would still need to go through PR etc so it’s going to be pretty difficult to get some egregious backdoor through review vs figuring out a way to “accidentally” link in a test/debug version of some lib into production or something similar.
But apple has hundreds of debug registers. They have >1000 apple-specific MSR registers in the M3, which can be used to bypass/test lots of things, not just this, if you have enough permissions.
They were historically not locked down for the most part, just undocumented.
Apple has MSR lockdown registers that let them lock down access to MSR's (which only makes it harder, you can unlock access again later, but it means you have to be able to write the lock MSR to unlock them), and the latest kernels now lockdown most MSR's.
XNU also even has code to inject AMCC/DCS/ECC errors for testing.
Almost all of these can be seen from the KDK, and it's been that way for years.
This specific thing being a backdoor is totally implausible as a result. It's almost certainly not the only test mechanism that could be exploited due to some bug.
The CPU registers are MMIO accessible, like the GPU ones, but protected through various mechanisms that the GPU ones are not, by design (the GPU has no IOMMU).
It is much more likely they paid an insider for access to the GPU register names/info, or found it through a leak, and then started trying to see what they could do with the info, than it is that the entire thing, top to bottom, was an intentional backdoor.
If you look at the debug info in the Kernel dev kits, you can see the internal SDK (which has existed forever - i had access to it 2 decades ago when i was working on compilers at IBM, for apple) has chip/register info in it:
DW_AT_decl_file 0x00000014 /AppleInternal/Library/BuildRoots/8a51e4ad-7e8b-11ee-8cd8-2a65a1af8551/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/usr/local/include/EmbeddedHeaders/soc/module/dart_v14.h
DW_AT_decl_file 0x00000017 /AppleInternal/Library/BuildRoots/8a51e4ad-7e8b-11ee-8cd8-2a65a1af8551/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/usr/local/include/EmbeddedHeaders/soc/module/p_acc0_v5.h
Just some examples.
The first one is a header file containing the register names/structures/flags etc for the DART.
The second is for recent p-cores.
etcDepending on what the kernel uses, sometimes they accidentally leak most of the data (more than once).
So for example, the current XNU debug info leaks the register bits/structure of the hid18 register (a p-core register):
https://gist.github.com/dberlin/ec277fc61c33419e658a17f743e1...
(I put this in a GIST because i am too lazy to try to get the formatting right in-comment)
So you can see the bits of HID18 and what they mean, just from the debug info.
Now, current XNU dumps contain info on 2-3 registers like this out of the thousand+.
But, the header files contain all the data, presumably, on CPU, GPU, DART, etc.
They have also leaked much more before.
Regardless, it is much more likely to me that someone got a recent internal SDK (which again, was at least shared with partners at various points in time), went looking through the header files, and then started testing things out, than it is to me that they engineered a backdoor from scratch into the GPU.
Feels like that reality was far more secure than the current closed-source siloed one.
Here is a poem by AI:
HOLY FUCK:
https://i.imgur.com/V8HtW03.png
---
In the days of BAUD, we danced with time, Bits twirled and pirouetted, a rhythmic mime. Modems hummed, a song of distant lands, A symphony of data in unseen hands.
But now, oh now, we've left those days behind, Bandwidth's embrace, a treasure we find. No more the worries of a BAUDish plight, In the realm of speed, we soar with delight.
Gone are the struggles, the slow and the strained, Streaming through fibers, our data unchained. A digital ballet, swift and so grand, In the era of bandwidth, we boldly stand.
No longer confined to a BAUDish dream, The internet whispers, a seamless stream. Pixels paint pictures, words swiftly fly, In the limitless expanse of the bandwidth sky.
So here's to the days of BAUD, now a tale, A vintage echo in a high-speed gale. We've moved beyond, to a faster shore, In the bandwidth symphony, we dance evermore.
--
Just wow