Windows Privileges
Windows Privileges
Privilege check command: whoami /priv
We can enable all privileges if possible using this script:
Examples of dangerous privileges:
SeRestore
SeRestoreAbuse.exe "cmd /c C:\users\user\reverse.exe"SeRestoreAbuse.exe "cmd /c net localgroup administrators user /add"ren C:\Windows\System32\utilman.exe utilman.oldSeBackup
OR
Alternate Method to transfer the Hives: reg.py remotely on Linux
Alternate Method: SeBackupPrivilegeUtils https://github.com/giuliano108/SeBackupPrivilege
Usage:
Alternate Method: Robocopy
Alternate Method: Volume Shadow Copy
SeTakeOwnership
Example: Utilman.exe
SeImpersonate/SeAssignPrimaryToken
A lot of potato exploits work with these privileges, so in our example we will talk about RoguePotato.
Tool: PrintSpoofer
Link: https://github.com/itm4n/PrintSpoofer/releases/tag/v1.0
Tool: Invoke-BadPotato
Link: https://github.com/S3cur3Th1sSh1t/PowerSharpPack/blob/master/PowerSharpBinaries/Invoke-BadPotato.ps1
Tool: RottenPotato
SeDebug Privilege
Tools: Meterpreter, https://github.com/decoder-it/psgetsystem
Steps:
Alternate method: Powershell
TIP: If the SeDebug Privilege is disabled, we can enable it with psgetsystem powershell script (Link attached at the top of this attack's explanation)
Alternate Method for SeImpersonate and SeDebug:
SeCreatePagefile
Steps:
SeLoadDriver
Steps
SeRelabel
SeTrustedCredManAccess
SeManageVolumeAbuse
1) Check for permission
2) Download and run the executable on target
3) Create the malicious DLL
4) Transfer the DLL to the victim in C:\Windows\System32\wbem\tzres.dll
5) Setup listener
6) Run systeminfo to trigger the DLL
Last updated