iMessage Media Parser Zero-Click → CoreAudio RCE → PAC/RPAC → Kernel → CryptoTokenKit Abuse

Reading time: 9 minutes

tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE) Azure हैकिंग सीखें और अभ्यास करें: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks का समर्थन करें

This page summarizes a modern iOS zero-click attack surface and an observed end-to-end exploitation chain abusing iMessage automatic media parsing to compromise CoreAudio, bypass BlastDoor, defeat Pointer Authentication (PAC) via an RPAC path, escalate to kernel, and finally abuse CryptoTokenKit for unauthorized key uses.

Warning: This is an educational summary to help defenders, researchers, and red teams understand the techniques. Do not use offensively.

High-level chain

  • Delivery vector: a malicious audio attachment (e.g., .amr / MP4 AAC) sent via iMessage/SMS.
    डिलिवरी वेक्टर: iMessage/SMS के माध्यम से भेजी गई एक malicious audio attachment (जैसे .amr / MP4 AAC)।

  • Auto-ingestion: iOS auto-parses media for previews and conversions without user interaction.
    Auto-ingestion: iOS बिना किसी उपयोगकर्ता इंटरैक्शन के previews और conversions के लिए मीडिया को स्वचालित रूप से पार्स करता है।

  • Parser bug: malformed structures hit CoreAudio’s AudioConverterService and corrupt heap memory.
    Parser bug: गलत रूप से बने स्ट्रक्चर CoreAudio के AudioConverterService को ट्रिगर कर के heap memory को corrupt कर देते हैं।

  • Code exec in media context: RCE inside the media parsing process; reported to bypass BlastDoor isolation in specific paths (e.g., “known sender” framing path).
    मीडिया संदर्भ में कोड निष्पादन: मीडिया पार्सिंग प्रोसेस के अंदर RCE; रिपोर्ट्स में कुछ विशिष्ट पाथ्स (जैसे “known sender” framing path) में BlastDoor isolation को bypass करने की बात दिखाई गई है।

  • PAC/RPAC bypass: once arbitrary R/W is achieved, a PAC bypass in the RPAC path enables stable control flow under arm64e PAC.
    PAC/RPAC bypass: एक बार arbitrary R/W हासिल हो जाने पर RPAC पथ में PAC bypass arm64e PAC के अंतर्गत स्थिर control flow सक्षम करता है।

  • Kernel escalation: the chain converts userland exec into kernel exec (e.g., via wireless/AppleBCMWLAN code paths and AMPDU handling as seen in logs below).
    Kernel escalation: यह चेन userland exec को kernel exec में बदल देती है (उदा., wireless/AppleBCMWLAN कोड पाथ्स और लॉग में देखे गए AMPDU हैंडलिंग के माध्यम से)।

  • Post-exploitation: with kernel, abuse CryptoTokenKit to perform signing with Secure Enclave–backed keys, read sensitive data paths (Keychain contexts), intercept messages/2FA, silently authorize actions, and enable stealth surveillance (mic/camera/GPS) without prompts.
    Post-exploitation: kernel मिलने के बाद CryptoTokenKit का दुरुपयोग करके Secure Enclave–backed keys के साथ signing करना, संवेदनशील डेटा पाथ्स (Keychain contexts) पढ़ना, संदेश/2FA को इंटरसेप्ट करना, बिना सूचनाओं के क्रियाओं को चुपचाप authorize करना, और prompts के बिना stealth surveillance (mic/camera/GPS) सक्षम करना संभव होता है।

iMessage/BlastDoor attack surface notes

BlastDoor is a hardened service designed to parse untrusted message content. However, observed logs indicate paths where protections may be bypassed when messages are framed from a “known sender” and when additional filters (e.g., Blackhole) are relaxed:
BlastDoor एक hardened सर्विस है जिसे untrusted message content को पार्स करने के लिए बनाया गया है। हालांकि, देखे गए लॉग यह संकेत देते हैं कि कुछ पाथ्स में protections bypass की जा सकती हैं—खासकर जब संदेश एक “known sender” से framed हों और अतिरिक्त फिल्टर्स (उदा., Blackhole) relaxed हों:

text
IDSDaemon    BlastDoor: Disabled for framing messages
SpamFilter   Blackhole disabled; user has disabled filtering unknown senders.

मुख्य निष्कर्ष:

  • Auto-parsing अभी भी एक remote, zero-click attack surface है।
  • Policy/context decisions (known sender, filtering state) प्रभावी isolation को महत्वपूर्ण रूप से बदल सकते हैं।

CoreAudio: AudioConverterService heap corruption (userland RCE)

प्रभावित घटक:

  • CoreAudio → AudioConverterService → AAC/AMR/MP4 parsing and conversion flows

प्रेक्षित parser touchpoint (logs):

text
AudioConverterService    ACMP4AACBaseDecoder.cpp: inMagicCookie=0x0, inMagicCookieByteSize=39

Technique summary:

  • खराब container/codec metadata (e.g., invalid/short/NULL magic cookie) decode setup के दौरान memory corruption का कारण बनता है।
  • iMessage media conversion path में बिना उपयोगकर्ता के taps के trigger होते हैं।
  • media parsing process में यह code execution देता है। write-up का दावा है कि देखा गया delivery path में यह BlastDoor से बाहर निकलता है, जिससे अगला चरण सक्षम होता है।

Practical tips:

  • AAC/AMR magic cookie और MP4 codec atoms को fuzz करें जब आप AudioConverterService conversions को लक्षित कर रहे हों।
  • heap overflows/underflows, OOB reads/writes, और decoder initialization के चारों ओर size/length confusion पर ध्यान दें।

PAC bypass via RPAC path (CVE-2025-31201)

arm64e Pointer Authentication (PAC) return addresses और function pointers के hijacking को रोकता है। चेन में बताया गया है कि एक बार arbitrary read/write उपलब्ध होने पर RPAC path का उपयोग करके PAC को बायपास/पराजित किया गया।

Key idea:

  • With arbitrary R/W, attackers valid, re-signed pointers तैयार कर सकते हैं या execution को PAC-tolerant paths पर pivot कर सकते हैं। तथाकथित “RPAC path” PAC constraints के तहत control-flow सक्षम करता है, जिससे userland RCE को एक भरोसेमंद kernel exploit setup में बदला जा सकता है।

Notes for researchers:

  • KASLR को हराने और PAC के तहत भी ROP/JOP chains को स्थिर करने के लिए info leaks इकट्ठा करें।
  • उन callsites को टार्गेट करें जो नियंत्रित तरीकों से PAC जेनरेट या authenticate करते हैं (उदा., attacker-controlled values पर generated signatures, predictable context keys, या ऐसे gadget sequences जो pointers को re-sign करते हों)।
  • Apple hardening SoC/OS के अनुसार बदल सकती है; reliability का आधार leaks, entropy, और मजबूत primitives पर निर्भर करेगा।

Kernel escalation: wireless/AMPDU path example

निरीक्षित chain में, एक बार userland में memory corruption और PAC bypass primitive मिलने के बाद, kernel नियंत्रण malformed AMPDU handling वाले Wi‑Fi stack (AppleBCMWLAN) के code paths के माध्यम से हासिल किया गया। उदाहरण लॉग:

text
IO80211ControllerMonitor::setAMPDUstat unhandled kAMPDUStat_ type 14
IO80211ControllerMonitor::setAMPDUstat unhandled kAMPDUStat_ type 13

सामान्य तकनीक:

  • userland primitives का उपयोग करके kernel R/W या controlled call paths बनाएं।
  • पहुंचने योग्य kernel surfaces (IOKit, networking/AMPDU, media shared memory, Mach interfaces) का दुरुपयोग करके kernel PC control या arbitrary memory हासिल करें।
  • read/write primitives बनाकर और जहाँ लागू हो PPL/SPTM constraints को हराकर स्थिरता हासिल करें।

Post-exploitation: CryptoTokenKit and identity/signing abuse

एक बार kernel compromised हो जाने पर, identityservicesd जैसे processes का impersonation किया जा सकता है और CryptoTokenKit के माध्यम से privileged cryptographic operations बिना user prompts के invoked किए जा सकते हैं। उदाहरण logs:

text
CryptoTokenKit    operation:2 algo:algid:sign:ECDSA:digest-X962:SHA256
CryptoTokenKit    <sepk:p256(d) kid=9a86778f7163e305> parsed for identityservicesd

Impact:

  • Secure Enclave–backed keys का उपयोग unauthorized signing (tokens, messages, payments) के लिए कर सकता है, जिससे keys export न किए जाने पर भी trust models टूट सकते हैं।
  • 2FA codes/messages को चुपचाप intercept कर सकता है; payments/transfers authorize कर सकता है; stealth mic/camera/GPS को सक्षम कर सकता है।

Defensive angle:

  • post-kernel integrity breaks को catastrophic मानें: CTK consumers के लिए runtime attestation लागू करें; ambient authority को कम करें; उपयोग के समय entitlements की जाँच करें।

Reproduction and telemetry hints (lab only)

  • Delivery: crafted AMR/MP4-AAC audio को target device पर iMessage/SMS के माध्यम से भेजें।
  • parsing और wireless stack प्रतिक्रियाओं के आसपास के foregoing log lines के लिए telemetry का अवलोकन करें।
  • सुनिश्चित करें कि devices पूरी तरह patched हों; केवल isolated lab सेटअप में परीक्षण करें।

Mitigations and hardening ideas

  • Patch level: iOS 18.4.1 reportedly fixes this chain; devices को updated रखें।
  • Parser hardening: codec cookies/atoms और lengths के लिए strict validation; defensive decoding paths में bounds checks जोड़ें।
  • iMessage isolation: media parsing के लिए “known sender” contexts में BlastDoor/Blackhole को relax न करें।
  • PAC hardening: PAC-gadget की availability कम करें; signatures को unpredictable contexts से bound करें; PAC-tolerant bypassable patterns हटाएँ।
  • CryptoTokenKit: post-kernel attestation और key-bound operations के लिए call-time पर strong entitlements की आवश्यकता रखें।
  • Kernel surfaces: wireless AMPDU/status handling को harden करें; compromise के बाद userland से attacker-controlled inputs को न्यूनतम रखें।

Affected versions (as reported)

  • iOS 18.x prior to iOS 18.4.1 (April 16, 2025).
  • Primary: CoreAudio → AudioConverterService (media auto-parsing path via iMessage/SMS).
  • Chained: PAC/RPAC path and kernel escalation via AppleBCMWLAN AMPDU handling.

References

tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE) Azure हैकिंग सीखें और अभ्यास करें: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks का समर्थन करें