Skip to content

macOS:iOS Kernel Debugging and Heap Feng Shui

Min Zheng, Xiangyu Liu

Kernel debugging techniques and heap feng shui methods for iOS and macOS kernel exploitation.

Summary

Kernel Debugging Challenges

Kernel bugs are difficult to reproduce and often cause system panic. Kernel debugging is necessary for panic analysis, but kernel code cannot execute in debuggers, making tracking difficult.

macOS Kernel Debugging Kit

macOS provides powerful kernel debugging through KDK (Kernel Development Kit). This tool assists in analyzing panic scenes and developing kernel exploits.

iOS Kernel Debugging

While iOS lacks official kernel debugger, kernel debugging is still possible through leveraging tricks and techniques. The presentation shares kernel debugging methods specific to latest iOS/macOS versions.

Heap Mitigations and Bypass

New kernel heap mitigation mechanisms on iOS 10/macOS 10.12 are analyzed. Two novel heap feng shui techniques bypass these mitigations. Concrete kernel heap overflow bug debugging demonstrates leveraging new heap feng shui to gain arbitrary kernel memory read/write on iOS 10.2/macOS 10.12.

Related talks