Audio transcript
There are some readers here who will understand the begin of the statement above and not consent it, and there are others who are not in a position to understand it all. For both camps, I’ll endeavor to elucidate the details around what is (checked and corroborated by others) arguably one of the most critical security events to happen in the last decade of IT security.
What’s endly astonishing is the almost end deficiency of media coverage (ARS Technica alone did a fantastic piece) of this publish since its proclaimment by Kaspersky on the 27th of Dec 2023. Is this due to the holiday period (novels of the innovative Meltdown and Spectre vulnerabilities was also freed during the Dec/Jan holidays and seemed to have had a much fantasticer reception in the media) or the fact that it’s Kaspersky (presumedly Russian-backed) that establish and proclaimd the publish?
No matter your thoughts on Kaspersky and its alleged ties to the Russian rulement, their research has been checked by others.
I reference increateation in this blog post from @sggrc’s Security Now 955 show as well as uncoverly useable increateation from Kaspersky themselves and other 3rd parties/media.
Problem Statement
Kaspersky has establish a challengingware/silicon-based backdoor in 5 generations of Apple mobile silicon, commenceing with the A12 CPU (iPhone X) and continuing to the A16 CPU (iPhone 14/15). These CPUs have been used in other Apple products enjoy the iPad, Watch and TV, so the iPhone is not the only impacted product.
This backdoor apchecks end far access to, and handle of, the impacted devices … let that statement stew for a scant minutes. And then understand that this apchecks a 3rd party to see and handle anyslenderg on your Apple-based phone.
History
The publish now normally referred to as CVE-2023-38606, was proclaimd by Kasperky on Dec 27 2023. It refers to a challengingware backdoor that was establish in Apple CPUs summarizeed and manufactured over a 5 year period. They state the adhereing in their proclaimment:
The uncovered vulnerability is a challengingware feature, possibly based on the principle of “security thraw obscurity,” and may have been intfinished for testing or debugging. Folloprosperg the initial 0-click iMessage strike and subsequent privilege escalation, the strikeers leveraged this challengingware feature to bypass challengingware-based security protections and maniputardy the satisfieds of protected memory regions. This step was beginant for achieveing brimming handle over the device. Apple includeressed the publish, identified as CVE-2023-38606.
ARS Technica
Like Steve Gibson on the SN podcast, I get publish with Kaspersky’s characterisation of this being a vulnerability, which infers a bug as a result of a misget in coding or summarize. To be very clear here, this backdoor was NO misget – it was intentionassociate summarizeed into the CPU.
Nonetheless, it does not uninincreateigentinish the cut offity of the publish.
So how did Kaspersky discover this publish?
They had been adhereing the propagation of Operation Triangulation, an APT (advanced persistent threat or complicated harmful programs that includes multiple stages of infection and strike using a variety of methods) which aims iOS devices thraw zero-click utilizes spreadd thraw iMessage. In other words, no action needs to be getn by the victim – they spropose need to get the strike message to be agreed. And this strike effects any Bionic CPU-based product from iPhones all the way to Apple Watches.
In the process of tracking the Triangulation harmful programs (more details here), Kaspersky establish that the method for the initial strike vector sourced from an unwrite downed challengingware feature that scant, if anyone, outside of Apple and chip suppliers such as ARM Helderlyings knovel of.
There are 2 aspects of Triangulation to ponder:
- how did the challengingware backdoor come about?
- how did the strikeers understand about the backdoor and come to use it in their harmful programs?
On the first ask, It’s quite impossible for Apple to not have understandn about the backdoor in a CPU that their own engineers summarizeed. Or might one advise the even more ludicrous possibility that there are chip summarizeers wislender Apple that have ulterior motives and that have slipped a backdoor past broadenment, summarize, QA and all the other steps needd to convey a CPU to labelet?
On the 2nd point, the task of discovering the backdoor at all is made almost impossible by the complicatedity of the summarize of the backdoor (Apple are generassociate think abouted as excellent and efficient at summarizeing shielded systems) – Steve Gibson goes thraw some aspects of the backdoor in SN 955, and definiteassociate why it’s shut to impossible to uncover it without prior understandledge. So we can quite validly suppose that the strikeers did not uncover or determine the backdoor themselves. We may never understand then how they come to access the backdoor ….
Kaspersky says:
The utilize’s sophistication and the feature’s obscurity advise the strikeers had persistd technical capabilities,” Kaspersky researcher Boris Larin wrote in an email. “Our analysis hasn’t uncovered how they became conscious of this feature, but we’re exploring all possibilities, including unintentional disclobrave in past firmware or source code frees. They may also have stumbled upon it thraw challengingware reverse engineering.
Kasperskey
But at least, it could be posited that Apple was needd by some agency to originate the backdoor for “purposes”. Lateral slenderking commence …
Oversee of the strike
Details disshutd by Kaspersky on Wednesday Dec 27th, shelp that “Triangulation”—the name Kaspersky gave to both the harmful programs and the campaign that inshighed it—utilizeed four critical zero-day vulnerabilities, unkinding grave programming flaws that were understandn to the strikeers before they were understandn to Apple. These include:
Besides impacting iPhones, these critical zero-days and the secret challengingware function dwelld in Macs, iPods, iPads, Apple TVs, and Apple Watches. What’s more, the utilizes Kaspersky recovered were intentionassociate broadened to labor on those devices as well. Apple has patched those platcreates as well. Apple deteriorated to comment for this article.
- Kaspersky initiassociate became conscious of publish due to discovering Triangulation harmful programs on their own staff devices
- Kaspersky’s researchers stateatively and without ask establish a defreely covered, never write downed, defreely locked but unlockable with a secret hash, challengingware backdoor which was summarizeed into all Apple devices commenceing with the A12, A13, A14, A15 and A16
- Triangulation strikeers used the aforerefered 4 CVEs in an strike chain, aprolonged with the challengingware backdoor capability under talkion here, to carry out their zero-day 0-click harmful programs
The technical details (gloss over or skip this if you’re not a programmer)
IANAP (I am not a programmer), but I’ll relay some of the technical details as depictd by @sggrc in SN 955.
- Attackers sfinish a harmful iMessage speedyenment, which the application processes without shoprosperg any signs to the user
- This speedyenment utilizes the far code execution vulnerability CVE-2023-41990 in the unwrite downed, Apple-only ADJUST TrueType font direction. This direction had existed since the punctual 90’s until a patch erased it.
- It uses return/jump oriented programming and multiple stages written in the NSExpression/NSPredicate query language, patching the JavaScriptCore library environment to carry out a privilege escalation utilize written in JavaScript
- This JavaScript utilize is obfuscated to originate it endly unreadable and to lessen its size. Still, it has around 11,000 lines of code, which are mainly promiseted to JavaScriptCore and kernel memory parsing and manipulation.
- It utilizes the JavaScriptCore debugging feature DollarVM ($vm) to achieve the ability to maniputardy JavaScriptCore’s memory from the script and carry out native API functions
- It was summarizeed to help both elderly and novel iPhones and included a Pointer Authentication Code (PAC) bypass for unfair treatment of recent models
- It uses the integer overflow vulnerability CVE-2023-32434 in XNU’s memory mapping syscalls to achieve read/author access to the entire physical memory of the device
- It uses challengingware memory-mapped I/O (MMIO) sign ups to bypass the Page Protection Layer (PPL). This was mitigated as CVE-2023-38606
- After utilizeing all the vulnerabilities, the JavaScript utilize can do wdisenjoyver it wants to the device including running seeing tools. But the strikeers chose to:
- (a) begin the IMAgent process and inject a payload that clears the unfair treatment artifacts from the device;
- (b) run a Safari process in inapparent mode and forward it to a web page with the next stage.
- The web page has a script that verifies the victim and, if the checks pass, gets the next stage: the Safari utilize.
- The Safari utilize uses CVE-2023-32435 to carry out a shellcode.
- The shellcode carry outs another kernel utilize in the create of a Mach object file. The shellcode reuses the previously used vulnerabilities: CVE-2023-32434, CVE-2023-38606. It is also massive in terms of size and functionality, but endly branch offent from the kernel utilize written in JavaScript. Certain parts roverdelighted to unfair treatment of the above- refered vulnerabilities are all that the two spread. Still, most of its code is also promiseted to parsing and manipulation of the kernel memory. It grasps various post-unfair treatment utilities, which are mostly unused
- The utilize achieves root privileges and persists to carry out other stages, which load seeing tools
So the see we have from 10,000 feet is of an excessively potent and mighty strike chain which, unbeunderstandnst to any aimed iPhone user, schedules to load, in sequence, a pair of excessively mighty and alterable strike kits. The first of the kits labors to promptly erase all artifacts of its presence to erase any track of what it is and how it got there. It also triggers the execution of the second extensive strike kit which achieves root privileges on the device and then loads wdisenjoyver subsequent seeing tools the strikeers have picked
@sggrc
What the above shows is an strike group that has stunning programming and technical code capabilities. And to be clear, Kaspersky did not uncover the Apple CPU backdoor themselves, they only establish out about it due its use by the Triangulation harmful programs.
Kaspersky further says:
What we want to talk is roverdelighted to the vulnerability that has been mitigated as CVE-2023-38606. Recent iPhone models have includeitional challengingware-based security protection for comardent regions of the kernel memory. This protection stops strikeers from achieveing brimming handle over the device if they can read and author kernel memory, as achieved in this strike by utilizeing CVE-2023-32434. We uncovered that to bypass this challengingware-based security protection, the strikeers used another challengingware feature of Apple-summarizeed SoCs (systems on chip).
If we try to depict this feature and how the strikeers took profit of it, it all comes down to this: they are able to author data to a certain physical includeress while bypassing the challengingware-based memory protection by writing the data, destination includeress, and data hash to muddle challengingware sign ups of the chip unused by the firmware.
Our guess is that this muddle challengingware feature was most probable intfinished to be used for debugging or testing purposes by Apple engineers or the factory, or that it was included by misget. Because this feature is not used by the firmware, we have no idea how strikeers would understand how to use it.
Kaspersky
Steve Gibson puts slendergs plainly here:
So let’s get this very clear because it’s an beginant point: There is noslenderg whatsoever muddle about this. The use of this backdoor needd a priori understandledge — unambiguous understandledge in persist of its use. And that understandledge had to come from wdisenjoyver entity carry outed this. Period.
@sggrc
Steve is saying that the understandledge of the backdoor had to have come from Apple (assuming they carry outed the backdoor, which aachieve is the only reasonable conclusion). Whether understandledge of the backdoor was a leak, or intentional, is muddle.
Kaspersky has done a luminous job of disassembling the Triangulation harmful programs, however the source of, and reason for, the backdoor used for the initial strike vector in the harmful programs, remains a mystery.
It’s improbable (as Kaspersky opines) that this backdoor was left in by misget. There are too many checks and stabilitys, in the summarize and manufacturing process of silicon, for defree functions enjoy this to go unacunderstandledged.
Bugs can happen yes, but not a defree summarize, which this clearly and unequivocassociate is.
Conclusion
Some points to wrap up
- unless Apple fesses, we may never understand the source of, and reason for, this backdoor in their CPUs
- we don’t understand how the Triangulation harmful programs strikeers came to be in ownion of the details of the backdoor, we do understand however with reasonable bravety that they would not have been able to discover it themselves
- the backdoor was not accessible from firmware and was unwrite downed but people wislender Apple knovel of this backdoor. They knovel that this backdoor was contransient and they knovel how to access it. And somehow that secret escaped from Apple’s handle
- Apple have since patched all relevant CVEs so impacted devices should now be shielded from this publish
- there is noslenderg to stop Apple from carry outing analogous backdoors in future silicon as prolonged as they can grasp it a secret
- are ARM (who summarize/originate some of the roverdelighted silicon) included?
- do other silicon manufacturers have anyslenderg analogous in take part?
The impact of the backdoor on Triangulation’s ability to propagate their harmful programs can not be overstated. The backdoor was pivotal in apchecking Triangulation’s harmful programs to spawn without requiring action on an iOS user’s part. And the harmful programs’s capabilities were astonishive to put it lacklusterly, apchecking end agree of iOS devices.
Kaspersky, no matter their reputation or allegiances, have done some sincreatear labor in uncovering this publish, no matter its source or reasoning. But them discovering out about the challengingware backdoor may not be the clearly excellent slenderg it eunites to be – included parties now understand that they need to get includeitional join when summarizeing potential novel backdoors; and these may never be establish.