agentleFS
mahumadadmahumadad/quarry/skills/core/opsec-discipline/SKILL.md

opsec-discipline

Skill1 starsChanged 12 days agoMITView on GitHub

Operational security rules for running scans and tools against a live target without causing outages, tripping unnecessary alerting, or leaking engagement details. Covers rate limiting, user-agent/identity hygiene, timing, and responsible handling of any sensitive data recon turns up. Use before configuring any scanning tool, and whenever a tool's default settings would be noisy or aggressive. Not about anonymizing identity from the client — the client knows this is a sanctioned test; this is about not breaking things and not spraying findings outside the engagement's secure channels.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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:

    Before running any tool whose default concurrency/rate could degrade a production service.

    line 21
  2. Distinctive:

    Before running tools against infrastructure described as fragile, low-capacity, or production-only (no staging equivalent) in the RoE.

    line 22
  3. Distinctive:

    When a tool's output or a report draft needs to be stored or transmitted.

    line 24
  4. Distinctive:

    When legally-adjacent findings (PII, credentials, leaked secrets) are discovered.

    line 25
  5. Distinctive:

    Default to conservative timing on anything against production:

    line 37
  6. Distinctive:

    Only rotate/anonymize user-agents or source IPs (proxychains, Tor, rotating proxy pools) when the engagement is explicitly a …

    line 60
  7. Very specific:

    No usar el lab anónimo para engagements donde el cliente espera tráfico atribuible — si el RoE pide UA identificable o IP whitelisteda, …

    line 103
  8. Distinctive:

    If recon surfaces evidence of a real, active compromise by someone else (not the test team), stop and escalate immediately — this is …

    line 114

≈ “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

Signals

  • Before running any tool whose default concurrency/rate could degrade a production service.
  • Before running tools against infrastructure described as fragile, low-capacity, or production-only (no staging equivalent) in the RoE.
  • When a tool's output or a report draft needs to be stored or transmitted.
  • When legally-adjacent findings (PII, credentials, leaked secrets) are discovered.

Prerequisites

  • RoE testing window and rate-limit/IP-allowlist requirements from scope-discipline.
  • Know whether the client wants detection (to test their blue team) or wants to avoid tripping alerts (to avoid noise/false incidents) — this changes the whole approach and must be stated explicitly in the RoE, not assumed.

Methodology

Rate limiting

  1. Default to conservative timing on anything against production:
    nmap -sS -T2 --max-rate 50 -p- 10.0.0.0/24          # polite timing, capped pps
    masscan 10.0.0.0/24 -p1-65535 --rate 500             # explicit low rate, not --rate 100000
    ffuf -u https://target/FUZZ -w wordlist.txt -rate 20 -p 0.1-0.5   # jittered delay between requests
    gobuster dir -u https://target -w wordlist.txt -t 10 --delay 200ms
  2. Scale up only after confirming with the client that the target can absorb it, or when testing a dedicated staging environment.
  3. Watch for self-inflicted lockouts: aggressive auth brute-forcing can trigger account lockout policies or WAF IP bans that end the engagement early.
    # check ban status before continuing a sequence
    curl -s -o /dev/null -w "%{http_code}\n" https://target/

Identity / user-agent hygiene

  1. Set an identifiable, non-default user agent when the RoE calls for traceable testing (so the client's logs can distinguish engagement traffic from real attacks):
    curl -A "PentestEngagement-<ClientCode>-<YourHandle>" https://target/
    ffuf -u https://target/FUZZ -w wordlist.txt -H "User-Agent: PentestEngagement-ACME-2026"
  2. Only rotate/anonymize user-agents or source IPs (proxychains, Tor, rotating proxy pools) when the engagement is explicitly a red-team/detection-evasion test with sign-off for that specific technique. Default assumption is attributable traffic, not evasion — evasion techniques require their own line item in the RoE.
    # only under an explicit detection-evasion mandate:
    proxychains4 nmap -sT -Pn target

Timing and scheduling

  1. Respect the agreed testing window (e.g. business hours only, or off-hours only for availability-sensitive targets). Schedule long scans accordingly:
    at 22:00 <<< "nmap -sS -p- -T3 -oA fullscan target"

Anonymous lab (Docker+Tor+VPN)

  1. Cuando el engagement requiere anonimato (red team evasivo, bug bounty sin exponer IP, targets que bloquean rangos conocidos):
    # Levantar el lab anónimo (Mullvad debe estar conectado primero)
    cd ~/Dev/personal/pentest-vm/docker && ./anonlab.sh up
    
    # Verificar la cadena: debe mostrar IP de exit Tor, IsTor: true
    ./anonlab.sh status
    
    # Shell interactivo en kali (todo el tráfico va por Tor)
    ./anonlab.sh shell
    
    # Configurar el engagement para usar el backend anonlab
    # en .pentest-state/toolrunner.json: {"backend": "anonlab"}
  2. Dentro del lab, las herramientas rutean automáticamente por Tor vía env vars (ALL_PROXY, HTTP_PROXY). Para herramientas que no respetan env vars, usar los wrappers:
    tscan target.com              # nmap connect-scan vía Tor (resuelve DNS por Tor)
    ptor <tool> [args]            # proxychains4 wrapper para cualquier tool TCP
    web whatweb <url>             # whatweb/nikto con UA de Windows, vía Tor
  3. La cadena de red es fail-closed: el contenedor kali no puede hacer conexiones directas a internet — solo a través de Tor. Si Tor cae, las conexiones fallan (no hay fallback a clearnet).
  4. No usar el lab anónimo para engagements donde el cliente espera tráfico atribuible — si el RoE pide UA identificable o IP whitelisteda, usar backend local o kali.

Data handling

  1. Store all engagement artifacts (scan output, screenshots, credentials found) only in the client's designated secure channel/repo — never in a personal/unencrypted location, never pasted into a public paste service or ticket, never committed to a public git repo.
  2. Any live credentials, API keys, or PII discovered during recon must be flagged immediately per the RoE's data-handling clause (usually: do not exfiltrate beyond proof, redact in reports, immediate notification for anything indicating ongoing compromise by a third party).
  3. If recon surfaces evidence of a real, active compromise by someone else (not the test team), stop and escalate immediately — this is outside the engagement and needs client incident response, not more scanning.

Tooling

nmap (-T0..-T5, --max-rate, --scan-delay), masscan --rate, ffuf -rate -p, gobuster --delay, curl -A, proxychains4, tor, at/cron for scheduling.

Validation gate

  • Rate/concurrency settings match what the RoE allows for this target class.
  • User-agent/traffic attribution matches the RoE's stated detection posture (attributable vs. evasion-testing).
  • Testing window matches the RoE schedule.
  • No engagement data stored or transmitted outside the client's designated channel.
  • If anonlab backend: Tor circuit verified (anonlab status), Mullvad connected, fail-closed confirmado (curl directo falla).

Gotchas

  • Tool defaults are almost never safe for production: masscan's default rate and nmap's -T5 can saturate a link or trip IDS/IPS auto-blocking within seconds.
  • "Stealthy" scanning (-sS, fragmented packets, decoys) is not the same as "polite" scanning (rate-limited) — pick based on what the RoE actually asked for, don't default to stealth just because it feels more professional.
  • A WAF ban or account lockout triggered by your own brute-force can masquerade as a finding ("no rate limiting!") when actually it means the opposite — verify before reporting.
  • Findings discussed in Slack/email outside the agreed secure channel create a data-handling violation even if the finding itself is accurate.

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.