Open Source Intelligence is the first phase of any engagement. The goal is to discover as much about a target as possible without touching their infrastructure.
Google Dorks # Find login pages site:target.com inurl:login site:target.com inurl:admin site:target.com intitle:"login" # Exposed sensitive files site:target.com ex t:pdf site:target.com ex t:xlsx OR ex t:xls OR ex t:csv site:target.com ex t:doc OR ex t:docx site:target.com filetype :sql site:target.com filetype :env site:target.com filetype :log # Configuration files site:target.com ex t:xml | ex t:conf | ex t:cnf | ex t:reg | ex t:inf | ex t:rdp | ex t:cfg | ex t:txt | ex t:ora | ex t:ini # Exposed directories site:target.com intitle:"index of" site:target.com intitle:"index of" "parent directory" # API keys / secrets site:target.com "api_key" OR "apikey" OR "secret_key" site:target.com "BEGIN RSA PRIVATE KEY" # Cameras / IoT inurl:"/view/index.shtml" intitle:"Live View - AXIS" inurl:top .htm inurl:currenttime # Subdomains and related domains site:*.target.com -www site:target.com -www # Cached/old versions cache:target.com
Email Enumeration theHarvester -d target.com -b all theHarvester -d target.com -b google,bing,linkedin,twitter theHarvester -d target.com -b google -l 200 theHarvester -d target.com -b linkedin theHarvester -d target.com -b hunter smtp-user-enum -M VRFY -U users.txt -t mail.target.com smtp-user-enum -M RCPT -U users.txt -t mail.target.com -f test @test.com
Domain & DNS Recon whois target.com whois IP_ADDRESS dig target.com ANY dig target.com NS dig target.com MX dig target.com TXT dig @8.8.8.8 target.com A dig axfr @ns1.target.com target.com host -t axfr target.com ns1.target.com host IP_ADDRESS dig -x IP_ADDRESS whois -h whois.radb.net IP_ADDRESS curl https://ipinfo.io/IP_ADDRESS curl "https://crt.sh/?q=%.target.com&output=json" | jq '.[].name_value' | sort -u curl "https://crt.sh/?q=target.com" | grep -oP '(?<=<TD>)[^<]+\.target\.com' | sort -u openssl s_client -connect target.com:443 </dev/null 2>/dev/null | openssl x509 -noout -text amass enum -passive -d target.com amass enum -active -d target.com -brute amass intel -whois -d target.com
GitHub / Code Recon trufflehog github --org=TargetOrg trufflehog github --repo=https://github.com/target/repo trufflehog filesystem /path/to/cloned/repo gitleaks detect --source /path/to/repo gitleaks detect --source /path/to/repo --report-format json --report-path results.json gitrob analyze target-org curl "https://api.github.com/search/code?q=target.com+password&type=code" \ -H "Authorization: token GITHUB_TOKEN" | jq '.items[].html_url'
LinkedIn & Social OSINT python linkedin2username.py -u your@email.com -p yourpass -c TargetCompany python crosslinked.py -f '{first}.{last}@target.com' "Target Company" python crosslinked.py -f '{f}{last}@target.com' "Target Company"
Shodan / Censys shodan init API_KEY shodan search "org:Target Company" shodan search "hostname:target.com" shodan search 'ssl:"target.com"' shodan search 'http.favicon.hash:HASH' shodan search 'org:"Target Corp" port:22' shodan search 'org:"Target Corp" product:nginx' shodan search 'org:"Target Corp" http.status:200' shodan host IP_ADDRESS shodan myip censys search "target.com" --index-type hosts censys view IP_ADDRESS --index-type hosts
Wayback Machine / Archive waybackurls target.com gau target.com gauplus -t 5 target.com curl "http://web.archive.org/cdx/search/cdx?url=*.target.com&output=json&fl=original&collapse=urlkey" | \ python3 -c "import sys,json;[print(x[0]) for x in json.load(sys.stdin)]" waybackurls target.com | httpx -silent -status-code
Automated OSINT Frameworks recon-ng marketplace install all workspaces create target modules load recon/domains-hosts/google_site_web options set SOURCE target.com run pip install spiderfoot spiderfoot -l 0.0.0.0:5001 python photon.py -u https://target.com -l 3 -t 50 --wayback metagoofil -d target.com -t pdf,doc,xls -l 50 -n 10 -o /tmp/meta
exiftool document.pdf exiftool image.jpg exiftool -r /directory/ wget -r -l 1 -A pdf,docx,xlsx https://target.com/documents/ exiftool -r /path/to/downloaded/ | grep -i "author\|creator\|software"
Cloud & Bucket Recon aws s3 ls s3://target-backup --no-sign-request aws s3 ls s3://targetcorp --no-sign-request python s3scanner.py --bucket-file buckets.txt s3scanner --bucket target-backup cloudbrute -d target.com -k target -m storage gsutil ls gs://target-bucket
No comments yet. Be the first.