OSINT has a marketing problem: the label covers everything from reading a certificate log to buying a breach dump, and the second is not open-source anything. In an authorized engagement the useful definition is narrower: information that is already public, or that a third party has published, collected to answer an in-scope question, with a record of where it came from. None of it requires touching the target, and none of it suspends the rules that govern the rest of the test.
This article covers the OSINT layer in dsh-redteam: 39 connectors, explicit lookups plus a passive enrichment pipeline, results normalised into facts on the engagement graph. Counts, gates and file names were checked against the code on 28 November 2026. Claims about a provider or a law carry a link, because "a scanner showed it" is not a source either.
What OSINT is, and what it is not
The distinction that matters is passive versus active. Passive collection reads what someone else already recorded: certificate transparency logs, registration data, scan indexes, web archives. Active collection sends traffic to the target: a port scan, a DNS brute force, an HTTP probe. MITRE ATT&CK draws the same line, separating Search Open Technical Databases (T1596) from Active Scanning (T1595), and the WSTG's information-gathering chapter starts with search-engine reconnaissance before it touches the application. Most connectors are passive; an onion fetch is the exception and is off by default.
"Passive" describes where the traffic goes, not whether the data is sensitive: a certificate name or an indexed banner can still identify a person. Nor is a third-party index the target — Shodan's last scan may be months old and crt.sh may list a hostname retired two years ago. A result is evidence about a provider's corpus at a timestamp: a dated fact, not a conclusion.
OSINT is also not a licence to scrape at scale, bypass a paywall or read breach data. "It was public" answers none of the questions that authorization, data protection and provider terms ask. Collection here is bounded: one service, one query, max 12 facts, a 15-second timeout and a 60-second cache.
The legal frame and the gates
Written authorization comes before the first lookup, not after the first interesting result. The engine refuses OSINT calls until the Rules of Engagement are accepted, and osintAllowlist narrows queries to the domains, IPs and e-mail domains in scope. The allowlist is a filter, not an authorization: adding an asset there does not add it to scope, and exclusions still win. Keyword searches pass, deliberately — a CVE id is not a target.
Personal data is the part practitioners underestimate. Under the GDPR, personal data is any information relating to an identified or identifiable person (Article 4(1)); processing needs a lawful basis (Article 6). Publicly available personal data is still personal data: publicness affects expectations and the lawful basis, not whether the Regulation applies. Article 89's research derogations come with safeguards and are not a general security-testing exemption. The client's documented instruction is the basis you rely on; minimisation is the control you can demonstrate — counts first, identifiers only when needed, raw responses deleted at hand-over. This is not legal advice.
Two paths carry their own gates; the riskiest switches start off.
Breach lookups need written authorization and legal sign-off, then approveLeakLookups: true; after which they return metadata only, capped at 20 per hour. Onion fetching needs enableOnionFetch: true, a loopback Tor proxy and one explicit URL per lookup. Neither is a formality: breach records are personal data, credentials and hashes are never stored, and CSAM, marketplaces, doxxing and credential trading are refused locally.
Breach and leak connectors — HIBP, DeHashed, LeakCheck, Intelligence X, Snusbase, LeakIX and BreachDirectory — return leak-approval-required until the approval flag is set. They emit counts, source names and non-credential field names; addresses are masked and sensitive fields collapse to credential. HIBP's documentation makes the same point from the other side: a 404 does not prove an account was never breached, and breach APIs require attribution under CC BY 4.0.
Dark-web access is narrower. Ahmia is a clearnet index of onion links and never fetches a page. A direct onion fetch needs a local Tor SOCKS proxy on loopback (127.0.0.1:9050 or :9055) and one explicit URL per lookup; a remote proxy is refused with tor-not-loopback and the fetch fails closed. The dark-web budget is 10 per hour. Queries for CSAM, marketplaces, weapons, drugs, hitmen, doxxing and card dumps are rejected with policy-blocked before a request is built — that check is not configurable.
Sensitive lookups are audited to $DSH_HOME/redteam/osint-audit.jsonl (mode 0600) with a salted subject hash, service id, reason and timestamp — not the query. Leak and dark-web responses carry the same hash, so a finding can cite the lookup without repeating the identifier. Only the query leaves the machine; the key, scope and graph stay local. Pwned Passwords receives five characters of a SHA-1, Gravatar a locally computed MD5.
out-of-allowlist, so an operator can tell a scope problem from a provider problem.The catalogue, measured
Measured against the code rather than the prose: OSINT_CATALOG.length is 39 connectors as of 28 November 2026, and the README, docs/TOOLS.md and the tool description now agree with the array. Check it with the command below. The groups are recon (8), exposure (5), threat intelligence (6), vulnerabilities (2), identity (4), breach/leak (9), exploits (1), dark web (3) and reference (1).
| Source class | Representative connectors | Question it answers | Key | Gate |
|---|---|---|---|---|
| Attack surface and registration | crtsh, rdap, securitytrails, urlscan, wayback, github-code |
Which names, hosts and registrations exist, and what did they look like before? | none, optional or key by service | allowlist; provider rate limits |
| Exposure and fingerprinting | shodan, censys, fofa, zoomeye, shodan-internetdb |
What is advertised on this address or host, and with which product and version? | key, except InternetDB | allowlist; plan credits |
| Threat intelligence | virustotal, greynoise, abuseipdb, otx, spamhaus, urlhaus |
Is this address, file or domain known, and for what? | optional for most | provider terms; reputation is not proof |
| Identity | hunter, emailrep, gravatar, sherlock |
Which accounts, addresses and public profiles attach to this person or organisation? | key, optional or none | allowlist; personal data |
| Vulnerability and exploit data | nvd, github-advisories, exploitdb |
Which CVEs, advisories and public exploits apply to this stack? | optional or none | rate limits; local searchsploit |
| Breach and leak | hibp, pwnedpasswords, hibp-domain, dehashed, intelx, snusbase |
Has this identity or domain appeared in a breach, and how much metadata is there? | mostly key | approveLeakLookups, 20/hour, metadata only |
| Dark web | ahmia, tor, onion |
Is there onion-index visibility, and is local Tor reachable? | none | explicit query, 10/hour, onion opt-in, loopback Tor |
A map, not a checklist. RDAP is registry data, crt.sh republishes CT logs; Shodan and Censys are commercial indexes with plan quotas; HIBP knows only breaches it has ingested; Ahmia is partial by design. "No result" means "not in this corpus", not "does not exist".
From a lookup to an enrichment model and a report
pentest_osint answers one question through one connector. 1.3 adds a second layer over the same catalogue: pentest_osint_enrich takes one in-scope target — IP, CIDR, domain or hostname — plus an optional maxHosts and phase, and combines the connectors into a single report-ready model. For an IP or CIDR that means ASN and announced prefix, country/city, ISP/organisation, reverse DNS, observed hostnames, related domains, third-party port observations, CVE ids, reputation signals and the source that returned each value. For a domain it adds A/AAAA, MX, NS, SPF and DMARC, certificate-transparency subdomains, SecurityTrails and urlscan samples, OTX/VirusTotal reputation and RDAP registration dates.
Enrichment is passive in the same sense as the rest of this layer: it never port-scans, never fetches a page and never opens a connection to the target. Ports and hostnames come only from third-party data already collected plus keyless DNS, so “no port” means “not observed in these sources”, not “closed”. Every result carries per-source records with timestamps, a fieldSources map, a heuristic confidence with its basis and an explicit limitations list. A missing key is reported as not-configured; an absent DNS record stays empty. Out-of-scope targets are refused before any request; a CIDR is sampled to 16 addresses by default (256 hard), and IPv6 blocks wider than /120 are refused rather than silently enumerated. Results land in the fact graph and in the OSINT tab.
pentest_osint_report writes the standalone intelligence deliverable in Markdown, HTML or JSON (formats, title, basename). It reads stored facts and enrichment models only: no network, no DNS, no evidence vault. Rows are sorted and timestamps come from the store, so the same state produces the same bytes; every dynamic value is escaped, keys and tokens are scrubbed, and an existing report file is never overwritten. It is deliberately separate from the six engagement report formats — write it beside the engagement report, not instead of it.
The OSINT tab is the read-only board for all of this: one row per IP, CIDR, domain or hostname with its kind, identity fields, reputation, answering sources, timestamp, confidence and the graph nodes it connects to. It starts no lookup; the drawer configures and queries, the tab reads what was collected. The gates do not relax for enrichment: the same RoE acceptance, allowlist, leak approval, budgets and policy refusal apply before any request.
Keys and what never comes back
Four layers, first hit wins: the DSH credential service (ctx.credentials, preferred in the Web GUI), process environment variables, $DSH_HOME/osint-keys.env (mode 0600), then the plugin's keys config. A blank value means absent. Multi-credential services take first:second, so Censys is CENSYS_API_ID:CENSYS_API_SECRET.
Values never come back. describe() returns only whether a key is configured and which layer supplied it; the drawer shows the badge, quota and usage. A required key that is missing returns not-configured naming the variable, rather than guessing or switching sources.
# measure the catalogue yourself — prints 39
node --input-type=module -e \
"import('./lib/host/osint.js').then(m => console.log(m.OSINT_CATALOG.length))"
# fallback key file: 0600, never in shell history
install -m 600 /dev/null "${DSH_HOME:-$HOME/.dsh}/osint-keys.env"
${EDITOR:-vi} "${DSH_HOME:-$HOME/.dsh}/osint-keys.env"
# one KEY=value per line; no export, no interpolation
SHODAN_API_KEY=...
HIBP_API_KEY=...
A key belongs in the credential store or the 0600 env file — never in the query box, an evidence note, a report or a chat message. A key pasted into a query becomes part of the hashed subject and the provider's logs, and rotating it is the only clean fix.
A worked workflow
Five moves: scope, collect, pivot, corroborate, record. The example is a web engagement for example.com. Connector names, arguments and result shape are real; counts and hostnames are illustrative.
Scope. Write the questions first — which hosts are internet-facing, which run vulnerable software, whether a breach exposed credentials. Add the domain and its IPs to osintAllowlist, confirm RoE acceptance, and leave leak and onion switches off unless a question needs them.
Collect. One lookup per question, through the tool so the result becomes graph data:
pentest_osint service="crtsh" query="example.com"
pentest_osint service="team-cymru" query="203.0.113.10"
pentest_osint service="nvd" query="CVE-2021-44228"
pentest_osint service="github-advisories" query="log4j-core"
Each call returns a summary, a data object, up to 12 facts and the ids of its nodes. For crt.sh:
crtsh: example.com (4 facts).
fact[0] Certificate transparency — 412 certificates, 57 unique names
fact[1] Hostnames — vpn.example.com, staging.example.com, …
fact[2] Issuers — Sectigo (390); Let's Encrypt (22)
fact[3] Latest certificate — 2026-11-19
Note what the result does not say. crt.sh counts names, not live hosts; Team Cymru returns an origin AS and prefix, not ownership; NVD returns a CVSS score and CWE, not confirmation the version is running. The lookup records its facts — pentest_add_fact is for the correlation layer: the pivot, the joined sources, the conclusion that needs a date and an asset id. pentest_evidence_add stores the raw response, hashed and write-once; a finding cites both.
Pivot. A CT name becomes a DNS answer, an address, an ASN, an exposure record, then a CVE; keep the asset id on every fact.
Corroborate. Require two independent sources before raising confidence: registry data beats a commercial index, which beats an aggregator, which beats anonymous content. When they disagree, confidence falls.
Record. Write the finding from what the connector returned, with its id, query hash and date — so a report can say crtsh and a date instead of "a scan showed".
Limits and false positives
Every source class has a characteristic failure, and most OSINT mistakes are a failure mode dressed as a finding.
- Certificates are history, not inventory. Wildcards, shared certificates, retired hosts, CDN names and former customers all appear in CT.
- An IP is not an owner. Cloud, shared hosting, NAT and CDNs break the assumption; an origin AS describes routing, not an asset register.
- Fingerprints are claims. A banner or version is what a service said once; it can be stale, proxied or forged, and breach corpora are partial by definition.
- Quotas are part of the method. NVD allows 5 requests per 30 seconds without a key and 50 with one; GitHub's unauthenticated REST budget measured 60 requests per hour and 10 searches per minute; Shodan spends a query credit on a filtered search or DNS domain lookup.
- Provider terms still apply. HIBP's acceptable use forbids harm, circumvention and misrepresenting the client, and requires attribution; Shodan keys are plan-bound. A scraped corpus is not a shortcut around either.
Then there is the fact/inference line. A fact is what a connector returned: "crt.sh listed 57 unique names for example.com on 28 November 2026". An inference is what you concluded: "staging.example.com belongs to the client and is internet-facing". The second sentence needs a second source or an explicit label. The graph stores either; the report must not confuse them.
OPSEC: query minimisation
OPSEC for OSINT is mostly query minimisation. Every lookup is a disclosure to a third party, so the smallest question that answers the need is the right one.
- Use the narrowest identifier. A domain is not an organisation; an address is not a range. Where a connector supports it, send a hash instead of the subject.
- Do not upload target data. No internal hostnames, configurations, banners or customer lists in a query box; the query is the only thing that leaves.
- Spend budgets on falsifiable questions. Twenty leak and ten dark-web lookups per hour are generous for a real question and easy to waste on enumeration.
- Set a private
OSINT_HASH_SALT. The default salt is in the source; with a public salt, a hash of a guessable domain is a dictionary lookup away. A hash is a reference, not anonymisation. - Prefer a canary to a crawl. One out-of-band token proves a server makes outbound requests, with one attributable event instead of a pile of ambiguous collection.
Keep the heavy switches off until a question needs them: for an ordinary web engagement approveLeakLookups and enableOnionFetch stay false, and the most useful connectors are the dullest ones — certificate transparency and registration data.
Key takeaways
- OSINT is public or already-published data used to answer an in-scope question; it is not permission to scrape, touch breach data or skip authorization.
- Passive collection reads someone else's record; active collection touches the target. ATT&CK and the WSTG draw the same line.
- The catalogue measures 39 connectors as of 28 November 2026, and the docs and tool descriptions agree.
- Two gates are closed by default: breach lookups need
approveLeakLookupsplus written approval; onion fetch needsenableOnionFetchplus loopback Tor. - Enrichment is passive and bounded: one in-scope target, third-party and DNS data only, no scan, CIDR samples capped, results stored with per-field provenance and a confidence basis.
- The standalone OSINT report is a separate Markdown/HTML/JSON deliverable built from stored data; it is not one of the six engagement formats.
- A fact is what a connector returned on a date; an inference is your conclusion. Record both, label them, and never let the second wear the first's clothes.
Sources
- dsh-redteam — OSINT services, keys and legal constraints
- dsh-redteam — OSINT catalogue and connectors (OSINT_CATALOG)
- dsh-redteam — credential resolution chain
- dsh-redteam — safety, egress and audit model
- OWASP WSTG — Conduct Search Engine Reconnaissance for Information Leakage
- NIST SP 800-115 — Technical Guide to Information Security Testing and Assessment
- Regulation (EU) 2016/679 (GDPR) — official text
- GDPR Article 4 — definitions of personal data and processing
- MITRE ATT&CK — Reconnaissance, TA0043
- Shodan API documentation — query credits and endpoints
- crt.sh — certificate transparency search (Sectigo)
- Have I Been Pwned API v3 — authorization, k-anonymity, acceptable use
- GitHub REST API — global security advisories
- GitHub REST API — rate limits
- NIST NVD — API start here and rate limits
- Tor Project — community documentation
- Ahmia — onion service search index
- Team Cymru — IP-to-ASN mapping