Intermediate 20 minUpdated 2026-11-06
Linux privilege-escalation checklist
You have a shell as an unprivileged user on an in-scope Linux host and want to escalate to root. Privilege escalation is mostly enumeration: the path is usually already there, waiting to be noticed. Work through these checks in order.
Know who you are
Establish your user, groups and sudo rights first. Membership of groups like sudo, docker, lxd or disk is often the whole game.
idYour UID, GID and supplementary groups.
sudo -lWhat you may run with sudo — look for NOPASSWD and editable scripts.
Understand the system
Record the distribution and kernel version. An out-of-date kernel may have a public local exploit, and the distro decides which paths apply.
cat /etc/os-releaseDistribution and version.
uname -aKernel version and architecture.
Hunt SUID and capabilities
Files that run as another user are a top escalation route. Compare what you find against GTFOBins.
find / -perm -4000 -type f 2>/dev/nullSUID binaries.
getcap -r / 2>/dev/nullBinaries with Linux capabilities such as cap_setuid.
Look at scheduled jobs
Cron jobs and systemd timers that run as root and call writable scripts or use wildcards are a classic win.
cat /etc/crontab; ls -la /etc/cron.*System cron jobs and directories.
systemctl list-timers --allsystemd timers, the modern equivalent.
Check writable and interesting files
World-writable files owned by root, readable backups, and credentials in config or history files all lead somewhere.
find / -writable -type f ! -path "/proc/*" 2>/dev/nullFiles your user can write.
grep -rniE "password|api[_-]?key|secret" /var/www /home 2>/dev/nullHard-coded secrets to reuse.
Review network and processes
Services bound to localhost may be exploitable only from the box, and processes running as root reveal more attack surface.
ps aux | grep -v "\]quot;Processes, kernel threads hidden.
ss -tlnpListening ports, including localhost-only services.
If manual checks come up short, an automated enumerator such as linpeas can surface what you missed — but understanding each finding by hand is what makes you reliable. Only escalate on systems you are authorised to test.
More guides
Network recon from zero
Go from a single IP range to a map of live hosts, open ports and running services.
Web application enumeration
Map a web application’s surface: technologies, hidden content, parameters and obvious vulnerability classes.
Active Directory enumeration
From valid domain credentials to a map of users, groups and attack paths toward Domain Admin.