Privilege Escalation Techniques in Windows: From Footprint to Full Control
- Argon Cyber Security
- May 14
- 6 min read
Updated: May 28
Privilege escalation is a critical phase in both penetration testing and real-world cyber attacks, where an attacker moves from a low-privileged foothold to higher-level permissions. In many breaches, adversaries initially gain access as a standard user or service account, then seek to escalate privileges to admin or SYSTEM level to fully compromise the system. This step is vital: with elevated rights, an attacker can disable defenses, access sensitive data, move laterally, and establish persistence. For penetration testers and red teamers, understanding and simulating these techniques is essential for evaluating an organization's security posture and helping to remediate weaknesses. On the flip side, defenders must be aware of these methods to detect and prevent threat actors from gaining full control over Windows environments.
This article explores the complete path of Windows privilege escalation – from initial footprint and discovery to achieving SYSTEM-level control. We will cover common escalation vectors such as token impersonation, DLL hijacking, User Account Control (UAC) bypasses, misconfigured services (including unquoted service paths), credential dumping, and abusing special privileges like SeDebugPrivilege. Along the way, we’ll mention key tools (e.g. WinPEAS, PowerUp, SharpUp) and real-world examples of how these techniques are used. Finally, we will discuss mitigation strategies and detection tips to help secure systems against these methods.

From Initial Foothold to Full Control: The Escalation Path
Initial Access & Footprint: Attackers often begin with a limited user shell – for instance, a phishing victim’s account or a service account compromise. The first step is footprinting the system, i.e. enumerating the environment to discover potential privilege-escalation opportunities. The attacker will gather information such as:
User and Group Info: Check the current user context (whoami /all) to see group memberships and available privileges (e.g. whether SeImpersonatePrivilege is present).
OS and Patch Level: Use systeminfo or tools to identify Windows version, looking for known kernel vulnerabilities or misconfigurations.
Running Services and Applications: List services (sc query, tasklist) and installed programs. Misconfigured services or software with known flaws (like unquoted paths or vulnerable drivers) are prime targets.
File System Permissions: Identify directories or files with weak permissions (e.g. write access to Program Filessubfolders or service executables).
Registry and Schedule: Check for autoruns or scheduled tasks that run with high privileges, and see if their configuration is user-editable.
Manual enumeration can be time-consuming, so attackers often rely on automated post-exploitation tools to speed this up. Utilities like WinPEAS and PowerUp/SharpUp quickly hunt for common misconfigurations that could allow privilege escalation. These tools report issues such as services with weak permissions, unquoted service paths, accessible registry keys, and more – essentially mapping out the “privilege escalation footprint” of the system. With this information in hand, the attacker can proceed to exploit one of the discovered weaknesses and climb the ladder to higher privileges.
Token Impersonation Attacks (Abusing Access Tokens)
One powerful Windows feature that attackers abuse is access token impersonation. Access tokens represent the security context of a logged-in user or process. If a malicious actor can obtain or duplicate a token belonging to a higher-privileged user, they can impersonate that user and effectively run code with the same privileges. In practice, token impersonation often means a standard user account exploiting a service or process to grab a SYSTEM or admin token and assume those rights.
A common scenario involves the SeImpersonatePrivilege. Certain accounts (like IIS application pool or service accounts) have this privilege, which is intended for server software to impersonate client users. Attackers who compromise such an account can abuse this privilege to trick the system into giving them a token with higher privileges. This is typically done via so-called "Potato" exploits (e.g. JuicyPotato, RoguePotato, PrintSpoofer, etc.). These tools set up a rogue COM server or named pipe that forces a privileged system service to authenticate to it, thereby capturing a NTLM authentication flow and obtaining a LOCAL SYSTEM token.
Even when specific exploits are not used, token impersonation can occur through built-in means: an attacker with admin rights could use frameworks like Cobalt Strike to steal tokens from an active administrator session. Cobalt Strike includes the ability to list and impersonate tokens of other logged-in users, allowing an attacker to “hop” into an admin’s context if, say, an administrator account is currently running a process on the machine.
Defending against token impersonation involves principle of least privilege (avoiding assigning SeImpersonate to low-level accounts) and monitoring token-related API calls. For instance, calls to DuplicateToken(Ex) followed by ImpersonateLoggedOnUser in a low-privileged process are suspicious. Detection can also leverage Windows Event Logs – enabling Audit Token Right Adjusted events can catch processes enabling privileges like SeImpersonate or generating impersonation tokens.
DLL Hijacking (DLL Search Order Hijack)
DLL hijacking is a technique where an attacker tricks a higher-privileged program into loading a malicious Dynamic Link Library (DLL). If a service or application running as Administrator or SYSTEM tries to load a DLL that is missing or not explicitly named, Windows might search in directories that a standard user can write to. An attacker can place a malicious DLL with the expected name into such a directory, so that when the privileged program starts, it loads the attacker’s code. This results in the attacker’s code running with the privileges of that program.
Attackers and pen-testers can find DLL hijack opportunities by monitoring DLL load attempts. Tools like ProcMon can reveal when a process is looking for a DLL in various locations. A penetration tester might also manually place a dummy DLL in likely locations to see if it gets executed by any service.
Mitigation for DLL hijacking involves developers using secure DLL loading practices (like using fully qualified paths or the SafeDllSearchMode), and administrators restricting write permissions on directories that high-privilege applications use.
Bypassing User Account Control (UAC)
User Account Control (UAC) is a Windows security mechanism that helps prevent unauthorized changes by requiring user approval or an administrator password. However, attackers may use UAC bypass techniques to elevate to Administrator without user consent by exploiting the way Windows implements UAC.
A classic case is fodhelper.exe (a control panel utility on Windows 10+): it auto-elevates if invoked, and it looks for specific registry settings for commands to execute. By planting a rogue command under the registry key HKCU:\Software\Classes\ms-settings\Shell\Open\command, an attacker can cause fodhelper.exe to run an arbitrary command as Administrator without any UAC prompt. Another method uses eventvwr.exe, which launches mmc.exe and reads a registry value for what snap-in to open. By redirecting that value to a malicious executable path, an attacker running eventvwr will execute their payload as admin.
The simplest mitigation is to set UAC to its highest level, which forces a prompt even for built-in auto-elevating executables. Organizations can also deploy AppLocker or Windows Defender Application Control to prevent unknown code from running via those trusted executables.
Exploiting Misconfigured Services
Windows services running with high privileges can be a goldmine for privilege escalation if misconfigured. Common service misconfigurations include:
Weak Service File Permissions
Insecure Service Registry Permissions
Service Start/Stop Permissions
Services Executing External Programs or Scripts
Once a tester or attacker identifies an insecure service configuration, the exploitation is usually straightforward: stop the service, replace or modify the executable, and start the service again. Tools like PowerUp and WinPEAS check for such conditions.
To prevent such escalations, administrators should audit service permissions regularly and ensure that standard Users group has no write access to service executables or relevant registry keys.
Unquoted Service Path Vulnerability
This occurs when the path to a service’s executable is not enclosed in quotes and contains spaces. If quotes are missing, the Service Control Manager may misinterpret the path and execute unintended files placed by an attacker.
Example:
If unquoted, Windows might try C:\Program.exe or C:\Program Files\Some.exe. If an attacker can place a malicious executable in such a location, they gain code execution as SYSTEM.
Mitigation is to quote all service paths and ensure only trusted users can write to those directories.
Abusing High-Privilege Rights: SeDebugPrivilege and Others
Certain Windows privileges are so powerful that they should be handled with extreme caution:
SeDebugPrivilege: Allows access to and manipulation of any process memory, including injecting code into SYSTEM processes.
SeLoadDriverPrivilege: Permits loading kernel drivers.
SeBackupPrivilege / SeRestorePrivilege: Enable reading/writing any file, bypassing permissions.
SeTakeOwnershipPrivilege: Lets users take ownership of objects and escalate from there.
Tools like PsExec leverage SeDebugPrivilege to launch SYSTEM shells. Admin accounts generally have these privileges, so least privilege practices and monitoring of privilege use are crucial.
Post-Escalation: Tools and Frameworks in Action
Key tools:
WinPEAS: Automated enumeration for Windows misconfigurations.
PowerUp / SharpUp: PowerShell and C# tools for privesc enumeration.
Post-Exploitation Frameworks: Metasploit, Cobalt Strike, Empire, and others include modules for privilege escalation.
These tools help attackers identify and exploit weak points in system configurations to escalate privileges effectively.
Mitigation Strategies and Detection Tips
System Hardening: Apply least privilege, remove unneeded privileges.
Patch Known Vulnerabilities: Stay current on CVEs.
Secure Service Configurations: Audit and lock down service paths and permissions.
Enforce UAC at Highest Level: Prevent silent auto-elevation.
Monitor Events and Behavior: Watch for suspicious API calls, service changes, unusual process trees.
Incident Response Readiness: Detect escalation attempts early and contain them quickly.
Privilege escalation in Windows is a common and powerful tactic used by attackers. Understanding the vectors – from token impersonation to misconfigured services – is essential for both attackers simulating threats and defenders building resilient systems. By auditing configurations, applying least privilege, and actively monitoring key behaviors, organizations can significantly reduce the risk of a low-privilege foothold turning into a complete system compromise.

