End-to-end workflow
The script
Section titled “The script”This script runs phases 2, 4, 6, 8 and a narrow version of 13 for one domain. It skips brute force, port scanning and content discovery on purpose: those are heavy and need a human decision per program.
Save it as ~/tools/recon.sh, make it executable with chmod +x ~/tools/recon.sh, and run it as recon.sh example.com.
#!/usr/bin/env bash# recon.sh: passive enum, resolution, probing, URL collection and a filtered# Nuclei pass for one domain. Usage: recon.sh example.com# Only run against domains that are in scope for a program you are on.
set -euo pipefail
# ---------- settings: edit these to match the program's rules ----------DOMAIN="${1:?usage: recon.sh <domain>}"BASE="$HOME/recon/$DOMAIN"RUN="$BASE/runs/$(date +%F)" # dated folder for this runRESOLVERS="$HOME/wordlists/resolvers-trusted.txt"RATE=20 # max requests per second for HTTP toolsTHREADS=10DRE=$(printf '%s' "$DOMAIN" | sed 's/\./\\./g') # domain as a regex, dots escaped
# ---------- helpers ----------log() { printf '\033[1;32m[%s]\033[0m %s\n' "$(date +%T)" "$*"; }need() { command -v "$1" >/dev/null || { echo "missing tool: $1" >&2; exit 1; }; }for t in subfinder assetfinder dnsx httpx gau katana uro nuclei anew jq curl; do need "$t"; done
# ---------- scope guard: refuse to run without scope files ----------if [[ ! -s "$BASE/scope/roots.txt" ]]; then echo "create $BASE/scope/roots.txt with the in-scope roots first" >&2 exit 1figrep -qxF "$DOMAIN" "$BASE/scope/roots.txt" || { echo "$DOMAIN is not in scope/roots.txt" >&2; exit 1; }OOS="$BASE/scope/out-of-scope.txt"; touch "$OOS"
mkdir -p "$RUN"/{subs,dns,http,urls,vulns}cd "$RUN"log "run folder: $RUN"
# ---------- phase 2: passive subdomain enumeration ----------log "passive enumeration"subfinder -d "$DOMAIN" -all -silent > subs/subfinder.txt || trueassetfinder --subs-only "$DOMAIN" > subs/assetfinder.txt || truecurl -s "https://crt.sh/?q=%25.$DOMAIN&output=json" \ | jq -r '.[].name_value' 2>/dev/null | sed 's/^\*\.//' > subs/crtsh.txt || true
# merge, lowercase, keep names under the domain, drop out-of-scope namescat subs/*.txt | tr '[:upper:]' '[:lower:]' \ | grep -E "(^|\.)${DRE}\$" | sort -u \ | grep -vxFf "$OOS" > subs/passive.txt || truelog "passive names: $(wc -l < subs/passive.txt)"
# record new names in the long-lived master list and keep a copy of what was newanew "$BASE/subs/all.txt" < subs/passive.txt > subs/new.txt || truelog "new since last run: $(wc -l < subs/new.txt)"
# ---------- phase 4: resolution ----------log "resolving"dnsx -l subs/passive.txt -a -cname -resp -json -r "$RESOLVERS" -silent > dns/dnsx.json || truejq -r '.host' dns/dnsx.json | sort -u > dns/resolved.txtjq -r '.a[]?' dns/dnsx.json | sort -u > dns/ips.txtlog "resolved: $(wc -l < dns/resolved.txt)"
# ---------- phase 6: HTTP probing ----------log "probing HTTP"httpx -l dns/resolved.txt -sc -title -td -server -cl -ip -cdn -fr \ -rl "$RATE" -t "$THREADS" -json -silent > http/httpx.json || truejq -r '.url' http/httpx.json | sort -u > http/live.txtlog "live web hosts: $(wc -l < http/live.txt)"
# human-readable summary sorted by status codejq -r '[.status_code, .content_length, (.title // "-"), ((.tech // []) | join(",")), .url] | @tsv' \ http/httpx.json | sort -k1,1n > http/summary.tsv
# ---------- phase 8: URL collection ----------log "collecting archived URLs"echo "$DOMAIN" | gau --subs --threads 5 \ --blacklist png,jpg,jpeg,gif,svg,ico,woff,woff2,ttf,css > urls/gau.txt || true
log "crawling live hosts (depth 2)"katana -list http/live.txt -d 2 -jc -rl "$RATE" -c "$THREADS" -silent > urls/katana.txt || true
cat urls/gau.txt urls/katana.txt \ | grep -Ei "^https?://([a-z0-9-]+\.)*${DRE}(:[0-9]+)?(/|\$)" \ | sort -u > urls/raw.txt || trueuro -i urls/raw.txt -o urls/clean.txt || touch urls/clean.txtgrep '?' urls/clean.txt > urls/with-params.txt || truegrep -Ei '\.js(\?|$)' urls/clean.txt > urls/js.txt || truelog "unique URLs: $(wc -l < urls/clean.txt)"
# ---------- phase 13: filtered Nuclei pass ----------# medium and above, common finding classes, no DoS or fuzzing templateslog "nuclei (filtered)"nuclei -l http/live.txt -tags exposure,misconfig,panel,takeover \ -s medium,high,critical -etags dos,fuzz \ -rl "$RATE" -c "$THREADS" -silent -jsonl -o vulns/nuclei.jsonl || truejq -r '[.info.severity, .["template-id"], .["matched-at"]] | @tsv' \ vulns/nuclei.jsonl 2>/dev/null | sort -u > vulns/summary.tsv || true
# ---------- wrap up ----------ln -sfn "$RUN" "$BASE/runs/latest"log "done. start with: $RUN/http/summary.tsv and $RUN/subs/new.txt"The script is under 150 lines and every block has a comment. Rate limits sit at the top so you can match each program’s rules in one place.
One VPS and this script are enough for a single domain, and you can read every stage. Axiom is the step up when the job is many large ranges and you already know the exact command. It bills per VM per hour. The original Axiom repo is quiet, so check for a maintained fork before you build a fleet around it.
What a run file proves
Section titled “What a run file proves”http/summary.tsv
Section titled “http/summary.tsv”403 152 Forbidden Apache/2.4.52 https://admin-preview.example.com200 4821 Login - Staging Express,React https://auth-dev.example.comThis record asserts httpx completed a GET to https://admin-preview.example.com and received 403 with a 152 byte body.
This record does not assert the application is locked. A 403 on / often still has routes under it.
subs/new.txt
Section titled “subs/new.txt”k8s-ingress-test.example.comThis record asserts the name showed up in this passive pass and was absent from earlier runs.
This record does not assert the host will still be there tomorrow. A test ingress is often created for a short job and removed the same day.
Convincing duds
Section titled “Convincing duds”Reading the output
Section titled “Reading the output”| File | What it tells you |
|---|---|
subs/new.txt |
Names that were not in any earlier run. Read this first. |
http/summary.tsv |
Every live host with status, size, title and tech, sorted by status |
urls/with-params.txt |
URLs with query strings, input for phase 10 |
urls/js.txt |
JavaScript files, input for phase 9 |
vulns/summary.tsv |
Filtered Nuclei hits. Verify each one by hand |
runs/latest |
A link to the newest run, so scripts and notes can point at a stable path |
Picking the top 10 targets
Section titled “Picking the top 10 targets”You will not test 600 hosts. Pick ten, and spend real time on each. Score hosts against this list and take the highest.
-
New. Anything in
subs/new.txtthat is live gets a point, two if it appeared this week. -
Non-production. Names or titles with
dev,staging,uat,test,beta,preview,internal. -
Interesting title or tech. Admin panels, dashboards, Swagger UI, GraphQL, Jenkins, Grafana, Kibana, anything self-hosted from phase 12’s signal list.
-
Odd status. A 401 or 403 at the root, or a 500 with an error page, suggests something worth poking.
-
Not behind the CDN. Hosts where httpx shows no CDN get a point. Less filtering, often less hardening.
-
Lots of parameters. Hosts that own many lines in
urls/with-params.txthave more input to test. -
Unique look. A host whose title and size match nothing else on the target. Clones of the marketing site score zero.
-
Nuclei hit. Any verified finding, even a low one, says the deployment was careless.
# Quick view: non-200 and non-CDN hosts with their titlesawk -F'\t' '$1 != 200' http/summary.tsv | head -50# Hosts that own the most parameterised URLsawk -F/ '{print $3}' urls/with-params.txt | sort | uniq -c | sort -rn | head -20Write your ten in notes.md with one line each on why. Then open the first one in your browser, with Burp or Caido running, and start reading the app.
A notes.md template
Section titled “A notes.md template”The script writes files; notes.md is where you write. Keep one per target, at ~/recon/example.com/notes.md, so a run you come back to in a month still makes sense. A format that works:
# example.com
Program: <platform link> · Scope: scope/roots.txt · Rate: 20 req/sStarted: 2026-11-14
## Top 10 targets| Host | Why it scored | Status ||---|---|---|| auth-dev.example.com | staging login, Express+React, no CDN | testing || admin-preview.example.com | 403 at root, Apache | queued |
## Findings in progress- auth-dev: password reset leaks token in response. Confirming impact.
## Dead ends- backup.example.com/backup.sql is the SPA shell, not a dump.
## Questions for the program- Is the acquired acme.example.com in scope? Asked 2026-11-14.The dead-ends list is the part people skip and regret. It stops you re-testing the same convincing dud next week.
Resuming an interrupted run
Section titled “Resuming an interrupted run”A long run dies: the SSH session drops, the VPS reboots, an API quota trips. Rerunning from the top repeats hours of work and resends traffic you already sent. A per-phase completion marker fixes that. Wrap each phase so it touches a .done file when it finishes, and skips if the file is already there.
# Add near the top of recon.sh, after the run folder is createddone_marker() { [[ -f "$RUN/.done-$1" ]]; } # true if phase already finishedmark_done() { touch "$RUN/.done-$1"; } # record a phase as finished# Then guard each phase block, for example resolution:if ! done_marker resolve; then log "resolving" dnsx -l subs/passive.txt -a -cname -resp -json -r "$RESOLVERS" -silent > dns/dnsx.json || true # ... rest of the resolution block ... mark_done resolvefiBecause the run folder is dated and runs/latest points at it, rerunning recon.sh example.com the same day reuses the same $RUN and skips every phase that already wrote its marker. To force a clean rerun, delete the markers with rm "$RUN"/.done-*.
Data retention
Section titled “Data retention”Run folders grow fast, and old ones hold hostnames and sometimes response bodies for systems you were authorised to test on a given date. Keep them tidy and do not hoard them.
- Keep
subs/all.txtandnotes.mdfor as long as you work the program. They are the memory that makes each run incremental. - Keep the last few dated run folders. Delete older ones once their findings are in
notes.mdor a report. - Delete downloaded response bodies, screenshots and
.gitdumps once a finding is written up. They are the data you were asked to take the least of. - When you leave a program for good, delete the target folder. There is no reason to keep another company’s attack surface on your disk.
# Keep the five newest run folders, remove the restls -1dt ~/recon/example.com/runs/20* | tail -n +6 | xargs -r rm -rfNext, catch new assets as they appear with Continuous monitoring.
Open local graph around this page
Linked from here
Links out to
Recon AtlasFor authorized testing only. Your scope is the map edge.