Skip to content

Web Information Gathering

This cheatsheet provides a comprehensive guide to web information gathering.

Published on
Published on

Passive Enumeration Phase

Passive reconnaissance focuses on gathering intelligence about a target’s digital footprint using third-party services and public records without direct interaction with the target’s infrastructure.

Domain and Infrastructure Information

Identifying domain ownership and mapping public netblocks provides potential entry points and technical contacts.

Command/LinkDescription
whois target.comStandard query to identify domain owners, registration dates, and assigned name servers.
whois target.com -h 192.168.50.251Queries a specific WHOIS server for registration records.
WhoisFreaksWeb service used to access historical WHOIS records and track ownership changes over time.
NetcraftWeb interface used to gather historical server and hosting information.

Subdomain Intelligence (OSINT)

Certificate Transparency (CT) logs and DNS repositories reveal subdomains, such as development or staging environments, that are not publicly linked.

Command/LinkDescription
crt.shWeb-based search for SSL/TLS certificates recorded in public, append-only ledgers.
curl -s "https://crt.sh/?q=target.com&output=json" | jq -r '.[].name_value' | sort -uCLI command to extract all unique subdomains for a domain from CT logs.
curl -s "..." | jq -r '.[] | select(.name_value | contains("dev")) | .name_value'CLI filter to specifically find subdomains containing the string “dev” in CT logs.
CensysWeb search engine for hostnames and globally observed certificates.
DNSDumpsterWeb service mapping domains and visualizing host relationships using open-source repositories.
Farsight DNSDBPassive DNS data service collected from a global sensor array.

Google Hacking (Dorking)

Advanced search operators are used to find information leakage, specific file types, and exposed directory listings.

Command/LinkDescription
site:target.com -wwwGoogle Dork to find subdomains while excluding the main “www” site.
filetype:pdf site:target.comSearches for public PDF documents belonging to the target organization.
ext:php or ext:aspxFinds pages using specific web technologies or file extensions.
intitle:"index of" "parent directory"Discovers exposed directory listings on web servers.
Google Hacking DBExtensive database of advanced search strings for reconnaissance (GHDB).

Technology Profiling & Web Archives

Analyze the technology stack and content history without sending packets directly to the target server.

Command/LinkDescription
whatweb http://target.com:54387CLI tool to passively identify technologies, versions, and frameworks.
WappalyzerBrowser extension identifying frameworks, CMS, and server-side technologies.
BuiltWithWeb-based service that profiles a site’s entire technology stack.
Wayback MachineAccesses historical versions of pages to find deleted content or old parameters.
Netcraft FingerprintingWeb-based tool for fingerprinting web servers passively.

Credential and Email Gathering

Scrape public data and organizational patterns to prepare for later authentication or social engineering tests.

Command/LinkDescription
theHarvesterOSINT tool gathering emails, employee names, and subdomains from multiple sources.
./breach-parse.sh target.com out.txtCLI tool to scrape local data breach repositories for credentials associated with a domain.
hunter.ioWeb service for discovering organizational email patterns and addresses.
phonebook.czLists emails and subdomains associated with a specific domain.
OSINT FrameworkA web directory of various OSINT tools and resources.

Active Enumeration Phase

Active enumeration requires direct interaction with the target’s services to verify configurations, map paths, and identify vulnerabilities.

DNS Probing & Resolution

Manual DNS queries target authoritative nameservers to resolve specific record types and test for misconfigurations.

Command/LinkDescription
dig target.com ANYAttempts to retrieve all available DNS records for the domain.
dig target.com A / MX / NS / TXTRetrieves specific DNS record types (IPv4, Mail, Nameserver, or Text).
dig @1.1.1.1 target.comDirects a query to a specific DNS server.
dig +trace target.comShows the full path of DNS resolution from root servers.
dig -x 192.168.1.1Performs a PTR lookup to find the hostname associated with an IP.
dig @10.42.42.42 version.bind chaos txtQueries a nameserver for its specific BIND software version.
host www.target.comStreamlined CLI check for the A record of a hostname.
host -t mx target.comConcise check for specific record types like mail exchange.
for ip in $(cat list.txt); do host $ip.domain; doneBash loop to resolve multiple hostnames from a wordlist.
nslookup -type=TXT <host> <NS_IP>Resolves specific records; commonly used to confirm blind injection.

DNS Brute Forcing & Zone Transfers

Automated tools perform dictionary attacks to find hidden subdomains and attempt zone transfers.

Command/LinkDescription
dig axfr @10.129.26.159 target.comAttempts a full DNS zone transfer from the specified nameserver.
dnsenum --enum target.com -f wordlist.txt -rAutomated enumeration with recursive subdomain brute forcing.
dnsrecon -d target.com -t stdPerforms a standard enumeration scan for common DNS records.
dnsrecon -d target.com -D list.txt -t brtBrute forces subdomains using a provided dictionary.
dnsrecon -r 192.168.1.0/24Performs reverse DNS (PTR) lookups on an IP range.
dnsrecon -t crt -d sec542.comCLI tool searching for domains in CT logs via crt.sh.
nmap --script dns-brute target.comUses an NSE script to brute force subdomains via an internal wordlist.
sublist3r -d target.com -t 100Aggregates subdomains from many public sources.

Host & Service Discovery

Scanning open ports is essential for determining listening services and software versions to identify exploits.

Command/LinkDescription
nmap -sV target.comIdentifies open ports and probes them for service version detection.
nmap -A -p80,443,53 target.comAggressive scan including OS detection, versioning, scripts, and traceroute.
nmap -p 443 --script ssl-enum-ciphers <IP>Enumerates and rates supported SSL/TLS ciphers for security.
nmap --script http-robots.txt www.target.comAutomatically parses and displays entries in the robots.txt file.
nc -vz 127.0.0.1 80-1023Uses Netcat as a simple, fast port scanner.
ShodanSearch engine that facilitates port scanning and device discovery without sending packets.
gowitness can single -u <URL> --write-dbCaptures screenshots of discovered web interfaces for visual profiling.

Fingerprinting & Application Probing

Direct interaction reveals server software, supported methods, and presence of security controls.

Command/LinkDescription
curl -I target.comBanner grabbing: Reads HTTP headers for server/platform info.
echo -e "GET / HTTP/1.0\r\n" | nc target 80Manual Netcat connection to send raw requests and observe responses.
curl -i -X OPTIONS https://target.comProbes for allowed HTTP methods via the OPTIONS verb.
wafw00f target.comCLI tool to actively probe and identify a Web Application Firewall.
nikto -h http://192.168.1.23 -Tuning bScans for vulnerabilities and identifies software modules.
Retire.jsScans applications for vulnerable or outdated JavaScript libraries.

Content & Virtual Host Discovery

Fuzzing the Host header identifies hidden virtual hosts, while forced browsing finds unlinked content.

Command/LinkDescription
ffuf -w list.txt -u http://target.com/FUZZBasic directory and file discovery using the FUZZ keyword.
ffuf -w list.txt -u <URL>/FUZZ -e .php,.txtFuzzes for files with specific extensions.
ffuf -u http://IP/ -H "Host: FUZZ.target.com" -w list.txtIdentifies hidden virtual hosts sharing a single IP.
ffuf -w list.txt -u <URL>/FUZZ -mc 200 -fs 9Matches 200 OK responses and filters out specific response sizes.
gobuster vhost -u http://IP -w list.txt --append-domainIdentifies virtual hosts by fuzzing the Host header.
wget -r -e robots=off https://target.com -P /tmpRecursively spiders a site while ignoring robots.txt instructions.
cewl https://www.target.com -w wordlist.txtSpiders a site to create a custom contextual wordlist based on its text.
SecListsComprehensive collection of high-quality wordlists for fuzzing and discovery.

API & Web Service Discovery

Modern applications use explicit routes and HTTP methods that require specialized discovery tools.

Command/LinkDescription
KiterunnerBrute forces API endpoints using specialized .kite wordlists.
Assetnote ListsHigh-quality wordlists built from internet-wide scans for APIs and tech stacks.
PostmanPopular platform for building and testing APIs.
BrunoOpen-source API client used for testing and seeding requests to proxies.

Automated Vulnerability Scanning

Template-based and integrated scanners probe for specific misconfigurations and exposed secrets.

Command/LinkDescription
nuclei -u http://target.comCLI tool running default vulnerability templates against a target.
nuclei -u <URL> -t exposures/configsLimits scanning to specific templates, such as exposed configuration files.
nuclei -u <URL> -H 'Cookie: JESSIONID=...'Supplies authentication headers for scanning protected resources.
Burp ScannerProfessional version feature performing automated auditing for vulnerabilities.
ZAP Active ScanIntegrated scanner in ZAP that actively searches for vulnerabilities.

Database Metadata Enumeration

If a SQL injection vulnerability is found, automated tools are used to exfiltrate the database structure.

Command/LinkDescription
sqlmap -u "URL?id=1" --bannerFingerprints the DBMS and retrieves the version banner.
sqlmap -u URL --data "id=1" --batch --dbsCLI tool that enumerates all databases on the backend server.
sqlmap -u URL -D DB_NAME --tablesLists all tables within a specific database.
sqlmap -u URL -D DB_NAME -T TABLE_NAME --dumpExtracts and saves all data from a specific table.
sqlmap -u URL --file-read=/etc/passwdAttempts to read local files from the server’s filesystem.
sqlmap -u URL --os-shellAttempts to gain an interactive operating system shell.
sqlmap -u URL -v 6Maximum verbosity: shows full HTTP requests and response content.

Key Files and URI Patterns

Reviewing metafiles and predictable URI patterns provides insight into server management and potential attack vectors.

File / URI PatternDescription
/robots.txtLists paths disallowed for crawlers; often reveals sensitive directories like /admin.
/.well-known/security.txtStandardized location for security contact information and reporting policies.
/.well-known/openid-configurationDiscloses OpenID identity provider endpoints and metadata.
/server-statusApache status page; leaks server version, uptime, and current active requests.
/openapi.jsonRetrieves OpenAPI/Swagger definitions describing API routes and methods.
http://169.254.169.254/Target URI for AWS EC2 instance metadata (IMDSv1) during SSRF testing.
http://metadata.google.internal/Target URI for Google Cloud instance metadata.
https://kubernetes.defaultProbes for Kubernetes pod information and internal debug services.
.bak, .old, .tmp, .confCommon extensions targeted during forced browsing to find exposed sensitive data.

Disclaimer

This cheatsheet does not ensure that commands and tools are accurate. Make sure to review results and use at your own risk.

Perform pentest with proper authorization only!