Privilege escalation turns initial access into meaningful impact — from a low-privileged foothold, the question is whether an attacker can reach root, administrator, or domain admin.
Moving from a lower to a higher privilege level on the same system.
Moving from one user to another at the same privilege level.
The first move after gaining any foothold is not to try an exploit — it is to enumerate the local environment.
The same pattern classes appear on Linux and Windows. Learn the class; the specific technique follows.
| # | Pattern class | Core idea |
|---|---|---|
| 1 | Misconfigured privileged operation | A configured grant broader than the configurer realized |
| 2 | Weak ACLs on privileged objects | Mutable state that influences privileged execution |
| 3 | Leaked credentials / tokens | Secrets in places low-privilege contexts can read |
| 4 | Dangerous capabilities / memberships | The identity already holds a key — recognize it |
| 5 | Vulnerable privileged software | A privileged process has a bug; exploit the bug |
| 6 | Trust / identity relationship abuse | Identity infrastructure can be walked from low to high |
| 7 | Container / virtualization escape | The guest-to-host boundary is weaker than expected |
A configured grant that is broader than the configurer realized.
sudo rule allowing a command GTFOBins can abuse to spawn a shell — vim, find, awk, tar, less, man, tee, …SeImpersonatePrivilege on a service account enables "potato" attacks (PrintSpoofer, RoguePotato) → SYSTEMA binary, service, task, config, or registry key runs with privilege but is writable by an unprivileged user.
C:\Program Files\Foo Bar\service.exe without quotes causes Windows to try C:\Program.exe firstThe privileged credential is accessible to a less-privileged context.
.env files, history files, ~/.aws/credentials, SSH keys with weak permissions, config files with database credentialsUnattend.xml, sysprep.xml, Winlogon autologon registry keys, Group Policy Preferences (cpassword), LSASS memoryThe attacker's identity already holds a key — the task is recognizing it.
docker group (mount host FS → root); CAP_SYS_ADMIN on a binaryBackup Operators, Print Operators, DnsAdmins; SeBackupPrivilege (read any file including SAM)docker group is functionally equivalent to root membership. Treating it as a normal group is the misconfiguration.
pkexec)Kernel exploits can panic systems — use only when explicitly authorized.
/tmpContainer-escape literacy is now first-tier for modern pentesting.
sudo -l reconciled with GTFOBinsfind / -perm -4000 -type f 2>/dev/nullgetcap -r / 2>/dev/nullPATHno_root_squash is a classic pathwhoami /priv, whoami /groups — token and privilege listAlwaysInstallElevated registry settingAD is one of the most reliable escalation surfaces in real engagements — structural drift (ACL changes, legacy delegation, AD CS misconfigurations) accumulates faster than it is cleaned up.
msDS-AllowedToActOnBehalfOfOtherIdentityIn cloud-native environments, privilege escalation is largely an identity problem. The attack surface is IAM, not filesystem permissions.
Best: also name the control category that should have prevented it — this frames the remediation the client pays for.
A user is in the docker group on a Linux host. No SUID binaries are present. Is this a privilege-escalation finding? Why?
Yes. The docker group lets the user start containers and mount the host filesystem into a container, then read or write arbitrary files as root. This is Pattern 4 — dangerous capability already held. The docker group is functionally equivalent to root membership; treating it as a normal group is the misconfiguration. The absence of SUID binaries is irrelevant.
The previous version of this course named a finding "Privilege escalation using LinPEAS". Rewrite it as a finding title the client can act on without reading the body.
Something like: "Privileged scheduled task executes script in user-writable directory, enabling local privilege escalation to root" — or, depending on the actual root cause: "Sudo configuration grants execution of find as root, enabling shell breakout." Name the cause the client can fix. LinPEAS is the discovery method, not the finding.
Next: Topic 17 — Web application testing. How the OWASP attack surface connects to the pattern classes covered here.