iMessage Media Parser Zero-Click โ CoreAudio RCE โ PAC/RPAC โ Kernel โ CryptoTokenKit Abuse
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 ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
์ด ํ์ด์ง๋ iOS์ ํ๋์ ์ธ zero-click ๊ณต๊ฒฉ ํ๋ฉด๊ณผ iMessage์ ์๋ ๋ฏธ๋์ด ํ์ฑ์ ์ ์ฉํด CoreAudio๋ฅผ ์์์ํค๊ณ BlastDoor๋ฅผ ์ฐํํ๋ฉฐ RPAC ๊ฒฝ๋ก๋ฅผ ํตํด Pointer Authentication (PAC)์ ๋ฌด๋ ฅํํ๊ณ Kernel๋ก ๊ถํ ์์นํ ๋ค์ CryptoTokenKit์ ์ ์ฉํด ๋ฌด๋จ ํค ์ฌ์ฉ์ ์ํํ๋ ๊ด์ฐฐ๋ ์ข ๋จ๊ฐ ์ต์คํ๋ก์ ์ฒด์ธ์ ์์ฝํ๋ค.
๊ฒฝ๊ณ : ์ด๋ ์๋น์, ์ฐ๊ตฌ์ ๋ฐ ๋ ๋ํ์ด ๊ธฐ์ ์ ์ดํดํ๋๋ก ๋๊ธฐ ์ํ ๊ต์ก์ฉ ์์ฝ์ด๋ค. ๊ณต๊ฒฉ์ ์ผ๋ก ์ฌ์ฉํ์ง ๋ง๋ผ.
์ ์ฒด ํ๋ฆ
- Delivery vector: a malicious audio attachment (e.g., .amr / MP4 AAC) sent via iMessage/SMS.
- Auto-ingestion: iOS๊ฐ ์ฌ์ฉ์ ์ํธ์์ฉ ์์ด ๋ฏธ๋์ด๋ฅผ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๋ฐ ๋ณํ์ ์ํด ์๋ ํ์ฑํ๋ค.
- Parser bug: malformed structures๊ฐ CoreAudioโs AudioConverterService๋ฅผ ํธ์ถํ์ฌ ํ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์์์ํจ๋ค.
- Code exec in media context: ๋ฏธ๋์ด ํ์ฑ ํ๋ก์ธ์ค ๋ด๋ถ์์ RCE๊ฐ ๋ฐ์; ํน์ ๊ฒฝ๋ก(์: โknown senderโ framing path)์์ BlastDoor ๊ฒฉ๋ฆฌ๋ฅผ ์ฐํํ๋ ๊ฒ์ผ๋ก ๋ณด๊ณ ๋จ.
- PAC/RPAC bypass: ์์ R/W๋ฅผ ํ๋ํ๋ฉด RPAC ๊ฒฝ๋ก์์์ PAC ์ฐํ๋ก arm64e PAC ํ์์ ์์ ์ ์ธ ์ ์ด ํ๋ฆ์ ํ๋ณดํ ์ ์๋ค.
- Kernel escalation: ์ฒด์ธ์ userland exec์ kernel exec์ผ๋ก ์ ํํ๋ค(์: ๋ก๊ทธ์ ๋ณด์ด๋ wireless/AppleBCMWLAN ์ฝ๋ ๊ฒฝ๋ก ๋ฐ AMPDU ์ฒ๋ฆฌ ๊ฒฝ๋ก ๋ฑ).
- Post-exploitation: Kernel ๊ถํ์ ํ๋ํ๋ฉด CryptoTokenKit์ ์ ์ฉํด Secure Enclaveโbacked ํค๋ก ์๋ช ์ํ, ๋ฏผ๊ฐ ๋ฐ์ดํฐ ๊ฒฝ๋ก(Keychain contexts) ์ฝ๊ธฐ, ๋ฉ์์ง/2FA ๊ฐ๋ก์ฑ๊ธฐ, ์ฌ์ฉ์ ํ๋กฌํํธ ์์ด ๋์์ ์๋ฐํ ์น์ธ, ๋ง์ดํฌ/์นด๋ฉ๋ผ/GPS์ ์คํ ์ค ๊ฐ์ ํ์ฑํ ๋ฑ์ด ๊ฐ๋ฅํ๋ค.
iMessage/BlastDoor ๊ณต๊ฒฉ ํ๋ฉด ๋ฉ๋ชจ
BlastDoor๋ ์ ๋ขฐํ ์ ์๋ ๋ฉ์์ง ์ฝํ ์ธ ๋ฅผ ํ์ฑํ๋๋ก ์ค๊ณ๋ ๊ฐํ๋ ์๋น์ค์ด๋ค. ๊ทธ๋ฌ๋ ๊ด์ฐฐ๋ ๋ก๊ทธ๋ ๋ฉ์์ง๊ฐ โknown senderโ๋ก ํ๋ ์ด๋ฐ๋ ๋์ ์ถ๊ฐ ํํฐ(e.g., Blackhole)๊ฐ ์ํ๋ ๋ ๋ณดํธ๊ฐ ์ฐํ๋ ์ ์๋ ๊ฒฝ๋ก๋ฅผ ์์ฌํ๋ค:
IDSDaemon BlastDoor: Disabled for framing messages
SpamFilter Blackhole disabled; user has disabled filtering unknown senders.
์์ฝ:
- ์๋ ํ์ฑ์ ์ฌ์ ํ ์๊ฒฉ zero-click ๊ณต๊ฒฉ ํ๋ฉด์ ์๋ฏธํฉ๋๋ค.
- ์ ์ฑ /์ปจํ ์คํธ ๊ฒฐ์ (์๋ ค์ง ๋ฐ์ ์, ํํฐ๋ง ์ํ)์ ์ค์ ๊ฒฉ๋ฆฌ ์์ค์ ์ค์ง์ ์ธ ๋ณํ๋ฅผ ์ค ์ ์์ต๋๋ค.
CoreAudio: AudioConverterService ํ ์์ (userland RCE)
์ํฅ๋ฐ๋ ๊ตฌ์ฑ ์์:
- CoreAudio โ AudioConverterService โ AAC/AMR/MP4 ํ์ฑ ๋ฐ ๋ณํ ํ๋ฆ
๊ด์ฐฐ๋ ํ์ ์ ์ (๋ก๊ทธ):
AudioConverterService ACMP4AACBaseDecoder.cpp: inMagicCookie=0x0, inMagicCookieByteSize=39
Technique summary:
- ์๋ชป๋ container/codec metadata(e.g., invalid/short/NULL magic cookie)๊ฐ decode setup ๋์ค ๋ฉ๋ชจ๋ฆฌ ์์์ ์ ๋ฐํฉ๋๋ค.
- ์ฌ์ฉ์ ํญ ์์ด iMessage media conversion path์์ ํธ๋ฆฌ๊ฑฐ๋ฉ๋๋ค.
- media parsing ํ๋ก์ธ์ค์์ code execution์ ์ ๋ฐํฉ๋๋ค. write-up์ ๊ด์ฐฐ๋ ์ ๋ฌ ๊ฒฝ๋ก์์ ์ด๊ฒ์ด BlastDoor๋ฅผ ํ์ถํ๋ค๊ณ ์ฃผ์ฅํ๋ฉฐ, ๋ค์ ๋จ๊ณ๋ฅผ ๊ฐ๋ฅํ๊ฒ ํ๋ค๊ณ ํฉ๋๋ค.
Practical tips:
- Fuzz AAC/AMR magic cookie์ MP4 codec atoms์ AudioConverterService conversions ๋์์ผ๋ก ํ ์คํธํ์ธ์.
- decoder initialization ์ฃผ๋ณ์ heap overflows/underflows, OOB reads/writes, ๋ฐ size/length confusion์ ์ง์คํ์ธ์.
PAC bypass via RPAC path (CVE-2025-31201)
arm64e Pointer Authentication (PAC)์ return addresses ๋ฐ function pointers์ ํ์ทจ๋ฅผ ๋ฐฉํดํฉ๋๋ค. ์ฒด์ธ์์๋ arbitrary read/write๊ฐ ๊ฐ๋ฅํด์ง ์ดํ RPAC path๋ฅผ ์ฌ์ฉํด PAC๋ฅผ ๋ฌด๋ ฅํํ๋ค๊ณ ๋ณด๊ณ ํฉ๋๋ค.
Key idea:
- arbitrary R/W๋ก ๊ณต๊ฒฉ์๋ ์ ํจํ re-signed pointers๋ฅผ ์กฐ์ํ๊ฑฐ๋ PAC-tolerant ๊ฒฝ๋ก๋ก ์คํ์ ํผ๋ฒํ ์ ์์ต๋๋ค. ์ด๋ฅธ๋ฐ โRPAC pathโ๋ PAC ์ ์ฝ ํ์์ ์ ์ด ํ๋ฆ์ ๊ฐ๋ฅํ๊ฒ ํ์ฌ userland RCE๋ฅผ ์ ๋ขฐํ ์ ์๋ kernel exploit ์ค์ ์ผ๋ก ์ ํํฉ๋๋ค.
Notes for researchers:
- KASLR์ ๋ฌด๋ ฅํํ๊ณ PAC ํ์์๋ ROP/JOP ์ฒด์ธ์ ์์ ํํ๊ธฐ ์ํด info leak๋ฅผ ์์งํ์ธ์.
- controllable ํ ๋ฐฉ์์ผ๋ก PAC๋ฅผ ์์ฑํ๊ฑฐ๋ ์ธ์ฆํ๋ callsites๋ฅผ ํ์ ์ผ๋ก ์ผ์ผ์ธ์(e.g., attacker-controlled ๊ฐ์ผ๋ก ์์ฑ๋ signatures, ์์ธก ๊ฐ๋ฅํ context keys, ๋๋ pointers๋ฅผ re-signํ๋ gadget sequences).
- SoC/OS์ ๋ฐ๋ฅธ Apple์ hardening ์ฐจ์ด๋ฅผ ์์ํ์ธ์; ์ ๋ขฐ์ฑ์ leak, entropy, ๊ทธ๋ฆฌ๊ณ ๊ฐ๋ ฅํ primitives์ ๋ฌ๋ ค ์์ต๋๋ค.
Kernel escalation: wireless/AMPDU path example
๊ด์ฐฐ๋ ์ฒด์ธ์์, memory corruption๊ณผ PAC bypass primitive๋ก userland์ ์ง์ ํ ์ดํ malformed AMPDU ์ฒ๋ฆฌ ํ์ WiโFi stack(AppleBCMWLAN) ์ฝ๋ ๊ฒฝ๋ก๋ฅผ ํตํด kernel ์ ์ด๊ฐ ๋ฌ์ฑ๋์์ต๋๋ค. ์์ ๋ก๊ทธ:
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 ์ ์ฝ์ ๋ฌด๋ ฅํํ์ฌ ์์ ํ.
Post-exploitation: CryptoTokenKit and identity/signing abuse
์ปค๋์ด ์์๋๋ฉด identityservicesd์ ๊ฐ์ ํ๋ก์ธ์ค๋ฅผ ๊ฐ์ฅํ์ฌ CryptoTokenKit์ ํตํด privileged cryptographic operations๋ฅผ ์ฌ์ฉ์ ํ๋กฌํํธ ์์ด ํธ์ถํ ์ ์๋ค. ์์ ๋ก๊ทธ:
CryptoTokenKit operation:2 algo:algid:sign:ECDSA:digest-X962:SHA256
CryptoTokenKit <sepk:p256(d) kid=9a86778f7163e305> parsed for identityservicesd
์ํฅ:
- Secure Enclaveโbacked ํค๋ฅผ ์ฌ์ฉํด ํ๊ฐ๋์ง ์์ ์๋ช (tokens, messages, payments)์ ์ํํ์ฌ, ํค๊ฐ ๋ด๋ณด๋ด์ง ์๋๋ผ๋ ์ ๋ขฐ ๋ชจ๋ธ์ ํ๊ดดํ ์ ์์ต๋๋ค.
- 2FA ์ฝ๋/๋ฉ์์ง๋ฅผ ์๋ฐํ ๊ฐ๋ก์ฑ๊ณ , ๊ฒฐ์ /์ก๊ธ์ ์น์ธํ๋ฉฐ, ์คํ ์ค ๋ง์ดํฌ/์นด๋ฉ๋ผ/GPS๋ฅผ ํ์ฑํํ ์ ์์ต๋๋ค.
๋ฐฉ์ด ๊ด์ :
- ์ปค๋ ์ดํ ๋ฌด๊ฒฐ์ฑ ์์์ ์น๋ช ์ ์ผ๋ก ๊ฐ์ฃผ: CTK ์๋น์์ ๋ํด ๋ฐํ์ attestation์ ๊ฐ์ ํ๊ณ , ambient authority๋ฅผ ์ต์ํํ๋ฉฐ, ์ฌ์ฉ ์์ ์ entitlements๋ฅผ ๊ฒ์ฆํ์ญ์์ค.
์ฌํ ๋ฐ ํ ๋ ๋ฉํธ๋ฆฌ ํํธ (์คํ์ค ์ ์ฉ)
- Delivery: iMessage/SMS๋ฅผ ํตํด ์กฐ์๋ AMR/MP4-AAC ์ค๋์ค๋ฅผ ๋์ ๊ธฐ๊ธฐ๋ก ์ ์กํฉ๋๋ค.
- ํ์ฑ ๋ฐ ๋ฌด์ ์คํ ๋ฐ์ ์ฃผ์์ ๊ด๋ จ ๋ก๊ทธ ๋ผ์ธ์ ํตํด ํ ๋ ๋ฉํธ๋ฆฌ๋ฅผ ๊ด์ฐฐํฉ๋๋ค.
- ์ฅ์น๋ ์ต์ ํจ์น ์ํ์ธ์ง ํ์ธํ๊ณ , ๊ฒฉ๋ฆฌ๋ ์คํ์ค ํ๊ฒฝ์์๋ง ํ ์คํธํ์ญ์์ค.
์ํ ๋ฐ ํ๋๋ ์์ด๋์ด
- Patch level: iOS 18.4.1์ด ์ด ์ฒด์ธ์ ์์ ํ ๊ฒ์ผ๋ก ๋ณด๊ณ ๋์์ผ๋ ์ฅ์น๋ฅผ ์ต์ ์ํ๋ก ์ ์งํ์ญ์์ค.
- Parser hardening: codec cookies/atoms ๋ฐ ๊ธธ์ด์ ๋ํ ์๊ฒฉํ ๊ฒ์ฆ; ๊ฒฝ๊ณ ๊ฒ์ฌ(bounding) ํฌํจ์ ๋ฐฉ์ด์ ๋์ฝ๋ฉ ๊ฒฝ๋ก๋ฅผ ๊ตฌํํ์ญ์์ค.
- iMessage isolation: ๋ฏธ๋์ด ํ์ฑ์ ๋ํด โknown senderโ ์ปจํ ์คํธ์์ BlastDoor/Blackhole ์ํ๋ฅผ ํผํ์ญ์์ค.
- PAC hardening: PAC-gadget ๊ฐ์ฉ์ฑ์ ์ค์ด๊ณ , ์๋ช ์ด ์์ธก ๋ถ๊ฐ๋ฅํ ์ปจํ ์คํธ์ ๋ฐ์ธ๋ฉ๋๋๋ก ํ๋ฉฐ, PAC-ํ์ฉ ์ฐํ ๊ฐ๋ฅ ํจํด์ ์ ๊ฑฐํ์ญ์์ค.
- CryptoTokenKit: ํค ๋ฐ์ธ๋ฉ ์ฐ์ฐ์ ๋ํด post-kernel attestation๊ณผ ํธ์ถ ์์ ์ ๊ฐํ entitlements๋ฅผ ์๊ตฌํ์ญ์์ค.
- Kernel surfaces: ๋ฌด์ AMPDU/status ์ฒ๋ฆฌ ๋ถ์๋ฅผ ๊ฐํํ๊ณ , ํ์ทจ ํ userland์์ ๊ณต๊ฒฉ์ ์ ์ด ์ ๋ ฅ์ ์ต์ํํ์ญ์์ค.
์ํฅ ๋ฐ๋ ๋ฒ์ (๋ณด๊ณ ๋ ๋ฐ)
- iOS 18.x, iOS 18.4.1 ์ด์ (2025-04-16).
- Primary: CoreAudio โ AudioConverterService (iMessage/SMS๋ฅผ ํตํ ๋ฏธ๋์ด ์๋ ํ์ฑ ๊ฒฝ๋ก).
- Chained: PAC/RPAC ๊ฒฝ๋ก ๋ฐ AppleBCMWLAN AMPDU ์ฒ๋ฆฌ๋ฅผ ํตํ ์ปค๋ ๊ถํ ์์น.
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 ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


