Every successful penetration test starts with information gathering. Today you master passive and active reconnaissance — collecting data about a target without touching its systems, then performing active scanning to map the attack surface.
Ethical hacking (penetration testing) is the authorized practice of attacking systems to find vulnerabilities before malicious actors do. You operate under a written scope agreement, document everything, and report findings to help defenders fix gaps. Without authorization, the same actions are criminal.
Open Source Intelligence (OSINT) uses publicly available data: WHOIS records, DNS lookups, LinkedIn profiles, Shodan searches, and Google dorks. Tools like theHarvester, Maltego, and Recon-ng automate collection. The goal is to build a target profile without alerting anyone.
Active recon sends packets to the target. Nmap is the industry standard: it discovers live hosts, open ports, running services, and OS fingerprints. Start with a ping sweep, then run service version detection. Always stay inside your authorized scope.
# Passive: DNS enumeration
nslookup target.com
dig target.com ANY
host -t mx target.com
# theHarvester email/subdomain OSINT
theHarvester -d target.com -b google,bing,linkedin
# Active: Nmap port scan
nmap -sV -sC -O 192.168.1.0/24
# Nmap specific port range
nmap -p 1-1000 --open 192.168.1.100
# Google dork examples
# site:target.com filetype:pdf
# intitle:"index of" site:target.com
Find 3 subdomains of a bug-bounty program target using only passive OSINT. Record your methodology and which tools found each subdomain.