The idea
A low-privileged shell is the start, not the finish. Linux privesc is overwhelmingly about enumeration: root almost always leaves a misconfiguration behind, and the job is to find it before guessing at exploits.
How I work through it
Enumerate systematically. I run a script for coverage but read the output myself rather than trusting its highlights:
sudo -l
find / -perm -4000 -type f 2>/dev/null
./linpeas.sh
Check the common wins in order:
- sudo rules — any allowed binary with a known GTFOBins escape is usually an instant root.
- SUID binaries — non-standard entries in the SUID list, cross-referenced against GTFOBins.
- cron jobs — a root cron calling a script I can write, or a wildcard I can abuse.
- writable paths — a writable
PATHentry or a weak file capability.
Kernel exploits are my last resort — they are noisy and can crash the box.
Pitfalls I watch for
- Read the enumeration output fully. The path to root is often a single quiet line a summary skips over.
- Confirm an abuse against GTFOBins before running it, so I understand exactly what a binary will do as root.
- Stabilise the shell first (a proper PTY). Half the "exploit failed" moments are really a broken, non-interactive shell.
Takeaway
Enumerate the same way every time and the escalation is usually a misconfiguration, not an exploit. Save kernel CVEs for when nothing else is there.