πŸ”SeDebugPrivilege

🎯 Overview

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.

πŸ”‘ Privilege Fundamentals

SeDebugPrivilege Capabilities

  • Memory access to critical OS components

  • Process debugging including system processes

  • LSASS dumping for credential extraction

  • Token manipulation for privilege escalation

Common Assignment Contexts

# Local/Domain Group Policy assignment:
Computer Settings > Windows Settings > Security Settings > Local Policies > User Rights Assignment
"Debug programs" = SeDebugPrivilege

Target Users:

  • Developers - for system component debugging

  • System admins - for troubleshooting purposes

  • Service accounts - for application debugging

πŸ“Š Privilege Detection

Enumeration

Important Notes:

  • Privilege shows as Disabled by default

  • Elevated shell required to utilize

  • Automatically enabled when running privileged operations

πŸ’Ύ LSASS Memory Dumping

Method 1: ProcDump (SysInternals)

Prerequisites

LSASS Process Dump

Credential Extraction with Mimikatz

Method 2: Task Manager (GUI)

Manual LSASS Dump

  1. Open Task Manager (Ctrl+Shift+Esc)

  2. Navigate to Details tab

  3. Find lsass.exe process

  4. Right-click β†’ Create dump file

  5. Download dump file to attack system

  6. Process with Mimikatz using same commands

⬆️ SYSTEM Privilege Escalation

Token Impersonation Technique

Concept

  • Parent process targeting - identify SYSTEM processes

  • Token inheritance - child process inherits parent token

  • Process creation - spawn elevated child process

PowerShell PoC Script

Process ID Enumeration

Process Impersonation

Verification

🎯 HTB Academy Lab Solution

Lab Environment

  • Target: 10.129.43.43 (ACADEMY-WINLPE-SRV01)

  • Credentials: jordan:HTB_@cademy_j0rdan!

  • Access Method: RDP

  • Objective: Obtain NTLM hash for sccm_svc account

Step-by-Step Solution

1. RDP Connection

2. Verify SeDebugPrivilege

3. LSASS Memory Dump

4. Credential Extraction

5. Locate sccm_svc Hash

6. Submit Hash

Alternative Approaches

PowerShell-Based Extraction

Task Manager Method

πŸ” Detection Indicators

Process Activity

Event Logs

  • 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)

πŸ›‘οΈ Defense Strategies

Privilege Hardening

Monitoring and Detection

LSASS Protection

πŸ“‹ SeDebugPrivilege Exploitation Checklist

Prerequisites

LSASS Dumping Steps

SYSTEM Escalation Steps

πŸ’‘ Key Takeaways

  1. SeDebugPrivilege enables powerful memory access capabilities

  2. LSASS dumping reveals cached credentials for logged-on users

  3. Multiple extraction methods available (ProcDump, Task Manager)

  4. Token impersonation allows direct SYSTEM escalation

  5. Developer accounts commonly have this privilege assigned

  6. Detection possible through process monitoring and event logs


SeDebugPrivilege exploitation provides reliable access to system credentials and SYSTEM-level privileges when properly leveraged.

Last updated