Exploiting MS15-076 (CVE-2015-2370)
A few weeks ago (July 14, 2015), Microsoft had a busy patch Tuesday fixing quite a few privilege escalation vulnerabilities. Among these was a bug in DCOM/RPC which allows for an NTLM authentication challenge to be reflected back to a listening TCP socket. This issue was found by James Forshaw (@tiraniddo) with the Google Security Research team. The details of this bug and potential exploit paths are covered in his write up here. Along with this write up came a PoC that utilized NTLM reflection, IStorage objects, a Junction, and some clever path trickery to get a SYSTEM process to write a file to ‘C:Windows (2)’ without the user having admin privileges. Now this isn’t particularly useful if you are attempting to leverage this vulnerability to escalate privileges. So, naturally the goal became modifying the exploit to an arbitrary file write at any location on disk.
Luckily, Forshaw has also done research into Symbolic Links and Junctions which can used to weaponize this exploit. Here is a link to his slides on the topic from SyScan’15 along with his GitHub code here.
Now the piece we want to extract from all of this is the unprivileged file level symbolic link tactic (CreateSymlink). Essentially this uses a junction in combination with a symbolic link written to the global namespace in RPC Control to get a C:FolderFileA pointing to C:FileB without administrative privileges. Let’s walk through what it takes to get the a file written to ‘C:WindowsSystem32Evil.dll’.
- Make a directory junction from ‘C:WindowsTemp{Random}’ to ‘C:UsersPublicLibrariesSym’
- Make another junction from ‘??C:UsersPublicLibrariesSym’ to ‘RPC Control’
- Make a symlink from ‘RPC Control (2)’ to ‘??C:WindowsSystem32Evil.dll’
- The exploit will attempt to write a file to ‘C:WindowsTemp{Random}/’ which points to ‘C:WindowsSystem32Evil.dll’
Note that steps 2 and 3 are performed together in the CreateSymlink project.
Modifying the PoC code with the above tricks, we can now copy any file to a privileged location. We’re calling finished product ‘Trebuchet’.

You might be thinking, “So what? It’s just an arbitrary file write.” We’ll leave weaponization specifics up to the reader, but if you’re familiar with DLL hijacking, then privilege escalation shouldn’t be difficult from here. The full PoC code can be found here.
Some things to note:
- The exploit can only be ran once every 2-3 minutes. RPC gets held up by LocalSystem.
- The Interop DLL must be in the same directory as the exploit (for now).
- Only limited testing on Windows 7/8.1 x64 and x86 has been performed.
- All of the licensed code belongs to Google and/or James Forshaw, and a big thanks to him for all the material and his great research.
- Most of this code could be cleaned up and/or simplified.
Explore More Blog Posts
Stealing the Artifact – JFrog Artifactory Vulnerability
Discover how NetSPI uncovered and reported vulnerabilities in JFrog Artifactory that allowed unauthenticated attackers to bypass authentication and steal an arbitrary artifact.
Azure VM Command Execution using Third-Party Extensions – Salt Minion
In part two of our series, learn how attackers can leverage this legitimate tool to achieve undetected, arbitrary code execution as root, and explore the key detection methods you need to protect your Linux and Windows environments.
Azure VM Command Execution using Third-Party Extensions – Chef
Discover how a privileged principal in Azure can abuse third-party extensions like Chef to achieve arbitrary command execution on target VMs by deploying malicious cookbooks to extract Managed Identity tokens.