# Domain and Infrastructure OSINT
> Passive mapping of domains, IPs, certificates, registrations and hosted content to answer two questions: what does an organization expose, and what else does an adversary's infrastructure connect to.
The same pivots serve offense (attack-surface mapping for a pentest or bounty) and defense (clustering phishing kits, sizing a campaign, takedown). Subdomain and asset enumeration proper live in [[Subdomain Enumeration]] and [[Asset Discovery]]; this page is about the pivot graph and the data sources behind it.
## How it works
Every indicator yields a different query path and every lookup exposes new indicators. Typical starting points: a domain, an IP, an email, a URL, or a TLS certificate seen in a scan ([[raw/osintbench.com/domain-and-ip-investigation-with-osint-complete-guide-osintbench-4424|OSINTBench]]). The pivot set:
| Pivot | Source / tool | What it links |
|---|---|---|
| Registrant email, phone, org, NS, registrar | `whois`, DomainTools, SecurityTrails, WhoisXML (incl. **historical** WHOIS) | Other domains by the same registrant; details exposed briefly before privacy kicked in |
| A/AAAA/MX/NS history | SecurityTrails, passive DNS | Co-hosted domains, takeover windows, NS changes |
| Certificate SANs, issuer, serials | crt.sh / Certspotter API / Censys, CT monitors (`gungnir`) | Internal and pre-release hostnames, code names |
| Banners, ports, TLS, JARM | Shodan, Censys, Netlas | Same stack / same cert / same fingerprint across IPs |
| Page content: DOM hash, script paths, favicons, replicated assets, analytics | urlscan.io, VirusTotal, Censys | Kit reuse across phishing domains |
| Registration timing and naming | registrar data, NRD feeds | Scripted batch registrations, sequential names |
## Techniques
**WHOIS and registration.** SecurityTrails (DNS history, historical WHOIS, SurfaceBrowser) is one of Intel 471's top-five pentest/bounty data sources ([[raw/intel471.com/top-5-osint-sources-for-pentesting-and-bug-bounties-intel-471-4422|Intel 471]]). Read registration date (fresh = suspicious), registrar (NameCheap/NameSilo carry a lot of abuse), unprotected registrant email (pivot to more domains), shared name servers, and absence of privacy protection. Historical WHOIS keeps what current WHOIS lost: an email used before privacy was enabled, a company that appeared and vanished, an NS change during a takeover ([[raw/osintbench.com/domain-and-ip-investigation-with-osint-complete-guide-osintbench-4424|OSINTBench]]). Reverse WHOIS by **phone number** or email finds domains registered with the same contact, including subsidiaries and defunct products; one bounty write-up turned a contact-page phone number into an unlinked `internal-*` domain via SecurityTrails reverse WHOIS ([[raw/infosecwriteups.com/phone-numbers-and-emails-to-hidden-subdomains-the-osint-acquisition-pi-9569|OSINT acquisition pipeline]]).
**Email-to-domain graph.** Every corporate email is a domain pointer; harvested addresses (Hunter.io, mail threads) and the email→GitHub user→repos/orgs→code search chain surface acquired-company domains, SaaS tenants (`company.atlassian.net`) and pre-production names that DNS brute force and CT never see ([[raw/infosecwriteups.com/phone-numbers-and-emails-to-hidden-subdomains-the-osint-acquisition-pi-9569|OSINT acquisition pipeline]]).
**Certificate Transparency.** Requesting a public cert publishes the hostname. Certspotter's free API returns every entry for a domain; `gungnir` streams new CT entries in seconds, so a newly issued `finance-internal.*` or code-named product is visible before launch ([[raw/naveensrinivasan.com/finding-hidden-internal-apps-through-public-certificate-logs-11391|Srinivasan]]). Key-free CT tooling such as `ctfr-reloaded` adds resolution, HTTP probing, takeover checks and scoring ([[raw/pypi.org/ctfr-reloaded-certificate-transparency-subdomain-discovery-13747|ctfr-reloaded]]). Also read the live handshake: `curl -v` prints the certificate chain, and `-k` silently hides self-signed, expired, wrong-host and unknown-CA certificates that are themselves findings ([[raw/levelup.gitconnected.com/the-tls-handshake-is-recon-most-pentesters-scroll-past-it-14519|TLS handshake is recon]]).
**Internet-scan engines.** Shodan indexes banners (HTTP headers, SSH params, TLS certs) and supports `org:`, `port:`, `product:`, `http.title:`, `http.html:`, `ssl.cert.subject:`, `has_screenshot:true` ([[raw/medium.com/beyond-google-navigating-the-hidden-internet-with-shodan-and-censys-4419|Shodan and Censys]]). Censys is ZMap-based with parsed-field queries, Elasticsearch regex and boosting:
```
parsed.issuer_dn.raw: /.*localhost, emailAddress=webmaster@localhost.*/ AND tags.raw: "self-signed"
tags:scada AND metadata.manufacturer:siemens AND location.country_code:DE
tags:scada AND protocols:"502/modbus"^3
host.services.software.vendor:"siemens" or host.services.hardware.vendor:"siemens"
```
([[raw/hackers-arise.com/osint-gathering-using-censys-hackers-arise-4421|Hackers Arise: Censys]], [[raw/medium.com/operational-technology-discovery-ics-osint-4418|ICS OSINT]]). Copy any interesting parsed value back into search to find every host sharing it.
**OT/ICS exposure.** ICSRank product regexes and the Austrian Energy CERT dork set for Shodan; port clusters (Modbus 502, S7 102, OPC UA 4840 + web UI) to classify PLC vs gateway vs HMI; `inurl:/Portal0000.htm` for S7 web portals; neighbouring /24 hosts with identical certs or banners indicate one OT cell. Off-network sources: ImportYeti bills of lading to tie PLC purchases to an operator, WiGLE SSIDs like `Plant_SCADA_Guest` ([[raw/medium.com/operational-technology-discovery-ics-osint-4418|ICS OSINT]]).
**Bulk datasets instead of APIs.** Rate-limited free tiers and case-sensitive search limit commercial APIs. Indexing Rapid7 Project Sonar forward/reverse DNS (≈200 GB uncompressed for IPv4 FDNS) into MongoDB with a multikey "terms" index gives unlimited substring search ([[raw/claconnect.com/build-your-own-osint-apis-for-pen-testers-5167|Build your own OSINT APIs]]). Demirkapi ran YARA over a year of VirusTotal uploads (Retrohunt) to find 15,000+ hard-coded secrets, and passive DNS to find 78,000 dangling cloud resources across 66,000 apex domains ([[raw/wired.com/thousands-of-corporate-secrets-were-left-exposed-this-guy-found-them-a-6948|WIRED: Demirkapi]]). URLTeam's archived shortener corpora expose shared cloud-drive links, internal URLs and Trello boards; GrayhatWarfare indexes them with dead/parked links removed ([[raw/grayhatwarfare.medium.com/how-to-search-urls-exposed-by-shortener-services-7429|Shortener search]]). The same corpus approach finds leaked code-signing certs: VirusTotal and GrayhatWarfare yielded 39 usable certificates, mostly via game-cheat bundles shipping cert + password ([[raw/medium.com/recertify-a-field-guide-to-public-code-signing-certificates-15050|Recertify]]).
## Hunting adversary infrastructure
Wiz's three pivot families for phishing domains ([[raw/wiz.io/unmasking-phishing-strategies-for-identifying-0ktapus-domains-and-beyo-9504|Wiz: 0ktapus]]):
- **Application fingerprinting** — kit artifacts: script/path sets (`/bundles/modernizr` + `/WebResource.axd` + `/Scripts/jquery-2.2.3.min.js`), a malformed `height` attribute bug, full-DOM SHA-256, POST targets (`../tmo/data/login.php`). Per-victim tailoring breaks HTML hashes, but kits **replicate assets from the victim's real Okta page** — hash the legitimate logo/JS and search for other hosts serving it.
- **Network profiling** — no TLS or Let's Encrypt, open directories, port sets, shared JARM, reused IPs, shortener redirects; monitor actor IPs for co-registered domains.
- **Registration analysis** — keyword sets (`sso`, `okta`, `servicenow`, `hr`), shared NS (`ns3.my-ndns[.]com`), registrars, one-year terms, aged domains; watching NRDs on the actor's NS surfaced a previously unknown template.
Attribution caveat: a kit cluster is not an actor; several groups can share a kit.
## Notable cases
- **0ktapus / Scattered Spider** — 12 DOM templates catalogued with pivots and activity windows; `mailgun-okta[.]com` reused after two years ([[raw/wiz.io/unmasking-phishing-strategies-for-identifying-0ktapus-domains-and-beyo-9504|Wiz]]).
- **Telegram takeover kit, 244 domains** — sequential `bgp01–99.sbs`, `bgp01–47.icu`, `jpg01–99.sbs` registered in scripted batches (1–3 s apart) at NameSilo behind one Cloudflare NS pair; only 13 ever seen in kit traffic. Stable pivots: `turnstile-gate.js` SHA-256, Turnstile sitekey, redirector path `/wqamhcsom/?r=&t=`, backend `/api/telegram/`. Main bundle hash changes per build, so don't hunt on it. Cloaking served a Chinese calendar decoy to scanners, and Cloudflare closed the first reports as benign ([[raw/osintteam.blog/a-calendar-for-scanners-inside-the-telegram-takeover-kit-hiding-behind-14800|Telegram takeover kit]]).
- **PrizeBuzz PhaaS** — one Vite SPA, brand set by `/base.json` (`code: 1100` is the brand-agnostic fingerprint); 318 five-letter `.buzz` domains, each on a different Cloudflare account; cloaking on geo, locale, one-time victim token and `#<unix-ms>` fragment ([[raw/phisheye.com/prizebuzz-phishing-network-analysis-9366|PhishEye]]).
- **Fake-journalist X OAuth lure** — real Calendly routing form → WIRED-branded booking page → X app `CalendarBookings` with read/write/DM; five publication-branded lures traced to one backend ([[raw/casco.com/fake-journalist-phishing-scam-targeting-tech-founders-12168|Casco]]).
- **333 malicious Tor exits** (~10% of exits) running Ebury to MITM SSH; found by detecting host-key changes through exitmap and an `sshesame` honeypot ([[raw/kaba.cx/how-i-got-over-300-tor-exit-nodes-removed-12307|kaba.cx]]).
## Defenses
- Assume CT is public: private PKI, or wildcard certs for internal zones to stop leaking hostnames ([[raw/naveensrinivasan.com/finding-hidden-internal-apps-through-public-certificate-logs-11391|Srinivasan]]).
- Run your own CT and NRD monitors for brand/keyword lookalikes; hunt kits by stable artifacts (asset hashes, sitekeys, paths), not volatile bundle hashes.
- Report kit pools as one case to the registrar; keep the full victim-path evidence, since cloaked pages pass automated abuse checks ([[raw/osintteam.blog/a-calendar-for-scanners-inside-the-telegram-takeover-kit-hiding-behind-14800|Telegram takeover kit]]).
- Track your own exposure in scan engines continuously; see [[Asset Discovery]], [[Subdomain Takeover]], [[Leaked Cloud Credentials]].
## Related
- [[OSINT]]
- [[OSINT Tools]]
- [[Reconnaissance]] · [[Subdomain Enumeration]] · [[Asset Discovery]] · [[Google Dorking]]
- [[Dark Web OSINT]] · [[Document Metadata OSINT]]
- [[Subdomain Takeover]] · [[Secret Scanning]]
## Sources
- [[raw/osintbench.com/domain-and-ip-investigation-with-osint-complete-guide-osintbench-4424|Domain and IP Investigation with OSINT (OSINTBench)]]
- [[raw/naveensrinivasan.com/finding-hidden-internal-apps-through-public-certificate-logs-11391|Finding Hidden Internal Apps Through Public Certificate Logs]]
- [[raw/levelup.gitconnected.com/the-tls-handshake-is-recon-most-pentesters-scroll-past-it-14519|The TLS Handshake Is Recon]]
- [[raw/pypi.org/ctfr-reloaded-certificate-transparency-subdomain-discovery-13747|ctfr-reloaded: certificate transparency subdomain discovery]]
- [[raw/infosecwriteups.com/phone-numbers-and-emails-to-hidden-subdomains-the-osint-acquisition-pi-9569|Phone Numbers and Emails to Hidden Subdomains]]
- [[raw/medium.com/beyond-google-navigating-the-hidden-internet-with-shodan-and-censys-4419|Beyond Google: Shodan and Censys]]
- [[raw/hackers-arise.com/osint-gathering-using-censys-hackers-arise-4421|OSINT Gathering Using Censys (Hackers Arise)]]
- [[raw/medium.com/operational-technology-discovery-ics-osint-4418|Operational Technology Discovery: ICS OSINT]]
- [[raw/intel471.com/top-5-osint-sources-for-pentesting-and-bug-bounties-intel-471-4422|Top 5 OSINT Sources for Pentesting and Bug Bounties (Intel 471)]]
- [[raw/claconnect.com/build-your-own-osint-apis-for-pen-testers-5167|Build Your Own OSINT APIs for Pen Testers]]
- [[raw/wired.com/thousands-of-corporate-secrets-were-left-exposed-this-guy-found-them-a-6948|Thousands of Corporate Secrets Were Left Exposed]]
- [[raw/grayhatwarfare.medium.com/how-to-search-urls-exposed-by-shortener-services-7429|How to search URLs exposed by Shortener services]]
- [[raw/medium.com/recertify-a-field-guide-to-public-code-signing-certificates-15050|Recertify: Public Code Signing Certificates]]
- [[raw/wiz.io/unmasking-phishing-strategies-for-identifying-0ktapus-domains-and-beyo-9504|Unmasking Phishing: 0ktapus domains]]
- [[raw/osintteam.blog/a-calendar-for-scanners-inside-the-telegram-takeover-kit-hiding-behind-14800|A Calendar for Scanners: Telegram Takeover Kit]]
- [[raw/phisheye.com/prizebuzz-phishing-network-analysis-9366|PrizeBuzz phishing network analysis]]
- [[raw/casco.com/fake-journalist-phishing-scam-targeting-tech-founders-12168|Fake Journalist phishing scam targeting tech founders]]
- [[raw/kaba.cx/how-i-got-over-300-tor-exit-nodes-removed-12307|How I got over 300 Tor exit nodes removed]]