Privilege Escalation (Linux and Windows)
This domain tests whether you can go from a low-privilege foothold to root or SYSTEM using misconfiguration rather than luck. Enumeration is the whole game: run automated collectors, then confirm every lead manually.
Core rules: Linux
sudo -lfirst:NOPASSWD,(ALL), or any allowed binary you can escape via GTFOBins.- SUID/SGID:
find / -perm -4000 -type f 2>/dev/null; remember the-pflag preserves privileges. - Capabilities:
getcap -r / 2>/dev/null-cap_setuidandcap_dac_read_searchare gold. - Cron: writable scripts, PATH hijack, wildcard injection in
tarorrsyncjobs. - NFS exports with
no_root_squash, writable/etc/passwd, and loose permissions on backups and configs. - Kernel exploits last: they can panic the box and cost you the exam.
Core rules: Windows
whoami /priv,whoami /groups,systeminfo,net user,net localgroup administrators.- Service ACLs via
accesschkor PowerUpInvoke-AllChecks, unquoted service paths, writable service binaries. AlwaysInstallElevatedset in both HKLM and HKCU.SeImpersonatePrivilegeleads to the Potato family orPrintSpoofer.- Stored credentials:
cmdkey /list,runas /savecred, unattended install files, registry autologon.
Worked example
sudo -l shows (root) NOPASSWD: /usr/bin/find. GTFOBins gives sudo find . -exec /bin/sh \; -quit. You get a root shell. Reasoning: sudo runs the binary as root and -exec inherits that context, so no SUID bit is needed.
Traps that cost marks
Firing a kernel exploit before checking sudo; forgetting -p with SUID shells; running WinPEAS without reading its output; assuming an unquoted service path is exploitable without checking directory write permissions; and not recording the escalation path for the report.