System Internals

Apple internals #9: SPTM, TXM and memory tagging

Page-table writes and code-signing decisions left the kernel's privilege level. A kernel with arbitrary read/write must ask two monitors, SPTM and TXM, instead.

Adam Taguirov, 22 min iosmacosxnusptm
System Internals

Apple internals #8: Pointer authentication

On arm64e the hardware signs the pointers worth hijacking and checks them on use. The key is out of reach of any memory write, so attacks work around it.

Adam Taguirov, 18 min iosmacosarm64epac
System Internals

Apple internals #7: The zone allocator up close

A memory-corruption bug is worth little until you decide what sits next to what you corrupted. Since iOS 15 the allocator decides that, not you.

Adam Taguirov, 18 min iosmacosxnuexploitation
System Internals

Apple internals #6: Mach messages, MIG and XPC

One way out of a sandbox is a service doing exactly what it was built to do, for a caller it misidentified. Mach messages, MIG, XPC, and what decides it.

Adam Taguirov, 18 min iosmacosxpcmach
System Internals

Apple internals #5: IOKit up close

IOKit is the widest kernel surface a sandboxed iOS process can reach: hundreds of drivers, each vending a user client. Where the bugs live, plus CVE-2022-32832.

Adam Taguirov, 17 min iosiokitxnuuser-client
System Internals

Apple internals #4: The iOS sandbox

AMFI decides what may run; the sandbox decides what a process may touch. The profile is that list, and escaping is more often reading it than corrupting memory.

Adam Taguirov, 15 min iossandboxmacfsbpl
System Internals

Apple internals #3: The iOS code-signing pipeline

AMFI's rejection is the last line of a longer check: a MACF module and a verdict keyed on one 20-byte cdhash, from trust cache through CoreTrust to amfid.

Adam Taguirov, 20 min iosamfimacfcode-signing
System Internals

Apple internals #2: XNU under the hood

XNU taken apart from an attacker's view: the Mach and BSD hybrid, the port-as-capability model the whole iOS security stack rests on, and what tfp0 actually is.

Adam Taguirov, 17 min iosxnumachbsd
System Internals

Apple internals #1: The iOS chain of trust

iOS runs nothing it hasn't verified. The boot chain walked in reverse, from the Boot ROM through iBoot and Image4 to the kernelcache, with a stop at checkm8.

Adam Taguirov, 16 min iosapplesecure-bootimage4
System Internals

Apple internals #0: The Apple security stack

The index for the series: ten posts from the SecureROM to objc_msgSend, what each layer of the iOS security stack decides, and which post covers which layer.

Adam Taguirov, 7 min iosapplexnuiokit
Reverse Engineering

How I broke Rhysida ransomware encryption

Rhysida derives every per-file AES key from a PRNG seeded with the encryption timestamp. Recover the timestamp and you regenerate every key.

Adam Taguirov, 14 min ransomwarereverse-engineeringcryptographymalware-analysis
Vulnerability Research

Sigreturn-oriented programming

One syscall reloads the whole CPU context from the stack. Forge the frame it reads and you control every register in one step. The technique we are named after.

Adam Taguirov, 8 min exploitationlinuxx86-64rop
Reverse Engineering

Building the smallest ELF program

From a default 16,704-byte hello world down to 73 bytes: stripping the toolchain layer by layer, removing sections, and overlapping the ELF and program headers.

Adam Taguirov, 21 min elflinuxassemblyx86-64
Vulnerability Research

Javascript engine exploitation methodology

Recording of my talk on Javascript engine exploitation methodology, given in French at Quarks in the Shell 2023 (Quarkslab).

Adam Taguirov, 1 min browserjavascriptexploitationtalk
Vulnerability Research

ActiveX controller exploitation

Exploiting CVE-2011-4187, a stack buffer overflow in Novell iPrint Client's ActiveX component, from CVE ID to arbitrary code execution on Windows XP.

Adam Taguirov, 16 min cvereverse-engineeringexploitationwindows
Reverse Engineering

Recovering payloads from PE resources

A packer hides a compressed payload in a PE's .rsrc section and unpacks it in memory at runtime. Reconstructed end to end, so you can pull the payload out.

Adam Taguirov, 8 min malwarepackerswindowspe
System Internals

Two ways into ring 0: system calls and kernel modules

Two ways to cross the Linux user/kernel boundary: a system call compiled into the kernel, and a module loaded at runtime. Both built, tested and contrasted.

Adam Taguirov, 17 min linuxkernelsyscallkernel-module