- Module Overview
- Situational Awareness
- Initial Enumeration
- Communication with Processes
- SeImpersonate & SeAssignPrimaryToken
- SeDebugPrivilege
- SeTakeOwnershipPrivilege
- Windows Built-in Groups
- Event Log Readers
- DnsAdmins
- Hyper-V Administrators
- Print Operators
- Server Operators
- UAC Bypass
- Weak Permissions
- Kernel Exploits
- Vulnerable Services
- Credential Hunting
- Other Files
- Further Credential Theft
- Citrix Breakout
- Interacting with Users
- Pillaging
- Miscellaneous Techniques
- Windows Server 2008
- Windows 7 Exploitation
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Module Overview
🎯 Overview
Windows privilege escalation techniques for penetration testing and CPTS preparation. This section covers systematic approaches to elevating privileges from a low-privileged user account to local administrator or system-level access.📚 Module Structure
🔍 Initial Assessment
- Situational Awareness - Network enumeration, security protections, system context
- Initial Enumeration - System info, processes, users, groups, and services enumeration
- Communication with Processes - Network services and named pipes analysis
🏛️ User and Group Privileges
- SeImpersonate & SeAssignPrimaryToken - Token impersonation attacks (Potato techniques)
- SeDebugPrivilege - LSASS memory dumping and SYSTEM privilege escalation
- SeTakeOwnershipPrivilege - File ownership takeover and ACL manipulation
- Windows Built-in Groups - Backup Operators, SeBackupPrivilege, and NTDS.dit extraction
- Event Log Readers - Event log analysis and credential extraction from command lines
- DnsAdmins - DNS service DLL injection and Domain Controller privilege escalation
- Hyper-V Administrators - VM cloning attacks and hard link exploitation
- Print Operators - SeLoadDriverPrivilege exploitation and Capcom.sys driver attacks
- Server Operators - Service control, binary path modification, and local administrator access
- UAC Bypass - User Account Control bypass via DLL hijacking and auto-elevating binaries
- Weak Permissions - File system ACLs, service permissions, unquoted paths, and registry exploitation
- Kernel Exploits - Historical and modern Windows kernel vulnerabilities for privilege escalation
- Vulnerable Services - Third-party application exploitation and service-based privilege escalation
- Credential Hunting - File system credential discovery, PowerShell history, and DPAPI decryption
- Other Files - Advanced credential hunting in StickyNotes, system files, and network shares
- Further Credential Theft - Browser credentials, password managers, LaZagne, SessionGopher, and registry-stored credentials
- Windows User Privileges - Token privileges and abuse techniques
- Windows Group Privileges - Dangerous group memberships and exploitation
🎯 Attack Vectors
- Attacking the OS - Kernel exploits, service misconfigurations
- Credential Theft - LSASS, registry, memory-based attacks
- Service Exploitation - Unquoted service paths, weak permissions
- Scheduled Task Abuse - Task scheduler misconfigurations
🔒 Restricted Environments
- AppLocker Bypass - Application whitelisting evasion
- AMSI Bypass - Antimalware Scan Interface evasion
- UAC Bypass - User Access Control circumvention
🛠️ Additional Techniques
- DLL Hijacking - DLL search order exploitation
- Registry Exploitation - Registry-based privilege escalation
- File System - NTFS permissions and symbolic links
- Windows Subsystem - WSL and containerization issues
🏚️ Legacy Systems
- End of Life Systems - Windows 7, Server 2008 specific techniques
- Legacy Service Exploitation - Deprecated service vulnerabilities
🎯 Learning Objectives
- Systematic enumeration - Comprehensive information gathering
- Attack vector identification - Spotting escalation opportunities
- Tool proficiency - PowerShell, WinPEAS, PrivescCheck
- Evasion techniques - Bypassing security controls
- Persistence methods - Maintaining elevated access
🛠️ Common Tools
📋 Quick Assessment Checklist
- Current user privileges (
whoami /priv) - Group memberships (
whoami /groups) - Running services (
Get-Service) - Network configuration (
ipconfig /all) - Installed software (
Get-WmiObject Win32_Product) - Security protections (
Get-MpComputerStatus) - Scheduled tasks (
Get-ScheduledTask) - File/folder permissions (
icacls)
This section provides comprehensive coverage of Windows privilege escalation techniques aligned with the CPTS certification requirements.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Situational Awareness
🎯 Overview
Situational awareness is the first critical step in Windows privilege escalation. Before attempting any escalation techniques, we must understand:- Network topology and dual-homed systems
- Security protections in place (AV, EDR, AppLocker)
- System context and current privileges
- Network connectivity and potential lateral movement paths
“We cannot function and react effectively without an understanding of our current surroundings”
🌐 Network Information Gathering
Interface and IP Address Enumeration
Basic Network Configuration
Key Network Details to Note
ARP Cache Analysis
- Recent communications - Shows hosts recently contacted
- Network discovery - Identifies active hosts on each network
- Lateral movement targets - Potential next hop systems
- Administrative patterns - RDP/WinRM connection evidence
Routing Table Examination
Advanced Network Discovery
🛡️ Security Protection Enumeration
Windows Defender Status
AntivirusEnabled- AV engine statusRealTimeProtectionEnabled- Live scanningBehaviorMonitorEnabled- Behavioral analysisOnAccessProtectionEnabled- File access monitoring
AppLocker Policy Assessment
- Executable Rules - Controls .exe, .com files
- Windows Installer Rules - Controls .msi, .msp files
- Script Rules - Controls .ps1, .bat, .cmd files
- Packaged App Rules - Controls Windows Store apps
- DLL Rules - Controls .dll files (rarely used)
AppLocker Bypass Indicators
Additional Security Services
🔍 System Context Assessment
Current User and Privileges
System Information
📋 Situational Awareness Checklist
Network Assessment
- Multiple interfaces identified - Check for dual-homed systems
- Internal networks mapped - Document accessible network segments
- ARP cache analyzed - Note recent communication patterns
- Routing table reviewed - Understand network topology
- Active connections listed - Identify current network activity
Security Posture
- Windows Defender status - Determine AV/EDR protection level
- AppLocker rules assessed - Understand execution restrictions
- Firewall configuration - Check for outbound restrictions
- Security services identified - Note EDR/monitoring tools
- Admin privileges confirmed - Verify current access level
System Context
- User privileges enumerated - Document current user context
- Group memberships verified - Check for privileged groups
- System version identified - Note OS version and patch level
- Installed software cataloged - Identify potential attack vectors
🎯 HTB Academy Lab - Situational Awareness
Lab Environment
- Target: Windows system accessible via RDP
- Credentials:
htb-student:HTB_@cademy_stdnt! - Objective: Identify network configuration and security restrictions
Lab Questions
Question 1: Network Interface Discovery
Objective: Find the IP address of the other NIC attached to the target hostQuestion 2: AppLocker Executable Restrictions
Objective: Identify which executable (other than cmd.exe) is blocked by AppLockerpowershell.exe- PowerShell interpretercmd.exe- Command prompt (mentioned as blocked)net.exe- Network configuration utilitywmic.exe- Windows Management Instrumentation tool
Expected Results
💡 Key Takeaways
- Network topology understanding - Dual-homed systems provide lateral movement opportunities
- Security awareness - Early protection enumeration prevents detection
- Context establishment - Know your current privileges before escalation attempts
- Tool restrictions - AppLocker policies affect available attack vectors
- Systematic approach - Complete situational awareness before technical exploitation
This guide covers the essential first step in Windows privilege escalation - gathering comprehensive situational awareness to inform subsequent attack strategies.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Initial Enumeration
🎯 Overview
Initial enumeration is crucial for identifying privilege escalation paths. After gaining low-privileged access, we must systematically gather information about the system, users, services, and configurations to find attack vectors.🖥️ System Information
Process Enumeration
Environment Variables
- Custom applications in PATH (Python, Java)
- Writable directories in PATH (DLL injection)
- Order matters: left-to-right execution priority
Detailed System Information
🔄 Patches and Updates
Hotfix Enumeration
📦 Installed Programs
Software Discovery
- FileZilla/Putty - Credential storage (LaZagne)
- Java/Python - Version vulnerabilities
- Custom applications - Privilege escalation vectors
- Development tools - Source code access
🌐 Network Services
Active Connections
👥 User & Group Enumeration
Current User Context
SeImpersonatePrivilege- Juicy Potato attacksSeAssignPrimaryTokenPrivilege- Token manipulationSeTakeOwnershipPrivilege- File ownership changesSeBackupPrivilege- File access bypass
User Discovery
Group Analysis
- Administrators - Local admin access
- Backup Operators - File access, backup rights
- Server Operators - Service control
- Account Operators - User/group management
- Print Operators - Load driver privilege
Session Information
Account Policies
🎯 HTB Academy Lab Solutions
Lab Environment
- Target:
10.129.43.43(ACADEMY-WINLPE-SRV01) - Credentials:
htb-student:HTB_@cademy_stdnt!
Question 1: Non-default User Privileges
Command:SeTakeOwnershipPrivilege
Question 2: Backup Operators Group Member
Command:sarah
Question 3: Service on Port 8080
Commands:tomcat8
Question 4: Logged-in User
Command:sccm_svc
Question 5: Session Type
Command:console
📋 Essential Enumeration Checklist
System Context
- OS version and patches (
systeminfo) - Running processes (
tasklist /svc) - Environment variables (
set) - Installed software (
wmic product get name) - Network services (
netstat -ano)
User Context
- Current user privileges (
whoami /priv) - Group memberships (
whoami /groups) - All local users (
net user) - Local groups (
net localgroup) - Administrators group (
net localgroup administrators) - Logged-in users (
query user) - Password policy (
net accounts)
⚡ Quick Reference Commands
💡 Key Takeaways
- Systematic approach - Don’t skip basic enumeration steps
- Privilege identification - Special privileges = escalation paths
- Service analysis - Non-standard services often vulnerable
- Group membership - Powerful groups provide direct escalation
- Environment awareness - PATH, shares, and custom configurations matter
- Session monitoring - Other logged-in users = additional targets
This enumeration phase sets the foundation for successful privilege escalation by providing comprehensive system and user context.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Communication with Processes
🎯 Overview
Process communication analysis focuses on identifying privilege escalation opportunities through running services and inter-process communication. Processes running with elevated privileges, especially those accessible via network services or named pipes, can provide direct escalation paths.🔑 Access Tokens
Concept
- Access tokens describe the security context of processes/threads
- Contain user identity and privilege information
- Token presentation occurs with every process interaction
- Token inheritance from parent processes
SeImpersonatePrivilege- Rogue/Juicy/Lonely Potato attacksSeAssignPrimaryTokenPrivilege- Token manipulationSeDebugPrivilege- Process debugging and memory access
🌐 Network Service Enumeration
Active Connections Analysis
Target Service Categories
🎯 High-Value Services:- Port 21 - FTP (FileZilla Server)
- Port 80/8080 - Web servers (IIS, XAMPP, Tomcat)
- Port 3389 - RDP
- Port 5985/5986 - WinRM
- Port 1433 - MSSQL
Service-to-Process Mapping
🔄 Named Pipes
Concept
- Named pipes enable inter-process communication via shared memory
- Client-server model - creator is server, communicator is client
- Communication types:
- Half-duplex - One-way (client → server)
- Full-duplex - Two-way communication
Named Pipe Enumeration
Using Pipelist (Sysinternals)
Using PowerShell
Named Pipe Security Analysis
Permission Enumeration with AccessChk
Dangerous Permission Patterns
🚨 Common Attack Vectors
Web Server Exploitation
Scenario: IIS/XAMPP running as privileged userFileZilla Server Attack
Scenario: Admin interface on localhost:14147Splunk Universal Forwarder
Scenario: Default configuration without authentication- Default behavior: Runs as SYSTEM
- Attack method: Deploy malicious applications
- Impact: Direct SYSTEM-level code execution
Named Pipe Privilege Escalation
Example: WindscribeService vulnerability🎯 HTB Academy Lab Solutions
Lab Environment
- Target:
10.129.43.43(ACADEMY-WINLPE-SRV01) - Credentials:
htb-student:HTB_@cademy_stdnt! - Tools:
C:\Tools\AccessChk\
Question 1: Service on Port 21
Objective: Identify service listening on 0.0.0.0:21 Solution Steps:filezilla server
Question 2: WRITE_DAC Privileges on Named Pipe
Objective: Find account with WRITE_DAC over\pipe\SQLLocal\SQLEXPRESS01
Solution Steps:
NT Service\MSSQL$SQLEXPRESS01
🔍 Attack Pattern Recognition
Network Service Indicators
Named Pipe Red Flags
Service Context Analysis
📋 Process Communication Checklist
Network Services
- Active connections (
netstat -ano) - Localhost services (127.0.0.1 binding)
- Process identification (
tasklist) - Service context (user running service)
- Web server detection (port 80, 8080, 8443)
- Administrative interfaces (non-standard ports)
Named Pipes
- Pipe enumeration (
pipelist.exeorgci \\.\pipe\) - Permission analysis (
accesschk.exe -w \pipe\*) - Everyone group access (overly permissive pipes)
- Custom application pipes (non-standard names)
- WRITE_DAC privileges (permission modification)
Attack Surface Assessment
- SeImpersonatePrivilege detection
- Vulnerable service versions
- Default configurations (Splunk, FileZilla)
- File upload capabilities (web servers)
- Administrative access (localhost services)
💡 Key Takeaways
- Network services running as privileged users provide direct escalation paths
- Localhost-only services often lack security controls
- Named pipes with excessive permissions enable privilege escalation
- Web servers with SeImpersonatePrivilege lead to SYSTEM access
- Default configurations frequently contain security weaknesses
- Service context matters - identify which user runs each service
Process communication analysis reveals privilege escalation opportunities through network services and inter-process communication vulnerabilities.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
SeImpersonate & SeAssignPrimaryToken
🎯 Overview
SeImpersonate and SeAssignPrimaryToken are powerful privileges that allow escalation from service accounts to SYSTEM level access. These privileges enable processes to impersonate other users’ security tokens, commonly exploited through “Potato-style” attacks.🔑 Token Impersonation Fundamentals
Access Token Concepts
- Process tokens contain security context information
- Token impersonation allows assuming another user’s identity
- SeImpersonatePrivilege required to utilize stolen tokens
- Memory-based attacks target token locations in process memory
Key Privileges
- IIS application pools
- SQL Server service accounts
- Jenkins execution contexts
- MSSQL xp_cmdshell execution
🥔 Potato Attack Family
Attack Mechanism
- Service account has SeImpersonatePrivilege but limited SYSTEM access
- Potato attack tricks SYSTEM process to connect to attacker-controlled process
- Token handover occurs during connection authentication
- Token abuse elevates privileges to NT AUTHORITY\SYSTEM
JuicyPotato - Legacy Systems
Prerequisites
- SeImpersonate OR SeAssignPrimaryToken privilege
- Windows Server 2016 and earlier (before build 1809)
- DCOM/NTLM reflection capabilities
Basic Usage
-l- COM server listening port-p- Program to launch-a- Arguments passed to program-t- CreateProcess call type (* = try both)
PrintSpoofer - Modern Systems
Advantages
- Windows Server 2019 and Windows 10 build 1809+ compatible
- Print Spooler service abuse mechanism
- Multiple execution modes available
Usage Examples
RoguePotato - Alternative Approach
- OXID resolver abuse technique
- Named pipe impersonation method
- Server 2019 and Windows 10 compatible
💻 Practical Exploitation Scenario
SQL Server Service Account Compromise
Initial Access via MSSQL
Privilege Assessment
JuicyPotato Exploitation
PrintSpoofer Alternative
Verification
🛠️ Tool Comparison
| Tool | OS Support | Method | Reliability |
|---|---|---|---|
| JuicyPotato | ≤ Server 2016 | DCOM/NTLM Reflection | High |
| PrintSpoofer | Server 2019+ Win10 1809+ | Print Spooler Service | High |
| RoguePotato | Server 2019+ Win10+ | OXID Resolver | Medium |
| SweetPotato | Universal | Multiple methods | High |
🎯 HTB Academy Lab Solution
Lab Environment
- Target:
10.129.43.43(ACADEMY-WINLPE-SRV01) - Credentials:
sql_dev:Str0ng_P@ssw0rd! - Objective: Escalate privileges and retrieve flag
Detailed Step-by-Step Solution
1. Initial Connection with MSSQL
2. Enable xp_cmdshell for Command Execution
3. Enumerate Privileges - Key Step!
SeImpersonatePrivilege is Enabled - this allows privilege escalation!
4. Set Up Reverse Shell Listener (New Terminal)
5. Execute PrintSpoofer Privilege Escalation
6. Receive SYSTEM Shell
7. Verify SYSTEM Access & Retrieve Flag
Alternative Methods
Using JuicyPotato (for older systems)
Key Success Indicators
- ✅ SeImpersonatePrivilege Enabled - Confirmed in step 3
- ✅ PrintSpoofer Success Message -
[+] Found privilege: SeImpersonatePrivilege - ✅ SYSTEM Shell Received -
whoamireturnsnt authority\system - ✅ Flag Retrieved - Successfully read from Administrator desktop
Troubleshooting Common Issues
If PrintSpoofer Fails:
If Connection Issues:
If Tools Not Present:
🔍 Detection Indicators
Process Behavior
Event Logs
- Event ID 4648 - Explicit credential logon (token impersonation)
- Event ID 4672 - Special privileges assigned to logon
- Event ID 4624 - Account logon events
🛡️ Defense Strategies
Privilege Hardening
Detection Rules
📋 SeImpersonate Exploitation Checklist
Prerequisites
- Service account access (web shell, SQL, Jenkins)
- SeImpersonatePrivilege OR SeAssignPrimaryTokenPrivilege
- Tool upload capability (JuicyPotato/PrintSpoofer)
- Network connectivity for reverse shells
Execution Steps
- Verify privileges (
whoami /priv) - Select appropriate tool based on OS version
- Upload exploitation binary to target system
- Set up reverse shell listener on attack machine
- Execute privilege escalation command
- Confirm SYSTEM access (
whoami)
Post-Exploitation
- Retrieve sensitive data (flags, credentials)
- Establish persistence (user creation, services)
- Lateral movement preparation
- Evidence cleanup (optional)
💡 Key Takeaways
- SeImpersonate privilege is extremely powerful for privilege escalation
- Service accounts commonly have this privilege enabled
- Tool selection depends on target OS version and build
- Multiple techniques available - always have backups ready
- Common attack vector - expect this in most web applications
- High success rate when prerequisites are met
SeImpersonate privilege escalation remains one of the most reliable Windows privilege escalation techniques, particularly in service account compromise scenarios.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
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
- Developers - for system component debugging
- System admins - for troubleshooting purposes
- Service accounts - for application debugging
📊 Privilege Detection
Enumeration
- 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
- 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
⬆️ 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_svcaccount
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
- User account with SeDebugPrivilege assigned
- Elevated shell (Run as Administrator)
- ProcDump/Mimikatz tools available
- Target identification (LSASS or SYSTEM processes)
LSASS Dumping Steps
- Verify privilege (
whoami /priv) - Execute procdump on lsass.exe
- Launch Mimikatz with logging enabled
- Load dump file (
sekurlsa::minidump) - Extract credentials (
sekurlsa::logonpasswords)
SYSTEM Escalation Steps
- Identify SYSTEM process PID (
tasklist) - Load PoC script (psgetsystem)
- Execute impersonation command
- Verify SYSTEM access (
whoami)
💡 Key Takeaways
- 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.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
SeTakeOwnershipPrivilege
🎯 Overview
SeTakeOwnershipPrivilege grants users the ability to take ownership of any “securable object” including NTFS files/folders, registry keys, services, processes, and Active Directory objects. This privilege assigns WRITE_OWNER rights, allowing modification of object security descriptors to change ownership.🔑 Privilege Fundamentals
SeTakeOwnershipPrivilege Capabilities
- File/folder ownership takeover on NTFS systems
- Registry key ownership modification
- Service ownership changes
- Process ownership manipulation
- Active Directory object ownership control
Assignment Contexts
- Administrators - assigned by default
- Service accounts - backup jobs, VSS snapshots
- Specialized roles - often combined with SeBackupPrivilege, SeRestorePrivilege
- GPO abuse victims - via SharpGPOAbuse attacks
📊 Privilege Detection & Enablement
Enumeration
Privilege Activation
Method 1: PowerShell Script
Method 2: Manual Token Manipulation
🎯 Target File Identification
High-Value Targets
System Configuration Files
Credential Files
Specialized Files
💻 File Ownership Attack Technique
Step 1: Target Assessment
Step 2: Ownership Takeover
Step 3: Ownership Verification
Step 4: Access Control Modification
Step 5: File Access
🎯 HTB Academy Lab Solution
Lab Environment
- Target:
10.129.43.43(ACADEMY-WINLPE-SRV01) - Credentials:
htb-student:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Leverage SeTakeOwnershipPrivilege over
C:\TakeOwn\flag.txt
Detailed Step-by-Step Solution
1. RDP Connection
2. Privilege Verification
3. Privilege Activation
4. Target File Analysis
5. File Ownership Takeover
6. Access Control Modification
7. Flag Retrieval
Alternative Methods
Manual ACL Manipulation
Registry Key Takeover
⚠️ Impact & Considerations
Destructive Nature
Reversion Challenges
Client Communication
🔍 Detection Indicators
File System Events
Process Activity
Registry Monitoring
🛡️ Defense Strategies
Privilege Hardening
File System Protection
Monitoring Implementation
📋 SeTakeOwnershipPrivilege Exploitation Checklist
Prerequisites
- User account with SeTakeOwnershipPrivilege assigned
- Elevated shell (Run as Administrator)
- Privilege enablement capability (scripts/tools)
- Target file identification (high-value assets)
Execution Steps
- Verify privilege (
whoami /priv) - Enable privilege (Enable-Privilege.ps1 or manual)
- Identify target (sensitive files/directories)
- Take ownership (
takeown /f [target]) - Modify ACL (
icacls [target] /grant user:F) - Access content (read/copy sensitive data)
Post-Exploitation
- Document changes (ownership modifications)
- Attempt reversion (restore original permissions)
- Extract data (credentials, configurations)
- Report modifications (client notification)
File Targets Priority
- Web.config files (application credentials)
- Registry backups (SAM, SYSTEM, SECURITY)
- Password files (*.txt, *.xlsx containing creds)
- Database files (KeePass *.kdbx)
- Certificate stores (*.pfx files)
💡 Key Takeaways
- SeTakeOwnershipPrivilege enables ownership takeover of any securable object
- File system attacks are primary use case for privilege escalation
- ACL modification required after ownership change for access
- Destructive potential requires careful consideration before execution
- Service accounts commonly have this privilege for backup operations
- GPO abuse can grant privilege to controlled accounts
- Detection possible through file system event monitoring
SeTakeOwnershipPrivilege exploitation provides powerful file system access but should be used with extreme caution due to its potentially destructive nature.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Windows Built-in Groups
🎯 Overview
Windows Built-in Groups provide specific privileges to enforce least-privilege principles without granting full administrative access. These groups exist on servers from Windows Server 2008 R2 to present, with some exceptions. Understanding membership implications is crucial for both privilege escalation and security assessment.🏛️ Key Built-in Groups
High-Privilege Groups
| Group | Key Privileges | Attack Potential |
|---|---|---|
| Backup Operators | SeBackup, SeRestore | NTDS.dit access, file system bypass |
| Event Log Readers | Event log access | Sensitive log data extraction |
| DnsAdmins | DNS service control | Code execution via DLL injection |
| Hyper-V Administrators | VM management | VM escape, hypervisor attacks |
| Print Operators | Print service control | Service manipulation attacks |
| Server Operators | Service management | Service privilege escalation |
Assignment Contexts
- Always enumerate group memberships (
whoami /groups) - Document excessive/unnecessary memberships
- Review historical assignments (leftovers from testing)
🔐 Backup Operators - SeBackupPrivilege Exploitation
Privilege Fundamentals
SeBackupPrivilege Capabilities
- Folder traversal without ACL restrictions
- File copying from protected directories
- Registry hive backup (SAM, SYSTEM, SECURITY)
- NTDS.dit access on Domain Controllers
- ACL bypass with FILE_FLAG_BACKUP_SEMANTICS
Detection and Enablement
Group Membership Verification
Privilege Enumeration
Privilege Activation
Method 1: PowerShell Modules
Method 2: Elevated Context
💾 File System Exploitation
Protected File Access
Standard Access Failure
SeBackupPrivilege Bypass
Registry Hive Extraction
SAM and SYSTEM Backup
🏰 Domain Controller Attacks
NTDS.dit Extraction Strategy
Challenge
- NTDS.dit contains NTLM hashes for all domain accounts
- File locked by Active Directory services
- Restricted access even for privileged users
Solution: Shadow Copy Technique
Step 1: Create Shadow Copy
Step 2: Verify Shadow Copy
Step 3: Copy NTDS.dit
Alternative: Robocopy Method
🔓 Credential Extraction
Method 1: DSInternals Module
Extract Specific Account
Method 2: SecretsDump.py
Extract All Domain Hashes
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
svc_backup:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Leverage SeBackupPrivilege to obtain flag at
c:\Users\Administrator\Desktop\SeBackupPrivilege\flag.txt
Detailed Step-by-Step Solution
1. RDP Connection
2. Verify Group Membership
3. Check Privilege Status
4. Enable SeBackupPrivilege
5. Target File Analysis
6. Bypass Restriction with SeBackupPrivilege
Alternative Methods
Method 1: Robocopy Approach
Method 2: Registry Approach (if flag in registry)
⚠️ Limitations and Considerations
Explicit Deny ACEs
Operational Considerations
🔍 Detection Indicators
Process Activity
Event Logs
File System Changes
🛡️ Defense Strategies
Group Membership Hardening
Monitoring Implementation
Access Controls
📋 Backup Operators Exploitation Checklist
Prerequisites
- Backup Operators membership verified (
whoami /groups) - SeBackupPrivilege available (may be disabled initially)
- Elevated context (Administrator Command Prompt/PowerShell)
- Required modules (SeBackupPrivilegeUtils.dll, SeBackupPrivilegeCmdLets.dll)
Privilege Activation
- Import PowerShell modules for privilege manipulation
- Enable SeBackupPrivilege (
Set-SeBackupPrivilege) - Verify activation (
Get-SeBackupPrivilege) - Confirm with whoami (
whoami /priv)
File System Exploitation
- Identify target files (sensitive documents, databases)
- Test normal access (verify restriction exists)
- Use Copy-FileSeBackupPrivilege to bypass ACLs
- Verify successful copy and read content
Domain Controller Attacks
- Create shadow copy (
diskshadow.exe) - Copy NTDS.dit from shadow volume
- Backup registry hives (SYSTEM, SAM)
- Extract credentials (DSInternals or secretsdump.py)
Post-Exploitation
- Document accessed files for reporting
- Clean up temporary files (shadow copies, copied files)
- Extract credential data for further attacks
- Report findings with remediation recommendations
💡 Key Takeaways
- Backup Operators provides powerful file system access via SeBackupPrivilege
- NTDS.dit extraction possible on Domain Controllers through shadow copies
- ACL bypass works for most files except explicit DENY entries
- Registry access enables local credential extraction (SAM, SYSTEM)
- Robocopy alternative eliminates need for external PowerShell modules
- Detection possible through privilege usage monitoring and file access logs
- Common oversight - accounts left in group after legitimate backup tasks
Backup Operators group membership provides extensive file system access capabilities that can be leveraged for significant privilege escalation, especially in Domain Controller environments.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Event Log Readers
🎯 Overview
Event Log Readers group members have permission to access Windows event logs, particularly the Security event log. When process creation auditing is enabled, command line arguments are logged as Event ID 4688, potentially exposing sensitive information including passwords, usernames, and authentication credentials passed as command-line parameters.📊 Process Creation Auditing Background
Event ID 4688 - Process Creation
Security Implications
Common exposed data:- Network authentication credentials (
net use /user:username password) - Database connection strings
- API keys and tokens
- Service account passwords
- PowerShell script credentials
Organizational Detection Use Cases
🔍 Group Membership Detection
Verify Event Log Readers Membership
Alternative Verification Methods
🔎 Event Log Analysis Techniques
Method 1: wevtutil Command Line
Basic Security Log Search
Advanced wevtutil Usage
Common Search Patterns
Method 2: Get-WinEvent PowerShell
Process Creation Event Analysis
Alternative PowerShell Searches
PowerShell Operational Log Analysis
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
logger:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Find password for user
maryusing Event Log Readers privileges
Detailed Step-by-Step Solution
1. RDP Connection
2. Verify Group Membership
3. Search Security Logs for Credentials
Method A: wevtutil Search
Method B: PowerShell Analysis
Method C: Comprehensive Search
4. Analyze Results
5. Extract Password
Alternative Search Strategies
Registry-Based Credential Search
Application Event Logs
PowerShell History Analysis
🔒 Common Credential Exposure Scenarios
Network Authentication
Service Execution
Database Connections
PowerShell Execution
⚠️ Limitations and Considerations
Registry Permissions
Log Retention
Operational Awareness
🔍 Detection Indicators
Event Log Access
Tool Usage Patterns
🛡️ Defense Strategies
Command Line Auditing Best Practices
Event Log Protection
Detection Rules
📋 Event Log Readers Exploitation Checklist
Prerequisites
- Event Log Readers membership verified
- Process creation auditing enabled on target
- Command line logging configured (Event ID 4688)
- Network/RDP access to target system
Reconnaissance
- Verify group membership (
net localgroup "Event Log Readers") - Check log accessibility (Security, Application, System)
- Identify time ranges for credential search
- Determine search patterns based on target users
Credential Search
- wevtutil searches for credential patterns
- PowerShell analysis of Event ID 4688
- Alternative log sources (PowerShell Operational)
- Pattern-based filtering (/user, password, net use)
Analysis and Extraction
- Parse command lines for embedded credentials
- Identify user accounts and passwords
- Validate credential format and complexity
- Document findings for reporting
💡 Key Takeaways
- Event Log Readers provides access to sensitive command-line history
- Process creation auditing often exposes embedded credentials
- wevtutil and Get-WinEvent are primary analysis tools
- Command-line passwords are common in enterprise environments
- PowerShell logs may contain additional sensitive information
- Pattern-based searches effectively identify credential exposure
- Minimal privileges can yield high-value intelligence
Event Log Readers group membership provides valuable reconnaissance capabilities through analysis of logged command-line executions and process creation events.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
DnsAdmins
🎯 Overview
DnsAdmins group members have access to DNS information and can manipulate DNS service configuration. Since the Windows DNS service runs as NT AUTHORITY\SYSTEM, membership in this group can be leveraged for privilege escalation on Domain Controllers or dedicated DNS servers through custom DLL plugin injection.🔧 Attack Mechanism
DNS Plugin Architecture
Attack Flow
- Generate malicious DLL (msfvenom or custom code)
- Host DLL on accessible network share or local path
- Configure ServerLevelPluginDll registry key via dnscmd
- Restart DNS service to trigger DLL loading
- Execute payload with SYSTEM privileges
- Clean up registry and restore service
🔍 Group Membership Verification
Check DnsAdmins Membership
Alternative Verification
💣 Custom DLL Generation
Method 1: MSFVenom Payload
Method 2: Reverse Shell Payload
Method 3: Custom Mimilib.dll
🌐 DLL Hosting and Delivery
HTTP Server Method
SMB Share Method
🔐 DNS Service Configuration
Test Non-Privileged Access
Load DLL as DnsAdmins Member
Alternative UNC Path
🔄 DNS Service Manipulation
Check Service Permissions
Find User SID
Analyze Service Permissions
Service Restart Sequence
Stop DNS Service
Start DNS Service
Verify Privilege Escalation
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
netadm:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Leverage DnsAdmins membership to escalate privileges and retrieve flag
Complete Step-by-Step Walkthrough
1. Connect to Target via RDP
2. Generate Malicious DLL (On Pwnbox/Attack Machine)
3. Start HTTP Server for DLL Delivery
4. Download DLL to Target (PowerShell)
5. Configure DNS Plugin (Command Prompt)
6. Restart DNS Service
7. Verify Privilege Escalation
8. Sign Out and Reconnect
9. Access Administrator Desktop and Retrieve Flag
Key Success Indicators
- ✅ DLL Generation: 8704 bytes adduser.dll created successfully
- ✅ HTTP Server: Python server serving on port 7777
- ✅ DLL Download: adduser.dll present in C:\Users\netadm\
- ✅ Registry Configuration: “Registry property serverlevelplugindll successfully reset”
- ✅ DNS Service Restart: Both stop and start commands complete successfully
- ✅ Privilege Escalation: netadm appears in Domain Admins group
- ✅ Administrator Access: Can read files in C:\Users\Administrator\Desktop\DnsAdmins\
Alternative Attack Methods
Method A: Direct Administrator Access
Method B: Service Account Technique
🧹 Cleanup and Restoration
⚠️ Important Considerations
Registry Cleanup
Verify Registry Key
Remove Registry Key
Service Restoration
DNS Functionality Test
🌐 WPAD Attack Alternative
Global Query Block List Manipulation
Disable Global Query Block
Create WPAD Record
Traffic Interception
🔍 Detection Indicators
Registry Monitoring
Service Activity
Network Indicators
🛡️ Defense Strategies
Group Membership Hardening
DNS Service Protection
Detection Rules
📋 DnsAdmins Exploitation Checklist
Prerequisites
- DnsAdmins membership verified
- DNS service permissions confirmed (RPWP)
- Domain Controller access available
- Client permission obtained for destructive testing
DLL Generation
- Malicious DLL created (msfvenom or custom)
- Payload tested in lab environment
- Hosting method prepared (HTTP/SMB)
- Full path available for DLL specification
Service Exploitation
- Registry key configured (
dnscmd /config /serverlevelplugindll) - DNS service stopped (
sc stop dns) - DNS service started (
sc start dns) - Privilege escalation verified (group membership/access)
Flag Retrieval
- Administrator access confirmed
- Flag file accessed (
c:\Users\Administrator\Desktop\DnsAdmins\flag.txt) - Flag content extracted and submitted
Cleanup
- Registry key removed (ServerLevelPluginDll)
- DNS service restored (clean restart)
- DNS functionality verified (nslookup tests)
- Changes documented for client reporting
💡 Key Takeaways
- DnsAdmins membership enables SYSTEM-level code execution on DNS servers
- Custom DLL injection through ServerLevelPluginDll registry key
- DNS service restart required to trigger malicious DLL loading
- Full path specification mandatory for successful exploitation
- Destructive nature requires careful coordination with client
- Domain Controller impact - DNS disruption affects entire domain
- Multiple attack vectors - user addition, reverse shells, WPAD attacks
- Cleanup essential - registry restoration and service stability
DnsAdmins group privilege escalation represents one of the most powerful Windows built-in group attacks, capable of achieving Domain Admin privileges through DNS service manipulation.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Hyper-V Administrators
🎯 Overview
Hyper-V Administrators have full access to all Hyper-V features. If Domain Controllers are virtualized, members should be considered Domain Admins due to their ability to clone VMs and extract NTDS.dit offline.🖥️ Virtual Machine Attack Vectors
Domain Controller VM Compromise
- Virtualized DCs = Full domain compromise potential
- VM cloning bypasses all online protections
- Offline analysis undetectable by security tools
🔗 Hard Link Exploitation
Attack Mechanism
Target File Example
Exploitation Steps
⚠️ Limitations
Patching Status
Alternative Vectors
🔍 Detection & Defense
Monitoring
Hardening
💡 Key Takeaways
- Hyper-V Administrators = potential Domain Admin access on virtualized DCs
- VM cloning attack most reliable vector
- Hard link exploitation patched since March 2020
- Virtualization security critical for domain protection
Hyper-V Administrators group represents significant risk in virtualized environments, particularly when Domain Controllers are virtualized.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Print Operators
🎯 Overview
Print Operators group grants SeLoadDriverPrivilege, allowing members to load device drivers. This privilege can be exploited to load malicious drivers like Capcom.sys for SYSTEM privilege escalation.🔑 Key Privileges & Capabilities
🔧 Driver Loading Exploitation
Privilege Verification
Capcom.sys Driver Attack
1. Registry Configuration
2. Enable Privilege & Load Driver
3. Exploit Driver for SYSTEM
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
printsvc:HTB_@cademy_stdnt! - Access Method: xfreerdp
- Tools Location:
C:\Tools\andC:\Tools\ExploitCapcom\ - Objective: Escalate to SYSTEM and retrieve flag from Administrator desktop
- Flag:
Pr1nt_0p3rat0rs_ftw!
Detailed Walkthrough
1. Connect via RDP
2. Open Elevated Command Prompt
3. Navigate to Tools and Execute EoPLoadDriver
4. Navigate to ExploitCapcom Directory
5. Retrieve Flag from SYSTEM Shell
🔄 Alternative Methods
Non-GUI Exploitation
Automated Approach
🧹 Cleanup
⚠️ Limitations
Windows Version Restrictions
Detection Indicators
💡 Key Takeaways
- Print Operators group provides SeLoadDriverPrivilege
- Capcom.sys driver enables SYSTEM privilege escalation
- Registry configuration required for driver loading
- Multiple tools available for automation
- Mitigated on Windows 10 1803+
Print Operators group exploitation relies on vulnerable driver loading capabilities, effective primarily on legacy Windows systems.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Server Operators
🎯 Overview
Server Operators group allows administration of Windows servers without Domain Admin privileges. Members can log in locally to Domain Controllers and have full control over local services, enabling privilege escalation through service binary path modification.🔑 Key Privileges & Capabilities
🔧 Service Control Exploitation
Service Reconnaissance
Verify Service Permissions
🚀 Binary Path Attack
Current Admin Group Check
Modify Service Binary Path
Execute Service (Expected to Fail)
Verify Privilege Escalation
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
server_adm:HTB_@cademy_stdnt! - Access Method: RDP
- Target Service: AppReadiness
- Flag Location:
c:\Users\Administrator\Desktop\ServerOperators\flag.txt
Quick Steps
🏆 Post-Exploitation Capabilities
Domain Controller Access
Domain Credential Extraction
🔄 Alternative Attack Vectors
Other Target Services
Alternative Payloads
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Server Operators group provides SERVICE_ALL_ACCESS over local services
- Binary path modification enables command execution as SYSTEM
- Local administrator access leads to Domain Controller compromise
- SeBackupPrivilege provides additional attack vectors
- High-impact group requiring careful access control
Server Operators group exploitation leverages service control capabilities for immediate local administrator access and potential domain compromise.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
UAC Bypass
🎯 Overview
User Account Control (UAC) provides consent prompts for elevated activities but is not a security boundary. With Admin Approval Mode (AAM), admin users receive two tokens - standard and privileged. UAC bypasses exploit auto-elevating binaries and DLL hijacking to gain elevated privileges without prompts.🔑 UAC Fundamentals
Admin Approval Mode (AAM)
UAC Configuration Check
🔧 DLL Hijacking Technique (UACME #54)
Windows Build Assessment
DLL Search Order Exploitation
Target Binary Analysis
🚀 Exploitation Process
1. Generate Malicious DLL
2. Deploy DLL to Target
3. Test Standard Execution
4. UAC Bypass Execution
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
sarah:HTB_@cademy_stdnt! - Access Method: RDP
- User Context: Local administrator with UAC enabled
- Flag Location: Desktop of sarah user
Complete Walkthrough
🔄 Alternative UAC Bypasses
UACME Project Techniques
Registry-Based Bypasses
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- UAC is not a security boundary - convenience feature only
- Admin Approval Mode creates dual-token scenario
- Auto-elevating binaries can be exploited via DLL hijacking
- PATH manipulation enables user-controlled DLL loading
- Multiple bypass techniques exist for different Windows versions
UAC bypasses exploit design flaws in auto-elevating mechanisms, enabling privilege escalation without user consent prompts.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Weak Permissions
🎯 Overview
Weak permissions are common in third-party software and custom applications. Services typically run with SYSTEM privileges, making permission flaws a direct path to complete system control. Key vectors include file system ACLs, service permissions, unquoted paths, registry ACLs, and autorun binaries.🔧 Permissive File System ACLs
Service Binary Discovery
Permission Verification
Binary Replacement Attack
🛠️ Weak Service Permissions
Service Permission Enumeration
Binary Path Modification Attack
Service Cleanup
📁 Unquoted Service Path
Path Discovery
Execution Order Analysis
🔑 Permissive Registry ACLs
Registry Service Key Enumeration
Registry Modification Attack
🚀 Modifiable Registry Autorun Binary
Autorun Program Discovery
Autorun Exploitation
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
htb-student:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Escalate privileges using weak permissions
- Flag Location:
C:\Users\Administrator\Desktop\WeakPerms\flag.txt
Complete Walkthrough
🔄 Alternative Techniques
PowerShell Service Enumeration
Manual Permission Checks
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Third-party software commonly has weak permissions
- Service binaries are high-value targets (SYSTEM privileges)
- Multiple attack vectors - files, services, registry, autorun
- AccessChk and SharpUp are essential enumeration tools
- Cleanup important to avoid detection and maintain operations
Weak permissions exploitation leverages misconfigurations in file systems, services, and registry to achieve privilege escalation.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Kernel Exploits
🎯 Overview
Kernel exploits leverage vulnerabilities in the Windows kernel to gain SYSTEM privileges. Historical Windows systems have numerous known exploits, while modern systems have fewer but still critical vulnerabilities. 100% patch compliance is rarely achieved, creating opportunities for local privilege escalation.📊 Historical Vulnerability Landscape
Major Exploit Families by Windows Version
Evolution Pattern
🔥 Notable Legacy Vulnerabilities
MS08-067 (Conficker/Legacy)
MS17-010 (EternalBlue)
💀 Modern Critical Vulnerabilities
CVE-2021-36934 (HiveNightmare/SeriousSam)
CVE-2021-1675 (PrintNightmare)
CVE-2020-0668 (Service Tracing)
🔍 Patch Enumeration
System Update Analysis
Vulnerability Assessment Workflow
🎯 HTB Academy Lab Solution
Lab Environment
- Credentials:
htb-student:HTB_@cademy_stdnt! - Access Method: RDP
- Objective: Escalate to NT AUTHORITY\SYSTEM using 3 different kernel exploits
- Flag Location: Administrator Desktop
Complete Walkthrough
Method 1: HiveNightmare (CVE-2021-36934)
Method 2: PrintNightmare (CVE-2021-1675)
Method 3: CVE-2020-0668 (File Move)
🛠️ Exploitation Tools & Techniques
Essential Tools
Exploitation Strategy
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Legacy systems have extensive exploit surface area
- Modern systems still vulnerable to critical flaws
- Patch management is rarely 100% effective
- Local port forwarding can enable remote exploits
- Multiple exploitation paths often available
- Post-exploitation cleanup essential for stealth
Kernel exploits remain a viable privilege escalation vector due to the complexity of maintaining perfect patch compliance in enterprise environments.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Vulnerable Services
🎯 Overview
Vulnerable third-party services provide privilege escalation opportunities even on well-patched systems. Users installing software or organizations using vulnerable applications create attack vectors. Many third-party services run with SYSTEM privileges, making them high-value targets for local privilege escalation.🔍 Third-Party Software Enumeration
Installed Programs Discovery
Service Process Mapping
💥 Druva inSync 6.6.3 Exploitation
Vulnerability Details
PowerShell Exploit PoC
🎯 HTB Academy Lab Solution
Lab Environment
- Target:
10.129.223.93(ACADEMY-WINLPE-WS01) - Credentials:
htb-student:HTB_@cademy_stdnt! - Access Method: xfreerdp
- Vulnerable Service: Druva inSync 6.6.3 (running on port 6064)
- Flag Location:
C:\Users\Administrator\Desktop\VulServices\flag.txt - Flag:
Aud1t_th0se_th1rd_paRty_s3rvices!
Detailed Walkthrough
1. Connect via RDP
2. Enumerate Druva inSync Service
3. Prepare Attack Infrastructure on Pwnbox
4. Configure Druva Exploit Script
5. Start Netcat Listener on Pwnbox
6. Execute Druva Exploit
7. Receive SYSTEM Shell
8. Access Flag
🔄 Additional Vulnerable Services
Common Third-Party Targets
Service Discovery Methodology
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Third-party software introduces significant attack surface
- Service enumeration critical for identifying vulnerable applications
- Command injection common in backup/management software
- SYSTEM context services provide immediate privilege escalation
- PowerShell payloads effective for fileless exploitation
- Application whitelisting essential defensive measure
Vulnerable services exploitation highlights the importance of comprehensive software inventory and patch management in enterprise environments.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Credential Hunting
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Other Files
🎯 Overview
Advanced file system searching reveals credentials in unexpected locations beyond standard configuration files. This includes StickyNotes databases, network share drives, system backup files, and various application-specific storage locations. Manual search techniques complement automated enumeration tools.🔍 Manual File System Searches
Basic String Searches
PowerShell Search Methods
File Extension Discovery
📝 Sticky Notes Database
StickyNotes File Location
PowerShell SQLite Query
Alternative Analysis Methods
📂 System and Application Files
Windows System Files
User Profile Files
🎯 HTB Academy Lab Solution
Lab Environment
- Target:
10.129.223.93(ACADEMY-WINLPE-WS01) - Credentials:
htb-student:HTB_@cademy_stdnt! - Objective: Find cleartext password for bob_adm user
- Access Method: xfreerdp
- Primary Method: StickyNotes SQLite database analysis
Detailed Walkthrough
1. Connect via RDP
2. Navigate to PSSQLite Tools Directory
3. Set PowerShell Execution Policy
4. Import PSSQLite Module
5. Query StickyNotes Database
6. Extract bob_adm Password
🌐 Network Share Drive Hunting
Share Enumeration
High-Value Share Locations
🛠️ Advanced Search Techniques
Recursive Pattern Matching
Binary and Database Files
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- StickyNotes databases often contain plaintext credentials
- System backup files may contain registry copies with credentials
- Network shares frequently store sensitive documents
- Manual searching complements automated enumeration tools
- Multiple file types should be examined systematically
- PowerShell provides powerful search capabilities for credential hunting
Advanced file system credential hunting extends beyond standard configuration files to reveal credentials in unexpected locations throughout Windows systems.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Further Credential Theft
🎯 Overview
Advanced credential theft techniques go beyond basic file searches to extract stored credentials from browsers, password managers, registry storage, saved RDP sessions, and wireless profiles. These methods target credentials stored by applications, Windows features, and user convenience configurations.💾 Cmdkey Saved Credentials
Listing Stored Credentials
Exploiting Saved Credentials
🌐 Browser Credentials
Chrome Credential Extraction
Detection Considerations
🔐 Password Managers
KeePass Database Cracking
Password Manager Targeting
📧 Email Credential Mining
MailSniper for Exchange
🛠️ LaZagne - Automated Extraction
Comprehensive Credential Harvesting
LaZagne Module Categories
🔧 SessionGopher
Remote Access Tool Credentials
🗝️ Registry Credential Storage
Windows AutoLogon
PuTTY Proxy Credentials
📡 WiFi Password Extraction
Wireless Profile Enumeration
Wireless Password Retrieval
🎯 HTB Academy Lab Solutions
Lab Environment Overview
- Various RDP credentials:
jordan:HTB_@cademy_j0rdan!,htb-student:HTB_@cademy_stdnt! - Multiple objectives: SQL sa password, RDP credentials, vCenter password, FTP password
Lab 1: SQL sa Password (as jordan)
Lab 2: RDP User Discovery (as htb-student)
Lab 3: vCenter Password (as htb-student)
Lab 4: FTP Password (as htb-student)
🔄 Advanced Techniques
Comprehensive Enumeration Strategy
Manual Registry Hunting
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Multiple credential storage mechanisms exist beyond files
- Browser credentials are easily extractable with tools
- Password managers can be cracked if master passwords are weak
- Registry storage often contains cleartext credentials
- Automated tools like LaZagne provide comprehensive extraction
- WiFi passwords can enable lateral network access
Further credential theft techniques exploit various Windows credential storage mechanisms, providing multiple vectors for privilege escalation and lateral movement.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Citrix Breakout
🎯 Overview
Citrix Breakout involves escaping restricted virtualization environments such as Terminal Services, Citrix, AWS AppStream, CyberArk PSM, and Kiosk environments. These platforms implement lock-down measures to minimize security impact, but breakout techniques can bypass these restrictions to gain command execution and privilege escalation.🔓 Basic Breakout Methodology
Three-Step Process
Environment Characteristics
📂 Bypassing Path Restrictions
Dialog Box Methodology
MS Paint Dialog Box Example
UNC Path Technique
🌐 SMB Share Access from Restricted Environment
Setting up SMB Server
Accessing SMB Share via Dialog Box
Custom Breakout Binary
🛠️ Alternate File System Tools
Explorer++ Bypass
Alternative File Managers
🗝️ Alternate Registry Editors
Registry Editor Bypass
Registry Editor Features
🔗 Modifying Existing Shortcuts
Shortcut Hijacking Process
Creating New Shortcuts
📝 Script Execution Bypass
Batch File Method
Script Extension Exploitation
🔺 Privilege Escalation in Citrix
AlwaysInstallElevated Discovery
PowerUp MSI Exploitation
User Creation via MSI
Runas for New User Context
🛡️ UAC Bypass
UAC Bypass Necessity
Bypass-UAC Script Usage
Verification of Bypass
🎯 HTB Academy Lab Solutions
Lab Environment
Lab 1: User Flag (pmorgan Downloads)
Lab 2: Administrator Flag
🔄 Complete Attack Chain
Comprehensive Breakout Process
🛠️ Required Tools
Essential Breakout Tools
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Dialog boxes provide powerful bypass mechanisms for restricted environments
- UNC paths can circumvent File Explorer restrictions
- Alternative tools (Explorer++, registry editors) bypass group policy
- SMB shares enable tool transfer and execution in restricted environments
- MSI exploitation with AlwaysInstallElevated provides reliable privilege escalation
- UAC bypass is often necessary even with admin users
- Script execution (.bat, .vbs, .ps1) can provide multiple breakout vectors
Citrix breakout techniques exploit the inherent trust in application dialog boxes and file interaction features to escape restricted virtualization environments and achieve privilege escalation.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Interacting with Users
🎯 Overview
User interaction attacks exploit the human element as the weakest link in security. These techniques target unsuspecting users through network traffic capture, malicious file placement, and credential harvesting when technical privilege escalation methods are exhausted. Focus on heavily accessed file shares and network monitoring for credential theft opportunities.📡 Traffic Capture Techniques
Wireshark Privilege Exploitation
Network Traffic Monitoring
Example Credential Capture
🔍 Process Command Line Monitoring
PowerShell Process Monitor
Remote Script Execution
Target Processes
🗂️ Vulnerable Services Exploitation
Docker Desktop CVE-2019-15752
Service Enumeration Strategy
📁 SCF File Hash Capture
Shell Command File (SCF) Attack
Malicious SCF Creation
Responder Hash Capture
Hash Cracking
🔗 Malicious .lnk File Attacks
.lnk vs SCF Compatibility
PowerShell .lnk Generation
.lnk File Properties
🎯 File Share Attack Strategy
Target Selection
File Placement Strategy
Naming Conventions
🔧 Alternative Hash Capture Tools
Responder Alternatives
Tool Comparison
🎯 HTB Academy Lab Solution
Lab Environment
SCCM_SVC Credential Extraction
Practical Approach
🔄 Advanced User Interaction Techniques
Multi-Vector Approach
Persistence Considerations
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Users are often the weakest link in security chains
- Network traffic monitoring can reveal cleartext credentials
- Process command lines frequently contain embedded passwords
- SCF files trigger automatic SMB authentication (legacy systems)
- Malicious .lnk files work on modern Windows versions
- File share placement strategy is critical for success
- Hash capture + offline cracking provides reliable credential theft
- Multiple attack vectors increase success probability
User interaction attacks exploit human behavior and system trust relationships to capture credentials when technical privilege escalation methods are insufficient.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Pillaging
🎯 Overview
Pillaging is the systematic process of data extraction from compromised systems to gather credentials, sensitive information, and intelligence for further network access. Focus on installed applications, configuration files, browser data, clipboard content, and backup systems for maximum information yield.📊 Data Sources for Pillaging
Primary Targets
Information Categories
💻 Installed Application Enumeration
Directory-Based Discovery
Registry-Based Enumeration
🔧 mRemoteNG Exploitation
Configuration File Location
Configuration File Structure
Password Decryption
🍪 Browser Cookie Extraction
Firefox Cookie Extraction
Chrome Cookie Extraction
Cookie Abuse for IM Access
📋 Clipboard Monitoring
PowerShell Clipboard Logger
Clipboard Target Data
💾 Backup System Exploitation
Restic Backup System
Backup Repository Enumeration
Backup Target Analysis
🎯 HTB Academy Lab Solutions
Lab Environment Access
Lab 1: Application Identification
Lab 2: mRemoteNG Password Extraction
Lab 3: Slack Cookie Extraction
Lab 4: Restic Password Discovery
Lab 5: Administrator Hash Extraction
🔄 Comprehensive Pillaging Strategy
Systematic Approach
Automation Tools
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Systematic enumeration of installed applications reveals attack vectors
- mRemoteNG often stores credentials with weak/default encryption
- Browser cookies provide direct access to web applications
- Clipboard monitoring captures password manager usage
- Backup systems contain copies of sensitive system files
- Multiple data sources require comprehensive extraction strategy
- Automation tools essential for efficient pillaging operations
Pillaging transforms initial system access into comprehensive intelligence gathering for network expansion and objective completion.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Miscellaneous Techniques
🎯 Overview
Miscellaneous techniques encompass LOLBAS exploitation, policy misconfigurations, CVE-specific vulnerabilities, scheduled task abuse, and virtual disk mounting for hash extraction. These methods provide alternative privilege escalation vectors when standard techniques fail.🏠 Living Off The Land Binaries (LOLBAS)
LOLBAS Concept
Common LOLBAS Functions
Certutil File Transfer
Rundll32 DLL Execution
🔺 AlwaysInstallElevated Exploitation
Policy Configuration
Registry Enumeration
MSI Payload Generation
MSI Execution
🔓 CVE-2019-1388 (Windows Certificate Dialog)
Vulnerability Details
Exploitation Steps
Vulnerable Versions
📅 Scheduled Task Enumeration
Basic Task Enumeration
Task Permission Analysis
Task Script Modification
💿 Virtual Disk Mounting & Hash Extraction
Virtual Disk File Types
Linux Mounting
Windows Mounting
Hash Extraction from Virtual Disks
👤 User/Computer Description Field
Local User Description Enumeration
Computer Description Field
Active Directory Description Fields
🎯 HTB Academy Lab Solution
Lab Environment
Multi-Method Approach
🔄 Advanced Miscellaneous Techniques
File System Analysis Tools
LOLBAS Exploitation Examples
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- LOLBAS binaries provide trusted execution paths for malicious activities
- AlwaysInstallElevated enables reliable privilege escalation via MSI
- CVE-2019-1388 demonstrates certificate dialog UAC bypass
- Scheduled tasks with weak permissions offer persistence opportunities
- Virtual disk files contain complete filesystem copies for offline analysis
- User descriptions sometimes contain cleartext passwords
- Multiple vectors increase success probability in hardened environments
Miscellaneous techniques exploit Windows features, policies, and file systems that may be overlooked during standard privilege escalation enumeration.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Windows Server 2008
🎯 Overview
Windows Server 2008/2008 R2 reached end-of-life January 14, 2020 and lacks modern security features. Legacy systems are commonly found in medical settings, universities, and government offices running mission-critical applications. These systems present significant privilege escalation opportunities through missing patches and kernel exploits.📊 Security Feature Comparison
Server Version Security Matrix
🔍 Patch Level Enumeration
WMI Hotfix Query
System Information Gathering
🔧 Sherlock Vulnerability Assessment
Sherlock Script Usage
Common Server 2008 Vulnerabilities
🚀 Metasploit Privilege Escalation
SMB Delivery Module Setup
Initial Shell Acquisition
Process Migration for 64-bit
MS10-092 Privilege Escalation
🎯 HTB Academy Lab Walkthrough
Lab Environment
Step-by-Step Solution
1. Initial Access
2. Patch Level Enumeration
3. Vulnerability Assessment
4. Metasploit Setup (Attack Machine)
5. Initial Shell (Target Machine)
6. Process Migration (Attack Machine)
7. Privilege Escalation
8. Flag Retrieval
🔄 Alternative Privilege Escalation Methods
Manual Exploit Compilation
PowerShell-Based Exploits
🛠️ Legacy System Considerations
Business Context Assessment
Risk Mitigation Strategies
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Server 2008 lacks modern security features and is highly vulnerable
- Patch enumeration reveals missing critical security updates
- Sherlock provides comprehensive vulnerability assessment for legacy systems
- MS10-092 Task Scheduler exploit is reliable for Server 2008 privilege escalation
- Process migration to 64-bit required for some exploits
- Business context critical when dealing with legacy systems
- Multiple escalation vectors available on unpatched systems
Windows Server 2008 systems represent high-value targets due to missing security features and unpatched vulnerabilities, but business considerations must guide remediation recommendations.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter:
Windows 7 Exploitation
🎯 Overview
Windows 7 reached end-of-life January 14, 2020 but remains widely deployed with 100+ million users. Common in education, retail, healthcare, government, and manufacturing sectors. Legacy desktop systems lack modern security features and present significant privilege escalation opportunities.📊 Security Feature Comparison
Windows 7 vs Windows 10
🔍 Windows-Exploit-Suggester
Tool Setup (Attack Machine)
System Information Gathering
Vulnerability Analysis
🚀 MS16-032 Privilege Escalation
Vulnerability Details
PowerShell Exploit Execution
🎯 HTB Academy Lab Walkthrough
Lab Environment
Complete Step-by-Step Solution
1. Initial Access
2. System Enumeration
3. Vulnerability Assessment (Attack Machine)
4. Privilege Escalation (Target Machine)
5. Flag Retrieval
🔄 Alternative Exploitation Methods
Sherlock Alternative
Manual Exploit Compilation
🏢 Business Context Considerations
Legacy System Scenarios
Risk Assessment Factors
⚠️ Detection & Defense
Detection Indicators
Defensive Measures
💡 Key Takeaways
- Windows 7 widely deployed despite EOL status
- Windows-Exploit-Suggester provides comprehensive vulnerability assessment
- MS16-032 reliable privilege escalation for Windows 7 systems
- PowerShell exploits often more effective than compiled binaries
- Business context critical for remediation recommendations
- Multiple CVEs available on unpatched Windows 7 systems
- Network segmentation essential for legacy system protection
Windows 7 systems represent significant security risks due to end-of-life status and missing modern protections, requiring careful business-context assessment for remediation planning.
Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with theask query parameter: