Achieving Linux Kernel Code Execution Through a Malicious USB Device
summary
Exploit demonstrates a USB-triggered double free in the USB MIDI stack (CVE-2016-2384) that corrupts the slab free list and forces the kernel to repeatedly return the same 512‑byte slab chunk, enabling a crafted sequence of three allocations to convert that loop into an arbitrary kernel write. A HID report descriptor is used to supply controlled data, timing is coordinated with a USB device emulator and the FaceDancer framework to trigger free, disconnect, reconnect and payload delivery; final payload overwrites writable kernel code, schedules work on the system workqueue and launches a root shell.
AI-written summary · about
chapters (19)
- 0:00Introduction to USB attacks
- 1:03Why USB attacks matter
- 2:06The forgotten vulnerability
- 3:55Target device specifics
- 4:58Triggering the vulnerability
- 7:06Linux memory allocator basics
- 9:37Exploitation approach overview
- 10:19Heap analysis and constraints
- 13:51Arbitrary write primitive
- 14:13USB HID protocol details
- 16:43Developing the exploit
- 18:31Emulator vs real device
- 19:32Facedancer framework setup
- 20:35Payload design and execution
- 23:05Cleanup and persistence
- 26:55Live attack demonstration
- 29:03Attack challenges and mitigations
- 31:10Applicability and requirements
- 32:13Final takeaways and conclusion
