12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4. The assumed address of l_open() gets referenced and called.5. The value at the assumed address of l_open() gets copied into theinstruction pointer (EIP register).0xFFFFFFFFKernel(3)(4)(2)(1)(5)linesw[t].l_openEIP0x00000000Figure 7-1: Description of the vulnerability that I discovered in theXNU kernel of OS XBecause the value of t is supplied by the user (see (2)), it is possibleto control the address of the value that gets copied into EIP.7.2 ExploitationAfter I found the bug, I did the following to gain control over EIP:• Step 1: Trigger the bug to crash the system (denial of service).• Step 2: Prepare a kernel-debugging environment.• Step 3: Connect the debugger to the target system.• Step 4: Get control over EIP.Step 1: Trigger the <strong>Bug</strong> to Crash the System (Denial of Service)Once I had found the bug, it was easy to trigger it and cause a systemcrash. All I had to do was send a malformed TIOCSETD IOCTL requestto the kernel. Listing 7-2 shows the source code of the POC I developedto cause a crash.A <strong>Bug</strong> Older Than 4.4BSD 119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!