agentleFS
s0ld13rrs0ld13rr/pentestcode/skills/phases/post-exploit/SKILL.md

post-exploit-phase

Skill794 starsChanged 5 months agoMITView on GitHub

Post-exploitation gotchas — credential dump order, DPAPI trap, host exhaustion checklist. Use when the current phase is POST_EXPLOIT.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run ALL three, in this order — each extracts different secrets:

    line 10
  2. Distinctive:

    Before a host is "done", ALL of these must be attempted:

    line 23
  3. Very specific:

    If another user has agent forwarding enabled: find /tmp -name "agent.*" → SSH_AUTH_SOCK=/tmp/agent.XXXX ssh target

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Post-Exploitation — What You'll Get Wrong

Credential dump ORDER matters (Windows)

Run ALL three, in this order — each extracts different secrets:

  1. --sam — local account hashes
  2. --lsa — service passwords, cached domain creds, DPAPI system keys
  3. --dpapi — browser passwords, vault, cookies, Credential Manager

On Domain Controllers add --ntds for all domain hashes. Fallback: secretsdump.py DOMAIN/USER:PASS@HOST (SAM+LSA+NTDS in one shot).

DPAPI trap

netexec smb HOST -u USER -p PASS --dpapi with NO subcommands = full dump. Adding subcommands (cookies, nosystem, wifi) LIMITS output. Always bare --dpapi first.

Host Exhaustion — do NOT skip any host

Before a host is "done", ALL of these must be attempted:

  • Privesc check (sudo -l / whoami /priv / SUID / kernel version)
  • Credentials dumped (SAM+LSA+DPAPI on Windows, shadow/keys/history/configs on Linux)
  • Found creds sprayed across ALL known hosts+services
  • Network config enumerated (arp, routes, internal DNS) — may reveal hidden subnets
  • Internal services discovered (ss -tlnp / netstat) — ports not visible externally
  • Stored creds checked (autologon, cmdkey, env vars, browser profiles)

Linux credential locations you'll miss

  • /home/*/.bash_history — often contains passwords in commands
  • App configs: .env, *.conf, *.cfg, *.ini — DB passwords, API keys
  • SSH keys: ~/.ssh/ (private keys AND authorized_keys for persistence)
  • Browser profiles: ~/.mozilla/firefox/*/logins.json, ~/.config/google-chrome/*/Login Data

SSH agent forwarding hijack

If another user has agent forwarding enabled: find /tmp -name "agent.*" → SSH_AUTH_SOCK=/tmp/agent.XXXX ssh target

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.