A BBOT-powered toolkit for external penetration testing — from "the client gave me a few domains" to a triaged, client-ready findings report. It discovers the full external attack surface, verifies scope against your authorization and the cloud providers' ranges, runs a scoped active scan, and hands off clean lists to triage, to other scanners (Nessus, nmap), and to the client.
Authorization first. These tools find and actively test internet-facing assets. Only run them against systems you are explicitly authorized to test. Discovery is not authorization — anything new goes to the client for sign-off before you scan it.
| Tool | Language | What it does |
|---|---|---|
recon.sh |
bash | The orchestrator. Runs the whole pipeline end to end. |
landlord.py |
python | Resolves hostnames and classifies each IP as in-scope, cloud (Azure/AWS/GCP), out of scope, or unresolved. Writes a client Excel report. |
bscope.py |
python | Local web dashboard for triaging BBOT findings (severity, status, notes), plus an assets view and a screenshot gallery. |
report.py |
python | Turns the findings you triaged in bscope into a client-ready HTML or Markdown report. |
domains ─▶ 1. DISCOVER ─▶ 2. VERIFY SCOPE ─▶ 3. ACTIVE SCAN ─▶ 4. TRIAGE ─▶ 5. REPORT
(BBOT, (landlord.py) (BBOT, scoped) (bscope.py) (report.py)
passive) │ ▲
└── in-scope only ──┘
- Discover — BBOT enumerates subdomains passively from the seed domains. Touches nothing.
- Verify scope —
landlord.pyresolves everything and sorts each host. Produces the client scope report and the "out of scope, please confirm" list. - Active scan — BBOT runs a loud scan (web, nuclei, ports, screenshots) only against hosts confirmed in scope, plus any in-scope IPs that have no hostname. Scope is enforced twice: by
landlord.py's classification and by BBOT's--strict-scope. - Triage —
bscope.pyserves a dashboard to mark findings confirmed / false positive / reported, with notes. - Report —
report.pyexports the triaged findings as a client report.
- BBOT 3.x —
pipx install bbot. Add API keys to~/.config/bbot/secrets.ymlfor far better discovery;free_secrets.example.ymllists the free ones (see API keys below). - Python 3.7+ and, for
landlord.py:pip install -r requirements.txt # netaddr, requests, openpyxl - jq —
recon.shuses it to parse BBOT output. bscope.pyandreport.pyare standard-library only.
git clone https://github.com/TonyDAtigerr/Landlord.git
cd Landlord
pip install -r requirements.txt
chmod +x recon.sh landlord.py bscope.py report.pyKeep all the scripts in one folder; recon.sh finds the others on your PATH
or beside itself.
BBOT works with no keys at all, but discovery quality scales with how many free API keys it has — the passive phase pulls from every service you give it a key for. Set these up once, before your first engagement, and every run benefits.
Add keys under modules: in ~/.config/bbot/secrets.yml. If that file does
not exist, run bbot --reset-secrets to generate a fresh one, then edit it:
modules:
virustotal:
api_key: 'KEY'
chaos:
api_key: 'KEY'
otx:
api_key: 'KEY'
github_codesearch:
api_key: 'KEY' # the same token also serves github_usersearch and github_org
# ... securitytrails, censys, leakix, bevigil, fullhunt, builtwith,
# hunterio, postman, certspotter, shodan_dnsFree keys worth getting (each requires a free account):
| Service | Sign up | Notes |
|---|---|---|
| VirusTotal | https://www.virustotal.com/ | Free public API |
| ProjectDiscovery Chaos | https://chaos.projectdiscovery.io/ | Free key |
| AlienVault OTX | https://otx.alienvault.com/ | Free key |
| GitHub | https://github.com/settings/tokens | A classic token with no permissions checked. One token covers github_codesearch, github_usersearch, and github_org. |
| SecurityTrails | https://securitytrails.com/ | Free tier |
| Censys | https://search.censys.io/ | Free tier |
| LeakIX | https://leakix.net/ | Free key |
| BeVigil | https://bevigil.com/osint-api | Free tier |
| FullHunt | https://fullhunt.io/ | Free tier |
| BuiltWith | https://api.builtwith.com/ | Free tier |
| Hunter.io | https://hunter.io/ | Free tier |
| Postman | https://www.postman.com/ | Free account key |
| Certspotter (SSLMate CT Search API) | https://sslmate.com/ct_search_api/ | Free tier |
| Shodan | https://account.shodan.io/ | Free account key. Bonus: Shodan occasionally runs a one-time-fee lifetime Membership sale (historically around Black Friday and other holidays) — well worth grabbing if you see it. |
Currently unavailable (as of October 2026) — skip these, BBOT will simply not use the module:
- BufferOverrun (
bufferoverrunmodule) — the signup page returns "Too many API Keys defined for this account. Limit is 10000", which is BufferOverrun hitting its own provider's cap. No new keys are being issued. - SubdomainRadar (
subdomainradarmodule) — the site shows "This service is paused" and is not accepting scans, API requests, or new signups while it changes ownership.
secrets.ymlholds credentials —chmod 600it and keep it out of version control. It's in.gitignorehere already.
# 1. Prepare two files
# scope_ips.txt : authorized IPs, CIDRs or a-b ranges (one per line)
# domains.txt : the client's root domains (one per line)
# 2. Run the whole pipeline
./recon.sh -s scope_ips.txt -d domains.txt -c "Client Name" -a "Your Company"
# 3. Triage in the dashboard it launches (http://127.0.0.1:7373),
# marking real issues Confirmed / Reported.
# 4. Generate the client report from your triage
python3 report.py 03_active/active/output.json \
--client "Client Name" --assessor "Your Company" -o client_report.htmlrecon.sh pauses once, before the active scan, and shows how many hosts it will
touch. Use --passive-only to stop after the scope report, or -y to skip the
pause.
Only have a list of IPs? Run recon.sh with the scope file and no -d.
It does the seed prep described in
Starting from IP addresses only (step 0 of Finding the client's root domains), then
stops so you can review the domains before running the pipeline:
./recon.sh -s external_scope.txt # step 0: IPs -> hostnames -> domains
# review domains.txt, affiliate_root_domains.txt and crtsh_candidates.txt, then:
./recon.sh -s external_scope.txt -d domains.txtRun recon.sh from your engagement folder. Everything it writes lands there
(or in the -o folder). ./recon.sh -h prints the built-in help.
When you start a run with seed domains on a terminal, recon.sh asks which
mode to use: 1) passive only, 2) passive + active (default), or
3) active only. The --passive-only / --active-only flags skip that
question, and so does -y, which picks the full pipeline.
You have IPs and domains (the normal case). This runs the full pipeline: discover, scope-check, active scan, then the triage dashboard.
./recon.sh -s scope_ips.txt -d domains.txtYou have IPs but no domains. Leave out -d. Seed prep finds the hostnames
on your IPs, works out their root domains, expands them through azmap and
crt.sh, and stops without scanning anything. Review domains.txt and the
two candidate files, then run the command it prints:
./recon.sh -s scope_ips.txt # step 0: IPs -> domains, then stop
./recon.sh -s scope_ips.txt -d domains.txt # full pipeline with the reviewed listYou have domains but no IPs. The scope file is required, but it can also
list hostnames: each one is resolved and the IPs it points at become your
scope. Start passive. Everything discovered on other IPs goes into
out_of_scope_for_client.xlsx, so the client can confirm which ones are
theirs and that you're allowed to test them:
./recon.sh -s domains.txt -d domains.txt --passive-onlyOnce the client has confirmed, put the approved IPs in a scope file and run the full pipeline. If a domain sits behind a CDN (Cloudflare, Akamai...), its scope entry resolves to the CDN's shared IPs. Don't scan actively off a scope like that.
You have one or two domains and don't want a file. -d takes literal
domains and can be repeated. You can mix files and domains:
./recon.sh -s scope_ips.txt -d example.com -d example.net
./recon.sh -s scope_ips.txt -d domains.txt -d late-addition.com# Passive only: discovery + scope report. Never touches the client.
./recon.sh -s scope_ips.txt -d domains.txt --passive-only
# Active only: skip discovery and the scope check, and scan the seeds + scope
# directly (still confined by --strict-scope). Use it when scope is already settled.
./recon.sh -s scope_ips.txt -d domains.txt --active-only
# Deep: adds cloud-bucket, code-leak and email enumeration, spidering,
# directory brute-force, parameter mining and light fuzzing. Loud and intrusive.
./recon.sh -s scope_ips.txt -d domains.txt --deep
# Your own active scan: replace the BBOT presets and/or modules outright
./recon.sh -s scope_ips.txt -d domains.txt \
--active-preset "web nuclei-budget web-screenshots" --active-modules "portscan"
# Turn off the quieter/faster tuning (WAF avoidance, bounded spider, etc.)
./recon.sh -s scope_ips.txt -d domains.txt --no-config-tuning
# Slow down DNS brute-forcing (default 500 queries/sec)
./recon.sh -s scope_ips.txt -d domains.txt --dns-qps 100# Client and company names on the Excel scope report
./recon.sh -s scope_ips.txt -d domains.txt -c "Acme Corp" -a "Our Company"
# Write everything to a folder instead of the current directory
./recon.sh -s scope_ips.txt -d domains.txt -o acme_external
# Also classify Google Cloud ranges (Azure and AWS are always checked)
./recon.sh -s scope_ips.txt -d domains.txt --gcp
# Don't launch bscope at the end; it prints the command to run it later
./recon.sh -s scope_ips.txt -d domains.txt --no-serve
# Run bscope on another port (default 7373)
./recon.sh -s scope_ips.txt -d domains.txt --bscope-port 8080
# Unattended (tmux, cron, a VPS): no mode question and no pause before the
# active scan. Only use it once you trust the scope file.
./recon.sh -s scope_ips.txt -d domains.txt -yA typical external test that starts from an IP list only:
mkdir acme && cd acme
cp ~/Downloads/acme_scope.txt scope.txt
../Landlord/recon.sh -s scope.txt # 1. IPs -> draft domains
vim domains.txt affiliate_root_domains.txt crtsh_candidates.txt # 2. review
../Landlord/recon.sh -s scope.txt -d domains.txt \
--passive-only -c "Acme Corp" -a "Our Company" # 3. passive + scope report
# 4. send out_of_scope_for_client.xlsx to the client; add any IPs they approve to scope.txt
../Landlord/recon.sh -s scope.txt -d domains.txt --active-only -c "Acme Corp" -a "Our Company" # 5. scan + triage
python3 ../Landlord/report.py 03_active/active/output.json \
--client "Acme Corp" --assessor "Our Company" -o client_report.html # 6. reportEverything starts from domains.txt. These become BBOT's seeds, so accuracy
beats size — a wrong domain pulls unrelated infrastructure into the scan. Work
the sources in this order, best first:
0. Starting from IP addresses only. If the client gave you only IPs, run
recon.sh with the scope file and no -d:
./recon.sh -s external_scope.txtIt finds every hostname tied to those IPs, works out their root domains,
expands those through azmap and crt.sh (steps 2 and 3 below), and writes the
results to the current directory (or the -o folder). Then it stops, without scanning
anything. Every hostname and IP it finds is labelled one of two ways:
- in-scope: inside your scope file. That's one of your IPs, or a hostname that resolves to one. These are your targets.
- affiliate: related to a target but outside scope. BBOT found it through an in-scope IP, for example a name on that IP's certificate, but it resolves somewhere else: a CDN, cloud host, SaaS, or the client's own infrastructure that isn't in your scope. Affiliate hostnames are good leads for the domain list. Affiliate IPs must not be tested without the client's sign-off.
Review three files, then run the pipeline with the reviewed list:
domains.txt: in-scope root domains plus M365 tenant domains. Remove anything that isn't the client.affiliate_root_domains.txt: root domains of the affiliate hostnames. These are often the client's own domains hosted elsewhere, mixed in with CDN and cloud names. Add the client's todomains.txt.crtsh_candidates.txt: root domains on shared certificates. Add the keepers the same way.
./recon.sh -s external_scope.txt -d domains.txtrecon.sh prints the exact commands at the end of the run. To see what it
does step by step, read
Seed prep: starting from IPs only under
Under the hood.
1. Ask the client at kickoff. Anything they hand you is authoritative; start there.
2. Microsoft 365 tenant domains. For each domain you already know, list the
others registered in the same tenant. This appends every tenant domain to
domains.txt, lowercased, sorted and deduplicated:
curl -s "https://azmap.dev/api/tenant?domain=example.com&extract=true" \
| jq -r '.related_domains[]?' | tr 'A-Z' 'a-z' >> domains.txt \
&& sort -u -o domains.txt domains.txt && cat domains.txtAlready have a few confirmed domains in domains.txt? Expand all of them in
one go (the loop reads the file once before it starts appending):
for d in $(grep -v '^#' domains.txt); do
curl -s "https://azmap.dev/api/tenant?domain=$d&extract=true" | jq -r '.related_domains[]?'
done | tr 'A-Z' 'a-z' >> domains.txt && sort -u -o domains.txt domains.txt && cat domains.txt3. Shared certificates. Root domains that show up on certificates alongside a
known one. Certificates often carry CDN, hosting and certificate-provider names
too, so this one goes through a review file first instead of straight into
domains.txt. Step one writes the candidates, most common first:
curl -s "https://crt.sh/?q=example.com&output=json" | jq -r '.[].name_value' \
| tr 'A-Z' 'a-z' | sed 's/^\*\.//' | grep -E '^[a-z0-9.-]+$' \
| awk -F. 'NF >= 2 {print $(NF-1) "." $NF}' \
| sort | uniq -c | sort -rn | tee crtsh_candidates.txtDelete the lines you don't want from crtsh_candidates.txt (CDNs, cert
providers, anything that isn't the client), then step two appends the keepers
to domains.txt, deduplicated:
awk '{print $2}' crtsh_candidates.txt >> domains.txt \
&& sort -u -o domains.txt domains.txt && cat domains.txtDomains under a two-part public suffix (
client.co.uk,client.com.au) come out as the bare suffix (co.uk). Add those by hand.
4. Reverse WHOIS by registrant email. Every domain registered with the same
address (needs a Whoxy API key in $WHOXY_KEY). Whoxy pages its results, so
this walks every page and appends the domains to domains.txt, lowercased,
sorted and deduplicated:
Q="https://api.whoxy.com/?key=$WHOXY_KEY&reverse=whois&email=domains@example.com"
for page in $(seq 1 "$(curl -s "$Q&page=1" | jq -r '.total_pages // 1')"); do
curl -s "$Q&page=$page" | jq -r '.search_result[]?.domain_name'
done | tr 'A-Z' 'a-z' >> domains.txt && sort -u -o domains.txt domains.txt && cat domains.txt5. The client's own websites. Footers, "our brands" pages, and privacy policies often list sister domains.
Verify before adding. For anything that didn't come straight from the client,
look for at least two signs it's really theirs: shared name servers
(dig +short NS <domain>), shared mail (dig +short MX <domain>), it resolves
into their IP ranges, or it shares a certificate with a known domain. A large
corporate group can own domains that belong to separate businesses with their
own contracts, so when coverage is unclear, confirm with the client first.
Put the confirmed domains in domains.txt (one per line) and your authorized IP
ranges in scope_ips.txt (IPs, CIDRs, or a-b ranges, one per line). Then run
the pipeline as shown above.
Run ./recon.sh -h for the built-in help. Full flag list:
| Flag | Argument | What it does |
|---|---|---|
-s |
FILE | Required. Authorized scope: IPs, CIDRs, or a-b ranges, one per line. Used as both the landlord scope and BBOT's scope. |
-d |
FILE or DOMAIN | Repeatable. Seed domains: a file (one per line) or a literal domain. Mix files and domains freely. Leave it out to run seed prep (step 0: IPs → hostnames → domains via BBOT, azmap and crt.sh), which stops before the pipeline. |
-o |
DIR | Output directory (default: the current directory). |
-c |
"Name" | Client name shown on the reports. |
-a |
"Name" | Assessor / your company name shown on the reports. |
--gcp |
Also classify Google Cloud ranges in the scope report. | |
--passive-only |
Stop after discovery and the scope report. No active scan. | |
--active-only |
Skip discovery and the scope check; actively scan the seeds + scope file directly, still confined by --strict-scope. With neither mode flag, an interactive run asks you to pick passive / both / active. |
|
--deep |
Kitchen-sink active scan (see Tuning the active scan below). Loud and intrusive; authorized engagements only. | |
--active-preset |
"P ..." | Override the active-scan BBOT presets entirely. |
--active-modules |
"M ..." | Override the active-scan BBOT modules entirely. |
--no-config-tuning |
Don't apply the quieter/faster active-scan config (WAF avoidance, bounded spider, etc.). | |
--dns-qps |
N | DNS queries/sec for brute forcing (default: 500). |
--no-serve |
Do everything but don't launch the bscope dashboard; prints the command to launch it yourself. | |
--bscope-port |
N | Port for the bscope dashboard (default: 7373). |
-y |
Non-interactive: skip the pause before the active scan. | |
-h |
Show help. |
Each run writes to the current directory by default, so run it from your engagement folder (or pass -o DIR). Paths in the console output are printed relative to where you ran it, so you can copy them straight into the next command:
For the client
scope_report.xlsx— full classification report with chartsout_of_scope_for_client.xlsx— assets outside scope, with columns for the client to confirm ownership / authorize testingout_of_scope_ips.txt— the bare out-of-scope IPs
For your scanners
active_targets.txt— one entry per in-scope host, deduplicated: the hostname if it has one, otherwise the bare IP (no overlap — an IP a hostname already resolves to is not repeated). This is the list the active scan uses, and the list to paste into Nessus / nmap.inscope_ips.txt— every in-scope IP (with and without a hostname)inscope_hostnames.txt— confirmed in-scope hostnamesinscope_ips_no_hostname.txt— in-scope IPs no hostname points at (subset of the above)open_ports.txt— open ports BBOT confirmed, ashost:port
Seed prep (only when run without -d)
hostnames_ips.txt: raw BBOT output (TYPE,SCOPE,DATA, tab-separated)seed_inscope_hostnames.txt,seed_inscope_ips.txt: hostnames and IPs inside the scope fileaffiliate_hostnames.txt: related hostnames outside scope. These are leads, not targets.affiliate_ips.txt: related IPs outside scope. Don't test them without client sign-off.root_domains.txt,azmap_domains.txt: in-scope root domains, plus M365 tenant domainsaffiliate_root_domains.txt: root domains of the affiliate hostnames. Review it before using any of them.crtsh_candidates.txt: root domains on shared certificates, with counts. Review it before using any of them.domains.txt: the draft seed list (root + tenant domains). Review it, then pass it with-d. If adomains.txtalready exists, it is kept asdomains.txt.bak.
Raw / intermediate
01_passive/,03_active/— raw BBOT output (NDJSON + CSV)all_hostnames.txt,scope_check.json— intermediate data
Each tool works standalone; recon.sh just chains them.
# Scope-check an existing hostname list
landlord.py hostnames.txt scope.txt --xlsx report.xlsx --client "Client"
# Triage any BBOT output
bscope.py path/to/output.json --shots path/to/screenshots
# Report from a triaged scan
report.py path/to/output.json --client "Client" --format htmlreport.py reads the triage file bscope saves (<output>.bscope.json). By
default it includes only confirmed, reviewed, and reported findings,
so "new" noise never reaches the client. Override with --include confirmed,reported or --all (everything except new).
recon.sh runs the commands below, in this order. This section shows each one
and a manual way to get the same result without the kit, using BBOT, jq,
dig, curl, grepcidr
(apt install grepcidr) and a few lines of stdlib Python. It's useful for
checking what the tools do, for debugging a run, or for running one stage by
itself.
The examples assume your two input files, scope_ips.txt and domains.txt,
and that you're working in your engagement folder, which is also the output
folder:
OUT=.This step runs only when recon.sh is started without -d. It builds
domains.txt from the scope IPs, then the script stops for your review.
Find the hostnames and IPs. sslcert reads the certificates the IPs serve,
so it connects to them on TLS ports. The other four modules are passive
lookups.
P="$OUT"
bbot -t scope_ips.txt -m sslcert shodan_idb viewdns rapiddns hackertarget \
--brief --event-types DNS_NAME IP_ADDRESS -y | sort -u > "$P/hostnames_ips.txt"With --brief, each line has three tab-separated fields, TYPE, SCOPE and
DATA. SCOPE is in-scope, affiliate, or sometimes distance-N, which is
treated the same as affiliate:
DNS_NAME in-scope www.example.com
IP_ADDRESS in-scope 203.0.113.5
DNS_NAME affiliate portal.example.net
IP_ADDRESS affiliate 198.51.100.7
Split the file by type and scope:
awk -F'\t' '$1=="DNS_NAME" && $2=="in-scope" {print $3}' "$P/hostnames_ips.txt" > "$P/seed_inscope_hostnames.txt"
awk -F'\t' '$1=="IP_ADDRESS" && $2=="in-scope" {print $3}' "$P/hostnames_ips.txt" > "$P/seed_inscope_ips.txt"
awk -F'\t' '$1=="DNS_NAME" && $2!="in-scope" {print $3}' "$P/hostnames_ips.txt" > "$P/affiliate_hostnames.txt"
awk -F'\t' '$1=="IP_ADDRESS" && $2!="in-scope" {print $3}' "$P/hostnames_ips.txt" > "$P/affiliate_ips.txt"Reduce hostnames to root domains. In-scope roots become the draft
domains.txt. Affiliate roots go to a separate file for review. recon.sh
also keeps names under two-part suffixes whole (client.co.uk), which this
short version doesn't.
sed 's/\.$//; s/^\*\.//' "$P/seed_inscope_hostnames.txt" | tr 'A-Z' 'a-z' \
| awk -F. 'NF >= 2 {print $(NF-1) "." $NF}' | sort -u > "$P/root_domains.txt"
sed 's/\.$//; s/^\*\.//' "$P/affiliate_hostnames.txt" | tr 'A-Z' 'a-z' \
| awk -F. 'NF >= 2 {print $(NF-1) "." $NF}' | sort -u \
| comm -23 - "$P/root_domains.txt" > "$P/affiliate_root_domains.txt"Expand the in-scope roots. These are the azmap and crt.sh commands from
Finding the client's root domains, run
over root_domains.txt:
while read -r d; do
curl -s "https://azmap.dev/api/tenant?domain=$d&extract=true" | jq -r '.related_domains[]?'
done < "$P/root_domains.txt" | tr 'A-Z' 'a-z' | sort -u > "$P/azmap_domains.txt"
sort -u "$P/root_domains.txt" "$P/azmap_domains.txt" | while read -r d; do
curl -s "https://crt.sh/?q=$d&output=json" | jq -r '.[].name_value'
done | tr 'A-Z' 'a-z' | sed 's/^\*\.//' | grep -E '^[a-z0-9.-]+$' \
| awk -F. 'NF >= 2 {print $(NF-1) "." $NF}' | sort | uniq -c | sort -rn > "$P/crtsh_candidates.txt"
sort -u "$P/root_domains.txt" "$P/azmap_domains.txt" > "$P/domains.txt"Review domains.txt, affiliate_root_domains.txt and crtsh_candidates.txt
as described in step 0 of Finding the client's root domains. The reviewed
domains.txt is the input to the steps below.
Clean the seed list. recon.sh merges every -d file and domain into
seeds.txt, then strips comments and whitespace, lowercases it and removes
duplicates:
cat domains.txt | sed 's/#.*//; s/[[:space:]]//g' | tr 'A-Z' 'a-z' \
| awk 'NF && !seen[$0]++' > "$OUT/seeds.txt"Expand the scope to single IPs. Later steps need to know which in-scope
IPs no hostname points at, so every CIDR and a-b range is expanded to its
individual host addresses. Entries larger than a /16 (65,536 addresses) are
skipped because you can't list them one host at a time; for those, hostname
discovery is the only way in.
python3 - scope_ips.txt > "$OUT/scope_all_ips.txt" <<'PY'
import sys, ipaddress
for line in open(sys.argv[1]):
line = line.split("#", 1)[0].strip()
if not line: continue
if "-" in line and "/" not in line:
a, b = (ipaddress.ip_address(x.strip()) for x in line.split("-", 1))
nets = list(ipaddress.summarize_address_range(a, b))
else:
nets = [ipaddress.ip_network(line, strict=False)]
if sum(n.num_addresses for n in nets) > 65536: continue
for n in nets:
print(*([n.network_address] if n.num_addresses == 1 else n.hosts()), sep="\n")
PYThis is the same BBOT command recon.sh runs. The scope file is the target
(-t) and the domains are the seeds (-s). -rf passive limits BBOT to
passive modules, so it never sends traffic to the client. -em viewdns turns
off a noisy reverse-WHOIS module.
bbot -t scope_ips.txt -s "$OUT/seeds.txt" \
-p subdomain-enum -rf passive -em viewdns \
-c dns.brute_threads=500 \
-n passive -o "$OUT/01_passive" -yBBOT writes 01_passive/passive/output.json with one JSON event per line.
Pull out every hostname it found, lowercased, without trailing dots or
wildcards, and deduplicated:
jq -r 'select(.type=="DNS_NAME") | .data' "$OUT/01_passive/passive/output.json" \
| tr 'A-Z' 'a-z' | sed 's/\.$//; s/^\*\.//' | awk 'NF && !seen[$0]++' | sort \
> "$OUT/all_hostnames.txt"landlord.py does four things: it downloads the cloud providers' published IP
ranges, resolves every hostname, checks each IP against the ranges in a fixed
order, and writes the results to a report.
2a. Download the cloud ranges. landlord caches these in
~/.cache/landlord/ for 7 days (--refresh ignores the cache). Each command
below writes CIDR label lines, where the label is the provider's
service/region and becomes the "Provider / Service" column in the report.
# AWS
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json \
| jq -r '(.prefixes[] | "\(.ip_prefix) \(.service)/\(.region)"),
(.ipv6_prefixes[] | "\(.ipv6_prefix) \(.service)/\(.region)")' > aws_ranges.txt
# Azure Public. Microsoft has no fixed URL for this file, so take the
# current link from the download page. (For Azure Government use id=57063
# and ServiceTags_AzureGovernment.)
AZ=$(curl -sA 'Mozilla/5.0' 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519' \
| grep -oE 'https://download\.microsoft\.com/download/[^"'\'']+/ServiceTags_Public_[0-9]{8}\.json' | head -1)
curl -s "$AZ" | jq -r '.values[]
| (if (.properties.systemService // "") == "" then .name else .properties.systemService end) as $s
| .properties.region as $r | .properties.addressPrefixes[]
| if ($r // "") == "" then "\(.) \($s)" else "\(.) \($s)/\($r)" end' > azure_ranges.txt
# Google Cloud (only with --gcp)
curl -s https://www.gstatic.com/ipranges/cloud.json \
| jq -r '.prefixes[] | "\(.ipv4Prefix // .ipv6Prefix) \(.service)/\(.scope)"' > gcp_ranges.txt
# Plain CIDR lists for grepcidr
for p in aws azure gcp; do cut -d' ' -f1 ${p}_ranges.txt > $p.cidrs; done
sed 's/#.*//; s/[[:space:]]//g' scope_ips.txt | awk NF > scope.cidrslandlord also accepts hostnames in the scope file and resolves them to IPs. If yours has any, replace each one in
scope.cidrswith the output ofdig +short A <name>anddig +short AAAA <name>.
2b. Resolve every hostname. landlord collects every A and AAAA address
(following CNAMEs) and records hosts that don't resolve. It writes one
ip hostname pair per line:
: > unresolved.txt
while read -r h; do
ips=$( { dig +short A "$h"; dig +short AAAA "$h"; } | grep -E '^[0-9.]+$|:' | sort -u)
if [ -z "$ips" ]; then echo "$h" >> unresolved.txt
else for ip in $ips; do echo "$ip $h"; done; fi
done < "$OUT/all_hostnames.txt" > resolved.txt(landlord runs 20 lookups at once. This loop runs them one at a time, which is slower but gives the same result.)
2c. Classify. Each IP goes into the first list that contains it: scope, then Azure, then AWS, then GCP. That order means anything in your agreed scope counts as in scope even if it's also in a cloud range. Anything left over is out of scope:
cp resolved.txt remaining.txt
for p in scope azure aws gcp; do
[ -f $p.cidrs ] || continue
grepcidr -f $p.cidrs remaining.txt > class_$p.txt
grepcidr -v -f $p.cidrs remaining.txt > rest.tmp; mv rest.tmp remaining.txt
done
mv remaining.txt class_out.txt
wc -l class_*.txt unresolved.txtTo fill in the Provider / Service column for a cloud list, look up which range each IP falls in:
python3 - aws_ranges.txt class_aws.txt <<'PY'
import sys, ipaddress
nets = [(ipaddress.ip_network(c, strict=False), l.strip())
for c, l in (x.split(None, 1) for x in open(sys.argv[1]) if x.strip())]
for line in open(sys.argv[2]):
ip, host = line.split()
a = ipaddress.ip_address(ip)
print(host, ip, next((l for n, l in nets if a in n), "?"), sep="\t")
PY2d. Build the report. scope_report.xlsx contains these lists formatted as
sheets:
- Hosts: hostname, IP, IPv4/IPv6, classification and In Scope verdict. The verdict is Yes for scope, No for out, Review (cloud) for any cloud provider, and Unresolved.
- Summary: a count for each classification, with a pie chart.
- Cloud Services: hosts grouped by the provider's service.
- Methodology: a legend and the source URLs.
If you're doing it by hand, paste the class_*.txt files into a spreadsheet
with a Classification column. landlord also saves the raw data as
scope_check.json:
{"results": [{"host", "ip", "category", "match"}], "unresolved": [...]}.
These lists come from the classification above. They are what the active scan uses and what you give to other scanners.
cut -d' ' -f2 class_scope.txt | sort -u > "$OUT/inscope_hostnames.txt"
cut -d' ' -f1 class_scope.txt | sort -u > "$OUT/inscope_ips_with_hostname.txt"
# In-scope IPs that no hostname points at. They still get scanned.
comm -23 <(sort -u "$OUT/scope_all_ips.txt") <(sort -u "$OUT/inscope_ips_with_hostname.txt") \
> "$OUT/inscope_ips_no_hostname.txt"
# Out of scope. The client should confirm these. Cloud hosts go in the same
# workbook (out_of_scope_for_client.xlsx), which has "Yours?" and "OK to test?" columns.
cut -d' ' -f1 class_out.txt | sort -u > "$OUT/out_of_scope_ips.txt"
# Active targets: one entry per host, using the hostname when there is one,
# otherwise the bare IP. No overlap.
cat "$OUT/inscope_hostnames.txt" "$OUT/inscope_ips_no_hostname.txt" \
| awk 'NF && !seen[$0]++' > "$OUT/active_targets.txt"
# Every in-scope IP, sorted numerically
cat "$OUT/inscope_ips_with_hostname.txt" "$OUT/inscope_ips_no_hostname.txt" | awk NF \
| sort -u -t. -k1,1n -k2,2n -k3,3n -k4,4n > "$OUT/inscope_ips.txt"--passive-only stops here.
The confirmed targets are passed as both BBOT's target (-t) and its seeds
(-s), and --strict-scope prevents BBOT from expanding to anything outside
that list. subdomain-enum is not run again, because this pass goes deeper on
known hosts rather than looking for new ones. The -c options are the
default tuning: no recursive DNS mutations, WAF avoidance during brute force,
a limited spider, and wayback used only to find URLs.
bbot -t "$OUT/active_targets.txt" -s "$OUT/active_targets.txt" \
-p web-heavy nuclei web-screenshots \
-m portscan fingerprintx baddns \
-c modules.dnsbrute.recursive_mutations=false \
modules.dnscommonsrv.recursive_mutations=false \
modules.webbrute.avoid_wafs=true \
modules.wayback.urls=true modules.wayback.parameters=false modules.wayback.archive=false \
web.spider_distance=2 web.spider_depth=3 web.spider_links_per_page=10 \
--strict-scope \
-n active -o "$OUT/03_active" -y--deepreplaces the presets withweb-heavy nuclei web-screenshots spider webbrute paramminer lightfuzz baddns-heavy cloud-enum code-enum email-enumand the modules withportscan fingerprintx.--no-config-tuningleaves out the entire-cblock.--active-onlyskips steps 1 to 3. The targets becomeseeds.txt+scope_all_ips.txt, deduplicated, and-tis the scope file itself, so--strict-scopelimits the scan to your authorized ranges:bbot -t scope_ips.txt -s active_targets.txt ...
After the scan, collect the open ports BBOT confirmed and find the screenshots:
A="$OUT/03_active/active/output.json"
jq -r 'select(.type=="OPEN_TCP_PORT") | .data' "$A" | sort -u > "$OUT/open_ports.txt"
ls "$OUT/03_active/active/gowitness/screenshots" 2>/dev/null || ls "$OUT/03_active/active/gowitness"bscope reads the same output.json. Here's how to get each tab with jq:
# Findings: the VULNERABILITY and FINDING events, sorted so critical comes first
jq -r 'select(.type=="VULNERABILITY" or .type=="FINDING")
| [(.data.severity // "INFO"), .type, (.data.host // .host // ""), (.data.url // ""),
(.data.description // "")] | @tsv' "$A" \
| awk -F'\t' 'BEGIN{r["CRITICAL"]=1;r["HIGH"]=2;r["MEDIUM"]=3;r["LOW"]=4}
{print (r[toupper($1)]?r[toupper($1)]:5) "\t" $0}' \
| sort -n | cut -f2- > findings.tsv
# Assets
jq -r 'select(.type=="DNS_NAME") | .data' "$A" | sort -u > subdomains.txt
jq -r 'select(.type=="OPEN_TCP_PORT") | .data' "$A" | sort -u > ports.txt
jq -r 'select(.type=="TECHNOLOGY") | "\(.data.host)\t\(.data.technology)"' "$A" | sort -u > tech.tsv
jq -r 'select(.type=="STORAGE_BUCKET") | .data.url' "$A" | sort -u > buckets.txt
# URLs tab: input for feroxbuster, ffuf, or Burp's target scope
jq -r 'select(.type=="URL" or .type=="URL_UNVERIFIED") | .data' "$A" | sort -u > urls.txt
# Emails tab, plus the user-enumeration commands bscope generates
jq -r 'select(.type=="EMAIL_ADDRESS") | .data' "$A" | tr 'A-Z' 'a-z' | sort -u > emails.txt
for d in $(cut -d@ -f2 emails.txt | sort -u); do
echo "o365spray --enum -U emails.txt --domain $d --enum-module oauth2"
doneFor Screenshots, open the gowitness folder in an image viewer.
For Triage, open findings.tsv in a spreadsheet and add Status and Notes
columns. bscope uses these statuses: new, triaging, confirmed, false positive,
not exploitable, reviewed, reported. It saves the same information to
output.json.bscope.json.
For the AttackForge export, you need nuclei's own JSON. BBOT rewrites
nuclei results as text, so bscope rebuilds the JSON from that text. To get the
original JSON, run nuclei yourself against the same targets:
nuclei -l "$OUT/active_targets.txt" -jsonl -o nuclei.jsonl.
report.py uses only the findings you marked confirmed, reviewed or
reported, sorts them by severity and writes HTML or Markdown. To do the
same from your triage spreadsheet, filter on those statuses, sort by severity,
and write each finding up with its host, URL, description and notes. bscope's
generic writeups (Description, Attack Scenario, Remediation) are a good
starting structure for each one.
Discovery quality scales with how many API keys BBOT has, and most of the
services this kit relies on have a free tier. The option names BBOT expects
are in free_secrets.example.yml; the table below
adds a sign-up link for each:
| Service | Sign up | Notes |
|---|---|---|
| VirusTotal | https://www.virustotal.com/ | Free public API |
| ProjectDiscovery Chaos | https://chaos.projectdiscovery.io/ | Free key |
| AlienVault OTX | https://otx.alienvault.com/ | Free key |
| GitHub | https://github.com/settings/tokens | Classic token with no scopes; one token covers github_codesearch, github_usersearch, github_org |
| SecurityTrails | https://securitytrails.com/ | Free tier |
| Censys | https://search.censys.io/ | Free tier |
| LeakIX | https://leakix.net/ | Free key |
| BeVigil | https://bevigil.com/osint-api | Free tier |
| FullHunt | https://fullhunt.io/ | Free tier |
| BuiltWith | https://api.builtwith.com/ | Free tier |
| hunter.io | https://hunter.io/ | Free tier |
| Postman | https://www.postman.com/ | Free account key |
| Trickest | https://trickest.com/ | Free tier |
| Cert Spotter | https://sslmate.com/ct_search_api/ | SSLMate CT Search API, free tier |
| GitLab | https://gitlab.com/-/user_settings/personal_access_tokens | Personal access token (read_api) |
| Shodan | https://account.shodan.io/ | Free account key. Shodan occasionally runs a one-time-fee lifetime Membership sale (historically around holidays) — worth grabbing if you see it. |
Fill in your keys and install the file where BBOT reads it:
cp free_secrets.example.yml ~/.config/bbot/secrets.yml
chmod 600 ~/.config/bbot/secrets.ymlThe values in the template are fakes and will not work until replaced.
Have a paid API key? full_secrets.example.yml
is the same template with every secret option BBOT 3.x knows about: the
free keys above, the paid services (Shodan, DeHashed, BufferOverrun, c99,
IPStack, IP2Location, SubDomainRadar, Trajan tokens, ...), the output-module
credentials (Elastic, Neo4j, Splunk, Slack, Teams, ...), and the global
bbot_io_api_key / interactsh_token. Delete every entry you don't have a
real value for before using it. You can also have BBOT generate its own fully
commented version of that file:
bbot --reset-secrets # regenerates ~/.config/bbot/secrets.yml, backs up the old one to .bakKeys can also be passed on the command line for a one-off run:
bbot -c modules.shodan_dns.api_key=KEY.
secrets.ymlholds credentials.chmod 600it and keep it out of version control. It's in.gitignorehere already; only the*.example.ymltemplates are committed.
Currently unavailable (as of October 2026) — skip these; BBOT will simply not use the module:
- BufferOverrun (
bufferoverrunmodule) — the signup page returns "Too many API Keys defined for this account. Limit is 10000", its provider hitting its own cap. No new keys are being issued. - SubdomainRadar (
subdomainradarmodule) — the site shows "This service is paused" and is not accepting scans, API requests, or new signups while it changes ownership.
The active scan has two built-in profiles, plus full manual control.
Standard (default). Solid coverage without the loudest modules:
presets web-heavy nuclei web-screenshots, modules portscan fingerprintx baddns.
./recon.sh -s scope_ips.txt -d domains.txtDeep (--deep). The kitchen-sink profile. On top of the standard presets it
adds cloud-bucket enumeration, code/secret-leak enumeration, email enumeration,
web spidering, directory brute-force (webbrute), parameter mining
(paramminer), light fuzzing (lightfuzz), and all subdomain-takeover checks
(baddns-heavy). This is loud and intrusive.
./recon.sh -s scope_ips.txt -d domains.txt --deep
--deep,lightfuzz, andwebbruteare intrusive and can trip a WAF or SOC. Only use them when testing at that depth is explicitly authorized.
Manual override. Replace the presets and/or modules outright for either
profile with --active-preset and --active-modules:
# A lighter, quicker pass than the standard profile
./recon.sh -s scope_ips.txt -d domains.txt \
--active-preset "web nuclei-budget web-screenshots" --active-modules "portscan"Near the end of the passive scan you will likely see BBOT sit on one module for a long time:
[INFO] passive: Modules running (incoming:processing:outgoing) certspotter(81:1:0)
[INFO] passive: No events in queue (0 processed in the past 15 seconds)
This is not a hang. With an SSLMate key configured, BBOT's certspotter module
changes behaviour:
- Without a key it makes one request per domain and takes whatever comes back in that single page.
- With a key it pages through the domain's entire certificate history, requesting the next page until Cert Spotter returns nothing. SSLMate throttles authenticated requests by subscription level; BBOT waits out each throttle and carries on.
So the key is working, and it is the reason the module is slow: it is pulling the client's full certificate history rather than a sample. That is the result you want from passive discovery.
The queue number (81 above) is mostly subdomains found by other modules. The
module deduplicates to the highest parent domain, so nearly all of them are
dropped the moment they are picked up. The 1 is a single root domain being
paged through. You are waiting on a handful of lookups, not 81.
Your options, in order of preference:
- Let it finish. Every other module is done by this point, and this is the thorough result.
- Remove the
certspotterkey from~/.config/bbot/secrets.yml. The module drops back to one quick request per domain. Faster, less complete. - Exclude the module by editing the passive scan line in
recon.sh(-em viewdns certspotter). Only sensible if thecrtmodule is working, since that is BBOT's other certificate-transparency source and it fails often because crt.sh times out.
- Keep the authorization paper trail (signed scope / email) in the engagement folder.
- Update nuclei templates before each engagement:
nuclei -update-templates. - Refresh cloud ranges for a formal assessment:
landlord.py ... --refresh(cached ~7 days otherwise). - Mind rate limits / WAFs. The heavy presets are loud and can get your source IP blocked or trip a SOC. Throttle with
--dns-qpsand BBOT's web rate limits if asked. - Retention. Output folders contain the client's full attack surface and findings — treat them as sensitive and dispose of them per your engagement's data-handling terms.
- BBOT 3.x
- Python 3.10+
BBOT's CLI changed significantly in 3.0; this kit assumes 3.x (e.g. --strict-scope, the -t/-s target/seed split).
Released under the MIT License. See LICENSE.
