Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Penetration testing, first steps

Workbook · Easy · 3 hours

OSINT & Reconnaissance

Google dorking, Shodan, WHOIS, theHarvester, Maltego, and recon reports.

  • osint
  • google-dorking
  • shodan
  • maltego
  • passive-recon
On this page 10 sections
  1. ·Chapter 1 — What is OSINT?
  2. ·Chapter 2 — The OSINT Framework
  3. ·Chapter 3 — Google Dorking
  4. ·Chapter 4 — Shodan & Censys
  5. ·Chapter 5 — WHOIS & DNS Recon
  6. ·Chapter 6 — Social Media OSINT
  7. ·Chapter 7 — Email & Username Enumeration
  8. ·Chapter 8 — Maltego & Recon-ng
  9. ·Chapter 9 — Company & People Profiling
  10. ·Chapter 10 — Building Your Recon Report

Open-source intelligence is the first act of a penetration test and the last act of a background check. The goal is to build a full picture of a target from public sources alone, so later scans and attacks land on the right surface. This workbook covers the four lanes an operator works in parallel: network intelligence from Shodan, Censys and DNS; human intelligence from LinkedIn and theHarvester; web intelligence from the Wayback Machine and Wappalyzer; and social intelligence from framework-indexed sites. It then shows how Maltego and Google dorking stitch the lanes together into a single map. The output is a recon report that a tester or a hiring manager can act on.

Chapter 1 — What is OSINT?

OSINT (Open-Source Intelligence) is the collection and analysis of information gathered from publicly available sources. In penetration testing, it forms the critical first phase. The more the tester knows about the target before scanning, the more focused the attacks will be.

Good OSINT makes Nmap scans targeted and quiet. It shows which services to expect, which employees to include in phishing simulations, and which infrastructure is exposed before any packet is sent.

OSINT CategoryExamplesKey Tools
Network IntelligenceIP ranges, ASNs, DNS recordsShodan, Censys, DNSdumpster
Human IntelligenceEmployees, org charts, emailsLinkedIn, Hunter.io, theHarvester
Web IntelligenceTech stack, old pages, JS filesWayback Machine, Wappalyzer, BuiltWith
Social IntelligencePosts, photos, metadataOSINT Framework, Maltego

Chapter 2 — The OSINT Framework

The OSINT Framework (osintframework.com) is a reference for OSINT tools organised by category. Before any engagement, work through the relevant branches: Username, Social Networks, Email Addresses, Domain Name, IP Address.

Chapter 3 — Google Dorking

Google dorking uses advanced search operators to find information that should not be publicly accessible — exposed files, login pages, misconfigured servers, and sensitive documents.

# Find login portals on a domain
site:target.com inurl:login

# Find exposed config files
site:target.com ext:conf OR ext:config OR ext:env

# Find open directories
intitle:"Index of" site:target.com

# Find specific file types
site:target.com filetype:pdf "confidential"

# Find subdomains
site:*.target.com -www

Chapter 4 — Shodan & Censys

Shodan is a search engine for internet-connected devices. It continuously scans the entire internet and indexes banner information, certificates, and service data. Censys is similar but focuses on certificate transparency logs.

# Find all servers for an org
org:"Target Corporation"

# Find specific services
product:"Apache httpd" country:"US"

# Shodan CLI
shodan search --fields ip_str,port,org "apache country:US"
shodan host 192.168.1.1

Chapter 5 — WHOIS & DNS Recon

DNS reconnaissance reveals infrastructure: subdomains, mail servers, name servers, and sometimes internal IP ranges that leak through misconfigured zone transfers.

# WHOIS lookup
whois target.com

# DNS enumeration
nslookup -type=MX target.com
dig +short target.com ANY
dig axfr target.com @ns1.target.com  # zone transfer attempt

# Subfinder — passive subdomain discovery
subfinder -d target.com -o subs.txt

# Amass — comprehensive subdomain enum
amass enum -passive -d target.com

Chapter 6 — Social Media OSINT

LinkedIn reveals org structure, job roles, and technologies in use. X (formerly Twitter), GitHub, and forums reveal employee usernames, code snippets, and internal tooling. Job postings often list exact software versions ("AWS experience required", "Cisco ASA 5500 administration").

# theHarvester — email + subdomain + person gathering
theHarvester -d target.com -b linkedin,twitter,google

# Recon-ng module
use recon/profiles-profiles/linkedin_crawl

Chapter 7 — Email & Username Enumeration

# Hunter.io API (find emails by domain)
curl "https://api.hunter.io/v2/domain-search?domain=target.com&api_key=KEY"

# h8mail — breach data correlation
h8mail -t target@company.com

# Verify email validity (SMTP probing)
smtp-user-enum -M VRFY -u user@target.com -t 192.168.1.10

Chapter 8 — Maltego & Recon-ng

Maltego is a visual link analysis tool. It runs transforms (queries) against data sources and maps relationships between entities: domains, IPs, email addresses, people, and organisations. Recon-ng is a modular CLI framework with modules for most OSINT categories.

# Recon-ng quick start
recon-ng
workspaces create target_corp
modules search recon/domains
modules load recon/domains-hosts/findsubdomains
options set SOURCE target.com
run

Chapter 9 — Company & People Profiling

Build a target profile: identify key personnel (CEO, sysadmin, IT manager), map their emails using the discovered email format, check for password breaches using Have I Been Pwned, and build a wordlist from their public social media for targeted password attacks.

# Build a custom wordlist from OSINT
cewl https://www.target.com -d 3 -m 6 -o target_wordlist.txt

# LinkedIn employee enumeration
linkedin2username -u youraccount -c "Target Corporation"

Chapter 10 — Building Your Recon Report

Document all findings before touching a port. The recon report should contain: IP ranges and ASNs, all discovered subdomains, email addresses and naming convention, key personnel and roles, technologies identified, and any exposed sensitive data found. This report becomes the attack surface map for the engagement.

Workbook complete. You have covered all chapters. Mark it complete below and choose your next item in the practice library.

Sign in to track progress and send feedback.

Related