-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Add Window Server 2012 SrClient DLL Hijacking local exploit module and docs #14776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Notes:
|
In response to questions about reliability, to make this a safer exploit, it would also be possible to add an extra check to the module to see if |
I just realized that the module currently enumerates through all |
Does the windows update have to hit the server? My 2012 server is on an isolated network, so it can't actually talk to the microsoft server, and this appears to fail:
|
@bwatters-r7 I'm not sure, but it could be, because my test machine was able to reach the update server. It may also depend on the specific |
Ah that's good to know @bwatters-r7 ! I will make sure to add a check for this. Just to confirm, when auto update is in this kind of |
I am relatively sure I hardcoded both methods and attempted them. The default method (non-stealthy, I believe, because there was a pop-up for updating) breaks the updater and produces a consistent error code. It even gives the same error after a reboot when you try to start up the updater manually. I'll fire up my test machine and verify it all today. |
Sounds good @bwatters-r7 ! The default method is indeed non-stealthy now, due to the |
I think the stealthy/nonstealthy is fine as-is. I've verified that in the default state, the registry key exists, but the value is nil. I went ahead and did a quick edit locally and added a
|
…en TiWorker.exe is already running on the target
Hi @bwatters-r7 I have incorporated all the suggested changes in the latest commit. In particular, I have made the following changes:
Note about |
@kalba-security Thanks for the updates! I'm in the middle of something else right now, but I'll pick this back up on Monday; I just wanted you to know I have not forgotten about this! |
Sounds good, thanks for letting me know :) |
Before Windows Update is configured:
After enabling Windows Update and rebooting...
|
The latest commit removes that unnecessary comment and updates the documentation to mention the |
Release NotesNew module |
About
This change adds a new local exploit module for a Windows Server 2012 DLL hijacking vulnerability that I recently discovered. This is a 0-day, but it won't be patched because it requires %PATH% to include directories that are writable by low-privileged users, and Microsoft won't patch %PATH% DLL Hijacking issues. That's why there is no CVE information, and there won't be.
A full write-up is available here
I also published two demo video:
Vulnerable Application
All editions of Windows Server 2012 (but not 2012 R2) are vulnerable to DLL hijacking due to the way
TiWorker.exe
will try to call the non-existentSrClient.dll
file when Windows Update checks for updates. This issue can be leveraged for privilege escalation if %PATH% includes directories that are writable by low-privileged users. The attack can be triggered by any low-privileged user and does not require a system reboot.This exploit has several limitations
Windows Server 2012 VM images are available at the Microsoft Evaluation Center here.
Verification Steps
use modules/exploit/windows/local/srclient_dll_hijacking
set SESSION [SESSION ID]
run
Options
WRITABLE_PATH_DIR
The full path to a writable %PATH% directory to write the payload to. If this is not set,
the module will enumerate the %PATH% directories and try to find one that is writable by the current user.
STEALTH_ONLY
If this is enabled, the module will only exploit the target if this is possible by triggering the payload via the
WUAUCLT /DetectNow
command, which will launch Windows Update in the background.This means that exploitation will not proceed if Windows Update is set to never check for updates on the target.
Scenarios
Windows 2012 x64 - %PATH% enumeration (default) with Verbose set to true
Windows 2012 x64 - WRITABLE_PATH_DIR option set, Verbose set to false