Open Source Intelligence
Table of Contents
Collecting and analysing publicly available information to produce actionable intelligence. In a security context OSINT serves two purposes: passive reconnaissance before a pentest engagement (mapping attack surface without touching the target), and blue team threat intelligence (understanding who is targeting you and how). All information gathered through OSINT is legally available — the skill is knowing where to look and how to correlate findings.
Related: Shodan DNSDumpster Whois Reconnaissance Subdomain Enumeration Vulnerability Identification Techniques
1. DNS and Domain Intelligence
The fastest starting point — DNS records reveal infrastructure, mail providers, CDN usage, and subdomains without any direct contact with the target.
# WHOIS — registrant, nameservers, registration and expiry dates whois target.com # DNS records — map the full record set dig any target.com dig ns target.com # nameservers dig mx target.com # mail servers dig txt target.com # SPF, DKIM, DMARC, verification tokens # Subdomain enumeration via certificate transparency # Every TLS certificate issued for a domain is publicly logged curl "https://crt.sh/?q=%.target.com&output=json" \ | python3 -c "import sys,json; [print(e['name_value']) for e in json.load(sys.stdin)]" \ | sort -u # DNSDumpster — passive subdomain and DNS map # https://dnsdumpster.com — web UI
2. Infrastructure and Service Discovery
# Shodan — indexed scan data for IP ranges, hostnames, services # Find all exposed services for a domain without scanning it shodan host $IP shodan search "hostname:target.com" shodan search "org:\"Target Organisation\"" # Censys — similar to Shodan, stronger certificate data # https://search.censys.io # Common Shodan filters shodan search 'http.title:"Dashboard" org:"Target"' shodan search 'product:"Apache httpd" version:"2.4.49"' shodan search 'port:3389 org:"Target"' # exposed RDP shodan search 'port:5985 org:"Target"' # exposed WinRM
3. Google Dorking
Advanced search operators to find sensitive information indexed by search engines. Useful for finding exposed files, login panels, and configuration data.
site:target.com # restrict to domain site:target.com filetype:pdf # specific file types site:target.com ext:xml OR ext:json # config files site:target.com inurl:admin # admin panels site:target.com intitle:"index of" # directory listings site:target.com "password" # exposed credentials in pages site:target.com filetype:env # exposed .env files # Find subdomains not linked from the main site site:*.target.com -site:www.target.com # Find exposed login pages site:target.com inurl:login OR inurl:signin OR intitle:"Login" # Find exposed documents that may contain internal info site:target.com filetype:doc OR filetype:docx OR filetype:xls
Full database of dorks: https://www.exploit-db.com/google-hacking-database
4. Email and Personnel
# Hunter.io — find email addresses for a domain # https://hunter.io — web UI, also has API # Phonebook.cz — email, subdomain, and URL enumeration # https://phonebook.cz # LinkedIn — find employee names, roles, and org structure # Useful for: target selection, spear phishing pretext, # identifying who manages specific infrastructure # Email format discovery — once you know names # Common patterns: firstname@, f.lastname@, firstname.lastname@ # Verify format by checking if a known employee's email bounces
5. Paste Sites and Breach Data
Credential breaches and internal data frequently appear on paste sites before being taken down.
# Pastebin, GitHub, GitLab, StackOverflow — search for: # — target domain in email addresses # — API keys or tokens referencing the target # — Internal hostnames or IP ranges # GitHub search — find accidental secret commits # https://github.com/search # Queries: "target.com" password "target.com" api_key "@target.com" secret org:targetorgname password # Have I Been Pwned — check if emails appear in known breaches # https://haveibeenpwned.com
6. Wayback Machine / Historical Data
# Internet Archive — historical snapshots of the target's web presence # Reveals old endpoints, removed pages, previous software versions # https://web.archive.org # waybackurls — extract all URLs ever indexed for a domain echo "target.com" | waybackurls | sort -u # Useful for finding: # — Old admin panels or login pages # — API endpoints removed from current site # — Previous software versions (for CVE research) # — Backup files left exposed (config.php.bak, etc.)
7. Metadata Extraction
Files published by the target often contain metadata revealing internal infrastructure details — usernames, software versions, network paths, and author names.
# Download publicly available documents wget https://target.com/documents/report.pdf # Extract metadata from downloaded files exiftool report.pdf exiftool *.docx # Look for: # — Author / Creator fields (internal usernames) # — Software version (Word 2013, Adobe Acrobat X) # — Company name confirming scope # — Internal file paths (\\fileserver\shares\...) # — GPS coordinates (if photos are involved)
8. Automated OSINT Frameworks
When manual enumeration needs to scale:
| Tool | Use |
|---|---|
| theHarvester | Email, subdomain, host enumeration from multiple sources |
| Maltego | Graphical relationship mapping across entities |
| SpiderFoot | Automated OSINT scan against a target, 200+ modules |
| Recon-ng | Modular reconnaissance framework (similar to Metasploit) |
| OSINT Framework | Curated directory of OSINT tools by category |
# theHarvester — quick multi-source enumeration theHarvester -d target.com -b all theHarvester -d target.com -b google,linkedin,shodan
OSINT Framework: https://osintframework.com — categorised tool directory, useful for finding specialist sources.
9. OSINT in a Pentest Context
Passive reconnaissance with OSINT should complete before any active scanning — it defines the attack surface and prevents wasted effort scanning irrelevant IP space.
Standard passive recon sequence: 1. WHOIS → registrant details, nameservers, date registered 2. DNS records → dig any → map full DNS landscape 3. Certificate transparency → crt.sh → subdomain list 4. Shodan / Censys → exposed services, open ports, software 5. Google dorking → exposed files, login panels, indexed data 6. theHarvester → email addresses, additional subdomains 7. Wayback Machine → historical endpoints and content 8. Metadata extraction → from publicly downloaded documents 9. LinkedIn / social → org structure and personnel Feed results into: - Active recon (Nmap against confirmed in-scope IPs) - Vulnerability research (software versions → Searchsploit/NVD) - Credential attacks (email addresses for phishing, spray attacks)
Tips
- Passive OSINT leaves no footprint on the target — do it thoroughly before any active scanning
- Certificate transparency is the most reliable subdomain enumeration source — faster and more complete than DNS brute force for most domains
- Google dorking is under-used in real engagements — the Google Hacking Database has thousands of tested queries for specific targets and vulnerability types
- Metadata from public documents is frequently overlooked — internal paths and usernames extracted from a PDF can save hours of enumeration
- In a blue team context, running OSINT against your own organisation is a valuable exercise — it shows you what an attacker sees before they touch your network