Linux Privilege Escalation is the art of going from a low-privileged user to root. This room covers the essential techniques every pentester needs: SUID binaries, sudo misconfigurations, cron jobs, kernel exploits, and more!
Privilege escalation is like being invited to a party but wanting access to the VIP room. You're already inside - now you need to convince the bouncer (the kernel) that you belong in the restricted area!
Initial Enumeration
LinPEAS
Run LinPEAS for automated enumeration. It checks everything and highlights findings in color. Download from GitHub and run:
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | shSudo Exploitation
SUID Exploitation
SUID binaries run with owner's permissions (usually root). A vulnerable SUID binary is an instant privesc vector!
Cron Job Exploitation
Cron jobs run as their owner (often root). If you can modify what they execute, you inherit their privileges!
Capabilities
Password Hunting
Kernel Exploits
Kernel exploits can crash systems! Always have permission and a backup plan. Use them as a last resort after other methods fail.
NFS Misconfiguration
Knowledge Check
Key Takeaways
- Always start with sudo -l - it's the quickest win
- SUID binaries with shell escapes are instant root
- Cron jobs running writable scripts = code execution as cron's user
- Capabilities can be as powerful as SUID
- GTFOBins is your bible for sudo/SUID exploitation
- Kernel exploits are last resort - risky but effective