OSCP · Module 14
Linux Privilege Escalation
Enumerate misconfigurations, abuse sudo and SUID, hijack services, hunt credentials, and exploit kernel vulnerabilities to escalate to root on Linux.
~5 h 36 resources Last updated September 25, 2026
Linux privilege escalation starts with thorough enumeration and ends with root. PEN-200 covers automated tools like LinPEAS and pspy, sudo and SUID misconfigurations, cron job abuse, service exploits, library hijacking, credential hunting, and kernel vulnerabilities. Most Linux boxes fall to a misconfiguration rather than a CVE, so methodical enumeration is the skill that matters most.
Enumeration and Automated Tools
Map the system before attacking: OS version, kernel, users, groups, sudo rules, SUID binaries, running processes, cron jobs, listening services, and mounted filesystems. LinPEAS covers most of this in one run. pspy reveals hidden cron jobs and timed processes without root. Understanding what each tool checks lets you fill in the gaps manually when automated output is incomplete.
Sudo, SUID, and Service Exploits
Sudo misconfigurations (GTFOBins abuse, wildcard injection, SETENV + LD_PRELOAD) and SUID binary abuse are the most common Linux escalation paths. Cron jobs with writable scripts, systemd units with weak permissions, PATH hijacking, and library hijacking (shared objects, Python modules, LD_PRELOAD) provide additional vectors. Group membership (docker, lxd, disk, shadow) can grant root-equivalent access. Container escapes apply when the target runs inside Docker or LXC with elevated privileges.
Credential Hunting and Kernel Exploits
Credential hunting targets shell history, config files, SSH private keys, environment variables, browser saved passwords, and process arguments. Password reuse across accounts is common. When misconfigurations yield nothing, kernel exploits (Dirty Pipe, PwnKit, Dirty COW, OverlayFS) provide a fallback. Kernel exploitation carries crash risk, so enumerate and attempt misconfigurations first.
Read
The core material for this module. Where a guide goes deeper than needed, the relevant sections are highlighted.
-
Guide 17 min readLinux Privilege Escalation Enumeration Tools
-
Guide 6 min readSudo Misconfiguration Privilege Escalation
-
Guide 10 min readSUID and SGID Binary Privilege Escalation
Practice
Apply the module hands-on.
- Blocky HackTheBox Easy
- Brooklyn Nine Nine TryHackMe Easy
- Infosec Prep: OSCP Box Vulnhub Easy
- Kenobi TryHackMe Easy
- Lin.Security Vulnhub Easy
- Mirai HackTheBox Easy
- Mr-Robot 1 Vulnhub Easy
- Sunday HackTheBox Easy
- Toppo 1 Vulnhub Easy
- Tr0ll 1 Vulnhub Easy
- Tr0ll 3 Vulnhub Easy
- Billy Madison Vulnhub Intermediate
- Fail Proving Grounds Intermediate
- HackLAB: Vulnix Vulnhub Intermediate
- Hetemit Proving Grounds Intermediate
- Hunit Proving Grounds Intermediate
- Sorcerer Proving Grounds Intermediate
- W34kn3ss 1 Vulnhub Intermediate
- Digitalworld.local (Development) Vulnhub Medium
- Lightweight HackTheBox Medium
- Node 1 Vulnhub Medium
- Shrek TryHackMe Medium
- SolidState HackTheBox Medium
- UpDown HackTheBox Medium
- Peppo Proving Grounds Hard