notmalicio.us
01 · recondraft

Open Source Intelligence

Passive recon: domains, infrastructure, people, and leaked secrets.

8 sections · 2 min read · ~/playbook/osint

Before You Start

OSINT is passive: nothing here touches the target directly. Even so, confirm what is in scope (domains, subsidiaries, cloud assets, people) before collecting, and only research individuals as far as the engagement allows.

Keep a running list of everything found. Domains, hosts, names, and usernames all feed into Network Enumeration and password attacks later.

Domains & DNS

Registration info:

whois DOMAIN

Mail and verification records (TXT records often reveal which SaaS providers a company uses):

dig DOMAIN MX +short
dig DOMAIN TXT +short

Subdomain Discovery

Certificate transparency logs via crt.sh:

curl -s "https://crt.sh/?q=%25.DOMAIN&output=json" | jq -r '.[].name_value' | sort -u | tee subdomains_DOMAIN.crtsh

Passive subdomain enumeration with subfinder:

subfinder -d DOMAIN -silent | tee subdomains_DOMAIN.subfinder

Or with amass:

amass enum -passive -d DOMAIN
  • DNSDumpster gives a quick visual map of DNS records and hosts
  • Merge and de-duplicate all lists: cat subdomains_DOMAIN.* | sort -u > subdomains_DOMAIN.txt

Infrastructure

Find the organization's IP ranges and ASN with Hurricane Electric BGP Toolkit.

Shodan shows exposed services without scanning them yourself:

shodan search hostname:DOMAIN
shodan host IPADDR
  • Useful web searches: hostname:DOMAIN, org:"ORG", ssl.cert.subject.cn:DOMAIN

Web Footprint

Historical URLs from the Wayback Machine with waybackurls or gau:

echo DOMAIN | waybackurls | tee urls_DOMAIN.wayback
gau DOMAIN | tee urls_DOMAIN.gau
  • Look for old endpoints, parameters, backup files, and API paths
  • https://web.archive.org/ to view old versions of pages

Search engine dorks:

Dork Finds
site:DOMAIN -www Subdomains indexed by search engines
site:DOMAIN filetype:pdf Public documents (swap in docx, xlsx, pptx)
site:DOMAIN inurl:login Login portals
site:DOMAIN intitle:"index of" Open directory listings

Document Metadata

Download public documents and pull usernames, software versions, and internal paths from metadata:

exiftool *.pdf | grep -iE "author|creator|producer"

People & Usernames

  • Collect employee names from the company website, LinkedIn, and conference talks
  • Identify the email format (e.g. first.last@DOMAIN) with hunter.io or from emails found in documents
  • Harvest emails and hosts with theHarvester:
theHarvester -d DOMAIN -b all

Turn a list of names into likely usernames with username-anarchy:

./username-anarchy --input-file names.txt --select-format first.last,flast,firstl > users_DOMAIN.txt
  • Validate usernames later with Kerberos (see AS-REP Roasting) once on the network

Code & Secrets

Search public code for the organization's name and domain:

  • GitHub search: "DOMAIN" password, "DOMAIN" api_key, org:ORG
  • Check employees' personal repositories too, if in scope

Scan an organization's repositories for leaked credentials with trufflehog:

trufflehog github --org=ORG --only-verified

Scan a single repository, including its history:

trufflehog git https://github.com/ORG/REPO

Cloud Assets

Guess public storage buckets and apps across AWS, Azure, and GCP with cloud_enum:

python3 cloud_enum.py -k KEYWORD
  • Use the company name, product names, and domain without the TLD as keywords

Resources

esc
↑↓ navigate↵ openesc close