Windows Kernel Intel x64 SYSRET Vulnerability + Code Signing Bypass Bonus
UPDATE : I’ve just tested the exploit on Windows 2008 R2 SP1 x64, exploit works like a charm without any modification.
Hi again,
This time I worked on Kernel-Land a little. Microsoft Windows Kernel Intel x64 SYSRET Vulnerability (MS12-042) was only exploited by VUPEN, apparently!, But no PoC or exploit publicly available. So I decided to work on this challenge just for fun.At first glance, it was difficult to get Code-Execution but after several times struggling with Windbg I finally succeeded on triggering the bug and get code-execution.
By the way, Windbg had stupid bug on executing SWAPGS by single-stepping! I don’t really know why, but the guest VM always reboots!
I managed to get it to work with IDA Pro + GDB remote Debugging plugin after all!
So, anyway, here is the demonstration:
The shellcode disables Code Signing and will grant NT SYSTEM privilege to specified Application or already running process (PID), After successfully running exploit, I demonstrated installing an unsigned Driver (which Dbgprints “Microsoft eats it own dog food –
http://en.wikipedia.org/wiki/Eating_your_own_dog_food
) and granting NT SYSTEM privilege to cmd.exe .
*** WARNING: This is only a proof-of-concept, Although its programmed to be very reliable, But I won’t take any responsibility of any damage or abuse. Sorry kids!
Here are source codes.
Potential MinHook sources:
http://www.codeproject.com/Articles/44326/MinHook
https://github.com/jarredholman/minhook
Seems Minihook has boost dependency and the libMinihook.x86.lib (the static one) wont worked for me,
that’s why I used dynamic one and yes the source code is public!