Linux Privilege Escalation Enumeration Tools
Automated scripts identify misconfigurations, credential leaks, and exploitable binaries. Use them early—but always verify findings manually before exploitation.
Getting tools onto the target
When the target has no internet access, serve tools from your attack box and pull them down. Always set up a transfer method before running enumeration tools.
Serving HTTP on 0.0.0.0 port 8080 ...
LinPEAS (recommended)
Modern, actively maintained, and comprehensive. Start here on all engagements.
Download and run:
Interpretation:
Focus on red and orange highlighted lines. Red background means critical — likely directly exploitable.
Within red findings, prioritise in this order:
sudorules withNOPASSWD, SUID binaries in non-standard paths (/opt,/usr/local, home directories), writable cron or systemd unit files, Linux capabilities on binaries, and plaintext credentials in config files or history.Ignore informational blue/green output unless context suggests relevance — these are not escalation vectors on their own.
Notice
LinPEAS is allowed in OSCP and most exams. It does not exploit—only enumerates.
pspy (process snooping for cron and timers)
Use this when you suspect scheduled tasks, short-lived jobs, or secrets passed on the command line. pspy can show commands executed by other users without needing root.
Get it onto the target
On your box, download a release binary once and reuse it across engagements.
pspy64/pspy32: static, most compatiblepspy64s/pspy32s: smaller, depends on libc
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
<span>CMD: UID=0 PID=2142 | /bin/sh -c /opt/backup.sh</span><br /><span>CMD: UID=0 PID=2145 | tar -czf /var/backups/site.tgz /var/www/html</span><br />
Wait at least 2–3 minutes. Watch for UID=0 processes firing on a regular cadence.
Catch file events and tune scanning
If you're missing fast jobs, enable file events and slow down the proc scan to reduce noise:
When you see root running a script or binary, immediately check whether any part of that execution path is writable by you: the script itself, any sourced config, the working directory, or any file it creates that gets executed later.
Where to go next based on what you see:
Root running a script on a schedule → Cron Job Privilege Escalation
Root triggering a systemd service → Systemd Unit and Timer Privilege Escalation
Root calling a command without an absolute path → Writable PATH Hijacking
Credentials or tokens in command-line arguments → use them immediately, then find where they are stored on disk
SUID3NUM (SUID-focused)
Identifies custom SUID binaries and cross-references them with GTFOBins automatically.
Download and run:
Output includes:
Default SUID binaries (safe, ignore)
Custom SUID binaries (investigate)
GTFOBins matches with exploitation commands
For the full SUID exploitation workflow including binary analysis see SUID Binary Privilege Escalation.
Warning
The -e auto-exploit flag modifies the system and is not allowed in OSCP. Use only for manual verification.
linux-exploit-suggester (kernel CVE matching)
Compares kernel version and package metadata against known kernel privilege escalation CVEs. Run before attempting any kernel exploit — it narrows the candidate list significantly and avoids wasted time on patched versions.
Always verify the specific patch level with dpkg -l linux-image* or rpm -qa kernel* before attempting any suggested exploit. Distributions backport patches without changing the version number shown by uname -r, so suggester output is a starting point — not a guarantee.
For the full kernel exploitation workflow see Kernel Local Privilege Escalation.
lse.sh (Linux Smart Enumeration)
Lightweight alternative when Python is unavailable or script size matters.
Run:
Focuses only on high-yield privilege escalation vectors. Output uses red/yellow/green severity tags.
Works in ash, dash, and minimal shells. Ideal for embedded or restricted targets.
Increase verbosity for more detail: ./lse.sh -l 2
BeRoot
Python tool that validates common misconfigurations with clear exploit suggestions.
Run:
Checks for:
Abusable sudo rules
Writable system files
PATH hijacking
LD_PRELOAD abuse
LinEnum (legacy)
Older Bash-based enumerator. Still functional but outdated.
Run with thorough mode and keyword search:
Warning
LinEnum is deprecated. Last updated in 2018. Lacks coverage for capabilities, containers, systemd, and modern kernel exploits. Use only if newer tools fail to execute.
unix-privesc-check (minimalist)
Single-file shell script focused on file permissions, sudoers, and process inspection. Works in restricted environments.
Run:
checksec (binary/kernel hardening)
Identify exploit mitigations that affect kernel or binary exploitation viability.
Install if missing:
Run full system check:
For a specific SUID binary found during enumeration, check its mitigations individually before attempting exploitation:
Key outputs:
Kernel ASLR, SMAP/SMEP, KPTI: determine if kernel exploits are feasible. See Kernel Local Privilege Escalation.
PIE, RELRO, Canaries, NX: affect userland binary exploitation. No PIE combined with no stack canary on a custom SUID binary means a simple overflow may work without any bypass. See SUID Binary Privilege Escalation.
Use this to decide whether to pursue kernel exploits or focus on configuration-based escalation.
References
-
LinPEAS GitHubgithub.com/carlospolop/PEASS-ng (opens in new tab)
Official releases and documentation
-
Process monitoring without root for scheduler discovery
-
SUID3NUM GitHubgithub.com/Anon-Exploiter/SUID3NUM (opens in new tab)
Auto SUID enumeration and GTFOBins matching
-
linux-exploit-suggester GitHubgithub.com/mzet-/linux-exploit-suggester (opens in new tab)
Kernel vulnerability identification against running system metadata
-
Lightweight privilege escalation enumeration
-
BeRoot Linux GitHubgithub.com/AlessandroZ/BeRoot/tree/master/Linux (opens in new tab)
Misconfiguration validator for privilege escalation
-
LinEnum GitHubgithub.com/rebootuser/LinEnum (opens in new tab)
Legacy Bash-based enumeration script
-
unix-privesc-check GitHub (1_x branch)github.com/pentestmonkey/unix-privesc-check/tree/1_x (opens in new tab)
Minimal shell-based privilege escalation checker
-
checksec GitHubgithub.com/slimm609/checksec (opens in new tab)
Binary and kernel security feature detection
Was this helpful?
Your feedback helps improve this page.