playbook-infra

An infrastructure penetration-testing playbook for internal networks, servers, and non-web services. It follows the PTES, a published penetration-testing process, from scope checks through discovery, vulnerability assessment, and movement between systems.

In plain words
What is it for?
Use it to verify scope, discover hosts and services, identify software and operating systems, check network protocols and vulnerabilities, and plan pivoting or lateral movement.
Why use it?
It gives multi-host assessments a clear order and keeps authorization, exclusions, evidence, and network coverage visible.

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/infra
Any agent
npx skills add s0ld13rr/pentestcode --skill infra
Clone the repo
git clone --depth 1 https://github.com/s0ld13rr/pentestcode

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 685 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00070 $0.00685
Opus 5 $0.00035 $0.00342
Sonnet 5 $0.00014 $0.00137
Haiku 4.5 $0.00007 $0.00068

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

Security

Grade A, and why

playbook-infra scanned grade A with 0 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/playbooks/infra/SKILL.md · 73 lines

How it starts

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

Infrastructure Pentest Playbook

Based on PTES (Penetration Testing Execution Standard).

Scope Verification

Before starting:

  • Confirm target IPs/CIDRs are authorized
  • Identify excluded hosts/services
  • Note time windows and rules of engagement
  • Verify emergency contacts

Phase Flow

1. Passive Reconnaissance

  • WHOIS, DNS records, ASN mapping
  • Subdomain enumeration (passive sources only)
  • Certificate transparency logs
  • Shodan/Censys for exposed services
  • Goal: Map attack surface without touching targets

2. Active Enumeration

  • Host discovery: nmap -sn <cidr>
  • Port scan: nmap -sS -p- --min-rate 5000 <targets>
  • Service detection: nmap -sV -sC -p <ports> <targets>
  • OS detection: nmap -O <targets>
  • UDP top ports: nmap -sU --top-ports 50 <targets>
  • Protocol-specific enumeration (SMB, LDAP, SNMP, NFS, RPC)
  • Goal: Complete inventory of hosts, ports, services, versions

3. Vulnerability Assessment

  • Automated: nuclei -severity critical,high + nmap --script vuln
  • CVE search for every versioned service: searchsploit <service> <version>
  • Default credential checks on all login services
  • SSL/TLS configuration: sslscan, testssl.sh
  • Misconfiguration checks (open databases, exposed APIs, anonymous access)
  • Goal: Prioritized vulnerability list with evidence

4. Exploitation

Priority order:

  1. Known CVEs with public exploits (critical/high)
  2. Default/weak credentials
  3. Misconfigurations allowing access
  4. Brute force attacks
  5. Manual exploitation of custom services
  • Goal: Gain initial access, document every attempt

5. Post-Exploitation

  • Privilege escalation on every accessed host
  • Credential harvesting (files, memory, databases)
  • Lateral movement with found credentials
  • Network pivoting to unreachable segments
  • Data discovery (sensitive files, databases, secrets)
  • Goal: Demonstrate maximum impact, document attack path

6. Reporting

  • Executive summary with risk rating
  • Technical findings by severity (CVSS scoring)
  • Attack path narrative with evidence
  • Remediation recommendations prioritized by risk
  • Host summary table

Read the full file on GitHub · 73 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 · 73 lines · 70 tokens per session scan A c6b6571ada55

Subscribe to this mod's changes

playbook-infra is a skill published in the GitHub repository s0ld13rr/pentestcode (594 stars, last pushed 11d ago), licensed MIT. It adds 70 tokens to every session and 685 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.