Privesc enumeration

From NoorQureshi/security-skills · View interactive version

Privesc enumeration is an AI agent skill from the GitHub repository NoorQureshi/security-skills. Systematic post-foothold host enumeration and credential/loot hunting on Linux and Windows — build situational awareness and find the lead that escalates or moves laterally. Load the moment you land a shell and think "now what?". Signals: fresh foothold, low-priv user, "enumerate the box", "situatio

How to use this skill

Skill file

Post-foothold enumeration & credential hunting

When it applies

You have a shell as a low-privileged user and need to know what you're standing on and where to go

next. This is the situational-awareness pass that precedes escalation: it surfaces the leads that

privesc-arsenal (local privesc vectors) and ad-pivot-arsenal (domain) then exploit. On Windows

run whoami /priv and on Linux sudo -l first — an enabled privilege or sudo rule is a shortcut

past all of this.

Why it works

Machines leak their own secrets: config files hold DB and service passwords, history files record

typed credentials, home directories and shares carry keys, and the OS records who runs what. A

methodical sweep — then a targeted grep for secrets — finds the reused password or private key that

turns one foothold into root/SYSTEM or the next host. Enumerate before you exploit; noise and dead

ends come from skipping this.

Method

Work top-down; note every lead in notes.md and follow the strongest one.

1 · Who/where am I — id/whoami /all, groups (a docker/lxd/adm group or

SeImpersonate/SeBackup privilege is often the whole game), hostname, OS/kernel/patch level

(uname -a / systeminfo), and am-I-in-a-container (/proc/1/cgroup, /.dockerenv).

2 · Automated first pass (then read the output, don't scroll it):

linpeas.sh > lp.txt / winPEASx64.exe, plus pspy64 (Linux, catches root cron without root) and

Seatbelt.exe -group=all / PowerUp (Windows). Treat highlights as leads to verify.

3 · Users, processes, services, scheduled jobs — other users (/etc/passwd, net user),

running processes and their owners (ps auxf / tasklist /v), services (esp. unquoted paths / weak

perms on Windows), and cron/systemd-timers / scheduled tasks. A privileged process reading a file

you can write is a lead.

4 · Network & internal reach — listeners bound to 127.0.0.1 (ss -tulnp / netstat -ano)

are internal services to port-forward to; ARP/routes/extra NICs reveal a pivot

(network-pivoting-tunneling).

5 · Hunt credentials & loot — the highest-yield step:

.env, wp-config.php, web.config, *.conf, connection strings.

(ConsoleHost_history.txt).

~/.ssh/, cloud creds (~/.aws/credentials), Kubernetes ~/.kube/config, tokens.

unattend.xml/sysprep.inf/GPP Groups.xml, netsh wlan show profile name=* key=clear,

DPAPI/browser creds, and C:\Windows\System32\config\RegBack\ (SAM/SYSTEM copies).

6 · Files of interest — recently modified files (find / -mmin -10), backups (*.bak/*.old),

readable /etc/shadow, writable files/dirs in privileged paths, and Windows Alternate Data Streams

(dir /r).

7 · Route the lead — cracked/found password → try it everywhere (reuse is rampant;

network-password-spraying); crackable hash/keyfile → network-credential-cracking; escalation

vector → privesc-arsenal; domain context → ad-pivot-arsenal.

Gotchas

(su, WinRM, SMB) before hunting harder.

them and stay in RoE.

not whole home directories.

Verify success

A concrete next-step lead in hand — a working credential, a private key, an internal service to

tunnel to, or a confirmed escalation vector — recorded with where it came from.

References

HackTricks (Linux/Windows local privesc checklists); PEASS-ng; pspy, Seatbelt.

Exploit the leads with privesc-arsenal; domain leads with ad-pivot-arsenal.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.