12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Aavmker4.sys(2)input data length == 0x878?Kernel Space(3)Does the user input contain the values0xD0DEAD07 and 0x10BAD0BA?\Device\AavmKer4(4)IOCTL request:0xB2D60030(1)User Spacememcpy (user_controlled_address,user_controlled_value, 0x868)(5)Memory Corruption!Figure 6-6: Overview of the vulnerability from IOCTL request to memory corruption3. The driver checks whether the user-controlled IOCTL input datacontains the values 0xD0DEAD07 and 0x10BAD0BA. If so, proceed tostep 4.4. The erroneous memcpy() call is executed.5. The memory is corrupted.6.2 ExploitationTo gain control of EIP, I first had to find a suitable target address tooverwrite. While searching through the IOCTL dispatch routine, Ifound two places where a function pointer is called:[..].text:00010D8F push 2 ; _DWORD.text:00010D91 push 1 ; _DWORD.text:00010D93 push 1 ; _DWORD.text:00010D95 push dword ptr [eax] ; _DWORD.text:00010D97 call KeGetCurrentThread.text:00010D9C push eax ; _DWORD.text:00010D9D call dword_12460 ; the function pointer is called.text:00010DA3 mov [ebx+18h], eax.text:00010DA6 jmp loc_10F04[..].text:00010DB6 push 2 ; _DWORD.text:00010DB8 push 1 ; _DWORDOne Kernel to Rule Them All 103

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

Saved successfully!

Ooh no, something went wrong!