GCIH Exam Prep · Topic 2 of 5

Reconnaissance, OSINT & Scanning

Passive Recon · OSINT Tools · Nmap · Service Enumeration · Vulnerability Scanning

Study with Practice Tests →

Reconnaissance, OSINT & Scanning

Reconnaissance is Stage 1 of every attack kill chain. Defenders who understand what attackers see — and how they see it — can detect and disrupt intrusions earlier. This topic covers the full recon spectrum from passive OSINT through active scanning and vulnerability assessment.

GCIH · Topic 2 of 5 · ~106 Questions · 4 Hours

Core Concepts at a Glance

Passive vs Active Recon

Passive recon gathers information without any direct contact with target systems — undetectable by the target. Active recon involves direct interaction (packets sent to target) and leaves traces in logs. Knowing which is which is a classic exam trap.

OSINT Tools

WHOIS (domain ownership), Shodan (internet-exposed devices), theHarvester (emails/subdomains from search engines), Maltego (relationship mapping), Recon-ng (modular framework), crt.sh (certificate transparency for passive subdomain discovery). All passive — no target packets sent.

DNS Enumeration

Record types: A (IPv4), AAAA (IPv6), MX (mail), NS (nameserver), TXT (SPF/DKIM), PTR (reverse), CNAME (alias). Zone transfer (AXFR) reveals ALL records if misconfigured — restrict AXFR to authorized secondaries.

Nmap Scan Types

-sS (SYN stealth, default), -sT (TCP connect, no root), -sU (UDP), -sV (version/banner), -O (OS detection), -sC (NSE scripts), -A (aggressive). Timing T0–T5: paranoid to insane.

Service Enumeration

Banner grabbing with netcat, curl, telnet. Protocol-specific enum: SMB (enum4linux), SNMP (snmpwalk — default "public" string), SMTP (VRFY/EXPN), LDAP (ldapsearch). Each reveals service version, configuration, and potential attack surface.

Vulnerability Scanning & CVSS

Nessus (credentialed/uncredentialed, plugin-based), OpenVAS/GVM (open-source), Nikto (web server). CVSS v3.1 severity: Critical 9.0–10.0 · High 7.0–8.9 · Medium 4.0–6.9 · Low 0.1–3.9. Base metrics: AV, AC, PR, UI, Scope, CIA Impact.

GCIH Topic Map

TopicKey Concepts
1. Incident Handling ProcessPICERL, chain of custody, IR team roles, MITRE ATT&CK, IOCs, threat intelligence
2. Reconnaissance & ScanningOSINT, Nmap, vulnerability scanning, passive vs active recon
3. Exploitation & Web AttacksPassword attacks, buffer overflows, social engineering, SQLi, XSS, CSRF
4. Network Attacks & IDSARP poisoning, DoS/DDoS, packet analysis, IDS/IPS evasion, NetFlow
5. Malware & Lateral MovementMalware types, C2, persistence, Pass-the-Hash, YARA, memory forensics

Exam Tips

Passive vs Active Trick Questions

The GCIH exam frequently presents scenarios and asks if the activity is detectable. Remember: passive recon (OSINT, WHOIS, Shodan, crt.sh) never touches the target — fully undetectable. Active scanning (Nmap, banner grabbing, zone transfer attempts) generates traffic the target can log.

CVSS Score Ranges

Memorize: Critical starts at 9.0 (not 8.0), High starts at 7.0, Medium at 4.0. Critical is a common distractor — exam may offer "8.0–10.0" as a wrong choice. The correct Critical range is 9.0–10.0.

Nmap Root Requirements

SYN scan (-sS) requires root/admin privileges because it uses raw sockets. TCP Connect (-sT) uses the OS socket API — no root needed. This distinction appears frequently in scenario questions about what a non-privileged user can run.

Passive Recon & OSINT

Passive reconnaissance collects intelligence about a target without sending a single packet to their systems. From the defender's perspective, passive recon is invisible — no logs, no alerts, no evidence. Understanding these techniques is essential for both offensive awareness and defensive strategy.

Passive vs Active — The Core Distinction

PASSIVE

Passive Reconnaissance

No direct target contact. Queries public data sources, third-party services, cached databases. Target has zero visibility into activity. Fully undetectable. Examples: WHOIS lookups, Shodan queries, Google dorks, crt.sh, theHarvester, DNS lookups via public resolvers.

ACTIVE

Active Reconnaissance

Direct interaction with target systems. Packets are sent to and received from the target. Activity appears in target firewall logs, IDS alerts, web server logs. Examples: Nmap port scans, banner grabbing via netcat, DNS zone transfer (AXFR) directly to target's nameserver, subdomain brute-force with live queries.

OSINT Tool Arsenal

WHOIS

Queries domain registration databases for ownership information. Reveals: registrant name/org/email, registration/expiry dates, registrar, and often name servers. Organizations using privacy protection mask personal details. Passive — queries public WHOIS servers.

Shodan

Search engine that continuously crawls and indexes internet-connected devices. Finds: exposed webcams, industrial control systems (ICS/SCADA), unpatched services, default credentials, open databases. Query by IP, hostname, port, product, or OS. Fully passive for the researcher.

theHarvester

Harvests email addresses, employee names, subdomains, IPs, and URLs from public sources including Google, Bing, LinkedIn, and PGP key servers. Command: theHarvester -d target.com -b google. Excellent for building phishing target lists. Passive.

Maltego

Visual link analysis tool for mapping relationships between OSINT entities — domains, IPs, email addresses, people, organizations, social profiles. Uses "transforms" (API calls to data sources). Identifies organizational structure, infrastructure, and personnel relationships. Powerful for APT attribution research.

Recon-ng

Modular framework (similar to Metasploit) for web-based open-source reconnaissance. Modules for WHOIS, DNS, breach data, social media, port scanning, and more. Workspaces keep engagements organized. Some modules are passive; others active. API keys required for most data sources.

crt.sh — Certificate Transparency

Certificate Transparency logs record every TLS certificate issued by trusted CAs. crt.sh queries these public logs — enter a domain and retrieve all subdomains that have ever had certificates issued. 100% passive — queries CT log databases, not the target. Reveals internal subdomain naming conventions.

Google Dorking

What it is: Using advanced Google search operators to find information an organization may not realize is publicly indexed. Passive — queries Google's cache, not the target directly.
OperatorExampleFinds
site:site:target.comAll pages indexed for domain, reveals subdomain structure
filetype:filetype:pdf site:target.comExposed file types (PDF, XLS, DOC, SQL, BAK)
intitle:"index of"intitle:"index of" site:target.comOpen directory listings — exposes file trees
inurl:admininurl:admin site:target.comAdmin login pages and admin interfaces
intext:intext:"username" filetype:logCredentials or sensitive strings in indexed files
cache:cache:target.comGoogle's cached version — useful if page is taken down

DNS Enumeration

DNS Record Types

A — IPv4 address mapping
AAAA — IPv6 address mapping
MX — Mail server, with priority value
NS — Authoritative nameservers
TXT — SPF, DKIM, DMARC, verification tokens
PTR — Reverse DNS (IP → hostname)
CNAME — Canonical name alias
SOA — Start of Authority (zone serial, TTL, contact)

Zone Transfer (AXFR)

DNS zone transfers replicate all records from primary to secondary nameservers. If misconfigured, any host can request a full zone dump with: dig axfr @ns1.target.com target.com. A successful AXFR dumps every hostname, IP, MX, TXT record — a complete internal map. Defend: restrict AXFR to authorized secondary IPs only via ACL on nameserver config.

Subdomain Enumeration

Brute-force subdomain discovery using wordlists (active — queries live DNS):
gobuster dns -d target.com -w wordlist.txt
dnsrecon -d target.com -t brt
dnsx -d target.com -w common.txt
Passive alternative: crt.sh — no DNS queries to target.

Defender Detection of Passive & Early-Stage Recon

DNS Log Monitoring

AXFR attempts appear in DNS server logs — even failed attempts are visible. Monitor for zone transfer requests from unauthorized IPs. Repeated NXDOMAIN responses (failed lookups) indicate subdomain brute-forcing.

Web Server Log Analysis

Bursts of 404 errors in rapid succession indicate directory/file brute-forcing. Unusual or scripted User-Agent strings (Python-requests, nikto, gobuster) flag automated recon tools. Low-and-slow scanning may still leave log traces over time.

Honeytokens

Fake credentials, documents, or DNS records planted specifically to detect recon. If a honeytoken is accessed, an attacker has discovered and used it — immediate alert. DNS canary tokens: a fake subdomain that fires an alert when resolved.

Active Scanning & Enumeration

Active reconnaissance involves direct interaction with target systems. Packets are sent, responses analyzed, and the activity is logged. Mastering Nmap scan types, timing, and output formats is essential GCIH knowledge — these appear heavily in exam scenarios.

Nmap Scan Types

Scan TypeFlagMechanismNotes
TCP SYN (Stealth)-sSSYN → SYN-ACK → RST; half-open, never completes handshakeDefault scan; stealthier; requires root/admin
TCP Connect-sTFull 3-way handshake (SYN → SYN-ACK → ACK)More detectable (full connection in logs); no root needed
UDP-sUSends UDP probes; open=response, closed=ICMP port unreachableSlow; targets DNS (53), SNMP (161), TFTP (69)
OS Detection-OAnalyzes TCP/IP stack behavior to fingerprint OSRequires at least one open and one closed port; root needed
Version Detection-sVSends service-specific probes; reads bannersBanner grabbing at scale; reveals service name + version
Script Scan-sCRuns default Nmap Scripting Engine (NSE) scriptsQuick enumeration of open services; many scripts available
Aggressive-ACombines -O -sV -sC + tracerouteNoisy but comprehensive; triggers most IDS signatures
Ping Sweep-snHost discovery only — ICMP echo + TCP 80/443 probesMaps live hosts without port scanning; fast network recon

Nmap Timing Templates

TemplateFlagUse CaseSpeed
Paranoid-T0IDS evasion — serialized, very long delays between probesExtremely slow
Sneaky-T1Slow IDS evasion with slightly better speedVery slow
Polite-T2Reduces bandwidth use; less likely to crash servicesSlow
Normal-T3Default — balanced speed and accuracyDefault
Aggressive-T4Fast scanning on reliable LAN connectionsFast
Insane-T5Maximum speed; may miss ports on slow/congested networksVery fast

Nmap Output Formats

Output Flags

-oN filename — Normal (human-readable)
-oX filename — XML (for tool import/parsing)
-oG filename — Grepable (one host per line, grep-friendly)
-oA basename — All three formats at once

Best practice: always save output with -oA for engagement documentation.

Common Scan Combinations

nmap -sS -sV -O -T4 target — Stealth SYN + version + OS, fast
nmap -sU -sS -T3 target — Combined TCP+UDP
nmap -p- target — All 65535 ports
nmap -sn 192.168.1.0/24 — Ping sweep entire subnet
nmap -A -T4 -oA results target — Aggressive, save all formats

Banner Grabbing

Banner grabbing retrieves service identification strings that servers voluntarily send upon connection. Reveals server software, version, and sometimes OS — all without exploitation.
ToolCommandUse Case
netcatnc -v target.com 80 then HEAD / HTTP/1.0Manual banner grab, any port
curlcurl -I https://target.comHTTP headers including Server: field
telnettelnet target.com 25SMTP/FTP banners (legacy)
Nmap -sVnmap -sV -p 80,443,22 targetAutomated banner grabbing at scale

Protocol-Specific Enumeration

SMB (445/TCP)

enum4linux -a target — Enumerate shares, users, groups, OS, password policy
smbclient -L //target -N — List shares anonymously
Key findings: share names, null session access, guest access, OS version, domain membership.

SNMP (161/UDP)

snmpwalk -v2c -c public target — Walk MIB tree with default community string
Default community string "public" = read access, "private" = write access. If not changed: exposes running processes, interfaces, routing tables, installed software, user accounts.

SMTP (25/TCP)

VRFY username — Verify if user exists (if enabled)
EXPN listname — Expand mailing list members
User enumeration: 252 = user exists, 550 = no such user. Modern configs disable VRFY/EXPN — but older mail servers expose full user lists.

LDAP (389/TCP)

ldapsearch -x -H ldap://target -b "dc=target,dc=com" — Anonymous bind query
If anonymous bind allowed: retrieves AD users, groups, OUs, computer accounts, password policies. Critical misconfiguration in Active Directory environments — reveals entire org structure.

Defender Detection of Active Scanning

IDS/IPS Threshold Alerts: Sequential port hits from one IP within seconds trigger port scan signatures in Snort/Suricata. Nmap's default -T3 is easily detected by tuned IDS rules.

Firewall Log Analysis

Look for one source IP connecting to sequential destination ports in rapid succession. Blocked connection attempts to many ports = port scan. Many SYN packets with no ACK completion = SYN scan.

Honeypots on Unused Ports

Deploy fake services on ports that should never receive connections (e.g., TCP 31337, or ports 1–1024 unused by production). Any connection attempt = immediate alert of scanning activity. Zero false positives.

SIEM Correlation

Correlate: source IP hits 50+ ports in 60 seconds = port scan rule. Cross-reference with threat intel feeds for known scanner IPs. Alert on version probes from external IPs — -sV generates distinctive service probes.

Vulnerability Scanning

Vulnerability scanning systematically tests systems for known weaknesses, misconfigurations, and outdated software. Understanding scanner types, their outputs, and CVSS severity scoring is critical for GCIH — both for finding attacker activity and for conducting authorized assessments.

Vulnerability Scanner Comparison

ScannerTypeBest ForKey Feature
NessusCommercial (free for personal use)Comprehensive host & network vuln assessmentMost widely used; credentialed + uncredentialed; plugin-based; CVSS scores; compliance checks
OpenVAS / GVMOpen-sourceBudget-conscious enterprise scanningGreenbone Vulnerability Manager; large plugin feed; on-premise deployment; community-supported
NiktoOpen-source web scannerWeb server misconfiguration assessmentFinds outdated software, dangerous files, default pages, insecure headers; not stealthy

Credentialed vs Uncredentialed Scans

Credentialed Scan

Uses valid credentials (local admin, SSH key, domain user) to log into the target system. Provides deep host assessment: patch levels, installed software, registry settings, local user accounts, service configurations, file permissions. More accurate — finds vulnerabilities an attacker with valid creds would find. More "noise" — creates authentication events in logs.

Uncredentialed Scan

Attacker perspective — sees only what is exposed to the network. Tests network-facing services, identifies open ports, checks banner versions, tests for common unauthenticated exploits. Faster and simpler to set up. Misses locally configured vulnerabilities, patch state, and internal misconfigurations. Better for external attack surface assessment.

CVSS v3.1 Severity Scale

Low
0.1–3.9
Medium
4.0–6.9
High
7.0–8.9
Critical
9.0–10.0
Exam alert: Critical severity starts at 9.0, not 8.0. A common wrong answer choice is "8.0–10.0." The correct range for Critical is 9.0–10.0. High covers 7.0–8.9.

CVSS v3.1 Base Metrics

MetricAbbreviationWhat It MeasuresValues
Attack VectorAVHow far away the attacker must beNetwork (N), Adjacent (A), Local (L), Physical (P)
Attack ComplexityACConditions beyond attacker's controlLow (L), High (H)
Privileges RequiredPRLevel of access needed before attackNone (N), Low (L), High (H)
User InteractionUIIs victim participation required?None (N), Required (R)
ScopeSDoes vuln affect resources beyond component?Unchanged (U), Changed (C)
Confidentiality ImpactCImpact on data secrecyNone (N), Low (L), High (H)
Integrity ImpactIImpact on data accuracy/trustworthinessNone (N), Low (L), High (H)
Availability ImpactAImpact on service/resource accessNone (N), Low (L), High (H)

Defender Detection of Vulnerability Scans

IDS Threshold Alerts

Vulnerability scanners generate distinctive traffic: sequential port hits, service-specific probes, HTTP requests to known vulnerability paths. Nessus and Nikto have well-known signatures in Snort/Suricata rulesets.

Firewall Log Analysis

Large volumes of connection attempts to many ports and services from one source. Nikto generates hundreds of HTTP requests to known vulnerable paths — easily spotted in web server access logs as bursts of 404/403 responses.

Honeypots on Unused Ports

Scanners probe every port — including ports with no legitimate services. Deploy honeypot listeners on unused port ranges. Any connection to a honeypot port = active scanning in progress. Zero legitimate traffic should ever reach these ports.

Practice Quiz — Reconnaissance, OSINT & Scanning

10 questions covering passive vs active recon, OSINT tools, Nmap, DNS zone transfers, CVSS scoring, and vulnerability scanning. Select your answers and click Submit to see your score.

1. Which recon type gathers information without direct contact with target systems?
2. The command dig axfr @ns1.target.com target.com attempts to:
3. Which Nmap flag performs a stealth SYN scan that never completes the 3-way handshake?
4. Shodan is best described as:
5. Which CVSS v3.1 score range indicates Critical severity?
6. A credentialed vulnerability scan differs from an uncredentialed scan because it:
7. Which Google dork finds exposed directory listings on a target site?
8. A firewall log shows thousands of SYN packets from one external IP hitting sequential destination ports over 30 seconds. This most likely indicates:
9. Which OSINT tool specializes in relationship mapping and visual link analysis between entities like domains, IP addresses, email addresses, and people?
10. What does the Nmap flag -sV do?

Memory Hooks

High-retention mnemonics for rapid recall during the GCIH exam. Each hook encodes the key distinction in a memorable phrase.

👁️
Passive vs Active
"Passive=Listen (invisible) · Active=Touch (leaves logs)"
Passive recon never sends a packet to the target — querying WHOIS, Shodan, crt.sh is like watching from across the street. Active scanning is like knocking on doors — it shows up in every log.
🗺️
OSINT Toolkit
"WHOIS=ownership · Shodan=exposed services · theHarvester=emails/staff · crt.sh=subdomains"
Each tool has a lane: WHOIS finds who owns a domain, Shodan finds what they've accidentally left open, theHarvester finds who works there, and crt.sh finds subdomains from SSL certificate logs.
🔍
Nmap Flags
"-sS=stealth SYN · -sT=full connect · -sU=UDP · -sV=versions · -O=OS"
SYN (S) is Stealthy — half-open, needs root. T is Telltale — full handshake, any user. U is Undetected-but-slow. V is Version. O is Operating system. STVVO: Stealth, Telltale, Very Undetected, Version, OS.
📡
DNS Zone Transfer
"AXFR = attacker gets ALL DNS records; defend: restrict to authorized secondaries"
A misconfigured AXFR is like leaving your entire org chart in the lobby. One command dumps every hostname, IP, and service in the zone. The fix is one line of nameserver config: allow-transfer to secondaries only.
📊
CVSS Scale
"Critical≥9.0 · High≥7.0 · Medium≥4.0 · Low>0"
Remember 9-7-4 as the boundary scores. Critical starts at 9 (not 8 — a classic distractor). High starts at 7. Medium starts at 4. Low is everything from 0.1 to 3.9. None = 0.0.
🍯
Defender Detection
"Port scan=IDS threshold alerts · AXFR attempts=DNS logs · Honeypots=unused ports"
Sequential SYN packets trip IDS threshold rules. AXFR attempts are logged by DNS servers even when rejected. Honeypots on ports that should never receive traffic give zero-false-positive scan detection.

Flashcards & Study Advisor

Click any flashcard to reveal the answer. Use the Study Advisor below to get topic-specific guidance.

Click a card to flip it · Click again to flip back

Nmap -sS vs -sT
Mechanism and detection difference
-sS (SYN Stealth): Sends SYN, receives SYN-ACK, sends RST — never completes handshake. Requires root. Stealthier (not in application logs). -sT (TCP Connect): Full 3-way handshake using OS socket API. No root needed. More detectable — creates full connection entries in logs.
Google Dork Operators
site:, filetype:, intitle:, inurl:
site: limit to domain. filetype: find file type (pdf, xls, sql). intitle:"index of" finds open directories. inurl:admin finds admin pages. All queries are passive — hitting Google's index, not the target.
Shodan vs theHarvester
What each tool finds
Shodan: Finds internet-connected devices — open ports, exposed services, vulnerable software, banners, webcams, SCADA. Queries Shodan's own scan database. theHarvester: Finds emails, employee names, subdomains from Google/Bing/LinkedIn. People and email focused.
CVSS v3.1 Base Metrics
AV, AC, PR, UI, Scope, CIA Impact
AV=Attack Vector (Network/Adjacent/Local/Physical). AC=Attack Complexity (Low/High). PR=Privileges Required. UI=User Interaction. S=Scope (Unchanged/Changed). C/I/A=Confidentiality/Integrity/Availability Impact.
DNS Record Types
A, AAAA, MX, NS, TXT, PTR, CNAME, SOA
A=IPv4. AAAA=IPv6. MX=mail server (priority). NS=authoritative nameserver. TXT=SPF/DKIM/DMARC. PTR=reverse DNS (IP→name). CNAME=alias. SOA=zone authority (serial, TTL, admin contact).
Nmap Timing T0–T5
Purposes of each timing template
T0=Paranoid (IDS evasion, serialized). T1=Sneaky (slow IDS evasion). T2=Polite (bandwidth-friendly). T3=Normal (default). T4=Aggressive (fast, LAN). T5=Insane (max speed, may miss ports).
Credentialed vs Uncredentialed Scan
Tradeoffs of each scan type
Credentialed: Logs in with valid creds — deep assessment of patch levels, local configs, user accounts. More accurate, more log noise. Uncredentialed: Attacker's view — only network-exposed services. Faster setup, misses local vulns. Use both for complete picture.
crt.sh — Certificate Transparency
How it works and why it's fully passive
Certificate Authorities log every issued TLS cert to public CT logs (RFC 6962). crt.sh queries these public databases — no packets sent to target. Reveals subdomains that have had certificates issued, including internal-sounding names. Fully passive and undetectable by target.

Study Advisor

Select a topic for targeted exam guidance:

Passive Recon & OSINT

    Ready to Pass the GCIH?

    Practice with full-length timed exams, detailed rationales, and adaptive question banks.

    Start Studying Free →