User Privileges

Dangerous Privileges

whoami /priv
Enumeration

Dangerous privileges:

SeBackupPrivilege

SeLoadDriverPrivilege

SeImpersonatePrivilege

SeDebugPrivilege

SeTcbPrivilege

SeAssignPrimaryToken

SeTakeOwnershipPrivilege

Enable privileges

When a privilege is listed for our account in the Disabled state, it means that our account has the specific privilege assigned. Still, it cannot be used in an access token to perform the associated actions until it is enabled. Windows does not provide a built-in command or PowerShell cmdlet to enable privileges, so we need some scripting to help us out.

cmd

Powershell

SeImpersonate

MSSQL (1433)

Juicy Potato

CLSID Problems

PrintSpoofer

RoguePotato

EfsPotato

SigmaPotato (GREAT POTATO 🎉)

GodPotato

Rust implementation

CoercedPotato

DeadPotato

Obtain SYSTEM privilege

Other Potatoes

RemotePotato (User to DA) and LocalPotato (User to NT AUTHORITY\SYSTEM)

NTLM elevation of privilege

SeAssignPrimaryToken

This can be abused with JuicyPotato or JuicyPotatoNG

SeDebugPrivilege

LSASS Dump

Use ProcDump from the SysInternals suite to leverage this privilege and dump process memory.

Load this in Mimikatz using the sekurlsa::minidump command. After issuing the sekurlsa::logonPasswords commands, we gain the NTLM hash of the local administrator account logged on locally. We can use this to perform a pass-the-hash attack to move laterally if the same local administrator password is used on one or multiple additional systems (common in large organizations).

MimikatzPass the Hash (PtH)

Remote Code Execution

Load the script and run it with the following syntax [MyProcess]::CreateProcessFromParent(<system_pid>,<command_to_execute>,"")

Serch winlogon.exe PID, because we know this process runs as SYSTEM on Windows hosts.

Or with Get-Process to grab the PID of a well-known process that runs as SYSTEM (such as LSASS) and pass the PID directly to the script:

Often we will not have RDP access to a host, so we'll have to modify our PoCs to either return a reverse shell to our attack host as SYSTEM or another command, such as adding an admin user.

Other Tool

SeTakeOwnershipPrivilege

Owner ?

Change ownership of the file

if ERROR: File or Directory not found. remove the quote takeown /f C:\TakeOwn\flag.txt

Grant our user full privileges over the target file

When to use it ?

Files of Interest

.kdbx KeePass database files, OneNote notebooks, files such as passwords.*, pass.*, creds.*, scripts, other configuration files, virtual hard drive files, and more that we can target to extract sensitive information from to elevate our privileges

Credentials Hunting

SeBackupPrivilege

See Backup Operators in Group Privileges

pwn.txt

NXC

SeLoadDriverPrivileges

SeTcbPrivilege

SeRestorePrivilege

SeManageVolumePrivilege

Resources

Last updated