agentleFS
mahumadadmahumadad/quarry/skills/hunt/post-exploitation/SKILL.md

post-exploitation

Skill1 starsChanged 12 days agoMITView on GitHub

Assess post-exploitation risk after initial access: lateral movement, persistence, privilege escalation, and data exfiltration vectors.

  • Reads credentials

5 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ai-llm-app-attack, attack-surface-recon and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • KxiandaoyanSkill

    ai-llm-app-attack

    AI/LLM应用攻击:提示注入,Agent工具滥用RCE,RAG投毒,MCP供应链,torch.load pickle RCE。Use when testing LLM apps, agents, RAG, MCP plugins, or AI model file risks.

    Also in 3 projects that use this

  • KxiandaoyanSkill

    attack-surface-recon

    侦察/攻击面测绘:被动whois/amass/crt.sh/FOFA/Shodan,主动subfinder/httpx/naabu/katana/nuclei,DNS地域/CDN/Nginx catch-all/宝塔/UniApp指纹。开局第一动作,认知写入项目黑板。Use when starting recon, asset mapping, fingerprinting, or CDN/DNS bypass discovery.

    Also in 3 projects that use this

  • +10 more from Kxiandaoyan

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After gaining access, gather context before acting:

    line 22
  2. Distinctive:

    Every command output captured in custody log.

    line 34
  3. Distinctive:

    Document — do NOT install — persistence mechanisms available:

    line 59
  4. Distinctive:

    Document the path (how an attacker would install it)

    line 73
  5. Distinctive:

    Check for escalation vectors from current access level:

    line 80
  6. Distinctive:

    NEVER actually exfiltrate data.

    line 115

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Assessment

Skill for assessing post-exploitation risk once initial access is confirmed. Covers lateral movement, persistence, privilege escalation, and data exfiltration vectors — all within authorized scope.

Prerequisites

  • At least one finding with status exploited or confirmed that grants code execution or authenticated access
  • Explicit operator approval via seven-question gate
  • Scope must explicitly authorize post-exploitation activities

Phase 1: Situational Awareness

After gaining access, gather context before acting:

1. Identify current user/role and privileges
2. Enumerate local system info (OS, hostname, network interfaces)
3. List running services and listening ports
4. Check for credential stores (env vars, config files, keyrings)
5. Map network topology visible from this position

Evidence Requirements

Every command output captured in custody log. No destructive actions without separate operator gate.

Phase 2: Lateral Movement Assessment

Assess — do NOT execute without gate — potential lateral paths:

VectorCheckTool
SSH keysfind / -name authorized_keys -o -name id_rsa 2>/dev/nullManual
Network sharesshowmount -e {host}, SMB enumerationnmap scripts
Internal servicesPort scan from compromised hostnmap/rustscan
Cloud metadatacurl -s http://169.254.169.254/latest/meta-data/curl
Container escapeCheck /proc/1/cgroup, Docker socketManual
Database credentialsGrep config files for connection stringsgrep/find
Token reuseSession tokens, API keys in environmentenv, config

Chain Anchors

  • rce → enables pivot-internal
  • ssrf + cloud-metadata → credential-theft
  • credential-file-read → lateral-movement

Phase 3: Persistence Assessment

Document — do NOT install — persistence mechanisms available:

MechanismRisk LevelDetection Difficulty
Cron jobsMediumLow — visible in crontab
SSH authorized_keysMediumLow — visible in file
Web shellHighMedium — file on disk
Service/systemd unitHighMedium — visible in systemctl
Container image modificationHighHigh — survives restarts
Database triggers/stored procsMediumHigh — often unmonitored

Reporting

For each mechanism found available:

  1. Document the path (how an attacker would install it)
  2. Assess detection difficulty for the target's monitoring
  3. Recommend specific detection rules (feeds into detection-pairing skill)
  4. Classify as Demonstrated (if tested read-only) or Inferred

Phase 4: Privilege Escalation

Check for escalation vectors from current access level:

1. SUID/SGID binaries: find / -perm -4000 -type f 2>/dev/null
2. Sudo misconfigurations: sudo -l
3. Kernel version vs known local privesc CVEs
4. Writable paths in cron jobs or services
5. Docker group membership (docker run --privileged)
6. Cloud IAM role permissions (overly permissive)
7. Database GRANT privileges

Cross-reference with ENABLES_MAP: auth-bypass → privilege-escalation.

Phase 5: Data Exfiltration Assessment

Map sensitive data accessible from current position:

Data TypeWhere to LookImpact
PII/PHIDatabase tables, file storesRegulatory (GDPR/HIPAA)
CredentialsConfig files, env vars, vaultsLateral movement
Business dataApplication databases, S3 bucketsFinancial/competitive
Source codeGit repos, deployment artifactsIP theft
LogsApplication/system logsReconnaissance

Volume Assessment

Estimate extractable data volume and rate:

  • Network egress bandwidth from compromised host
  • Available exfil channels (DNS, HTTP, ICMP)
  • Detection likelihood per channel

Gotchas

  • NEVER actually exfiltrate data. Demonstrate access, measure volume, document the path. The PoC is "I can read row 1 of table X", not "here are 10k rows".
  • Container breakouts: verify scope covers the host, not just the container.
  • Cloud metadata: some providers have IMDSv2 requiring token — check both.
  • Persistence assessment is documentation only — installing persistence mechanisms is out of scope unless explicitly authorized.
  • Network pivoting from a compromised host changes the attack surface — re-confirm scope before scanning internal networks.

Output

For each post-exploitation vector assessed:

  1. Finding with evidence_tag (Demonstrated if verified read-only, Inferred if theoretical)
  2. Chain reference linking initial access to post-exploitation capability
  3. Detection recommendation for blue team
  4. Remediation priority based on combined chain severity

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.