RottenPotato local privilege escalation from service account to SYSTEM
RottenPotato – Local Privilege Escalation from Windows Service Accounts to SYSTEM
The idea behind this vulnerability is simple to describe at a high level:
- Trick the “NT AUTHORITY\SYSTEM” account into authenticating via NTLM to a TCP endpoint we control.
- Man-in-the-middle this authentication attempt (NTLM relay) to locally negotiate a security token for the “NT AUTHORITY\SYSTEM” account. This is done through a series of Windows API calls.
- Impersonate the token we have just negotiated. This can only be done if the attackers current account has the privilege to impersonate security tokens. This is usually true of most service accounts and not true of most user-level accounts.
- Use ILMerge to combine Potato.exe, SharpCifs.dll NHttp.dll, and Microsoft.VisualStudio.OLE.Interop.dll. This will produce a single, portable binary.
- Get a meterpreter shell on the target system
- use incognito
- Run the binary from step.2
- impersonate_token “NT AUTHORITY\SYSTEM”
Rotten Potato – MSSQL Privilege Escalation
Rotten Potato – IIS Privilege Escalation
For a technical overview of this exploit see our blog post here.