WHOIS and Domain Research
Table of Contents
- Introduction to WHOIS
- WHOIS Lookup Deep Dive
- WHOIS Command Variations
- IP WHOIS Lookups
- Domain Research Tools
- Domain Age Assessment
- Registrar Information
- DNSSEC Status
- Privacy and Proxy Detection
- Extracting Email Addresses from WHOIS
- Building Domain Timelines
- Correlating WHOIS Data with Other Recon
- Attack Chain Position
- OSCP Exam Tips
Introduction to WHOIS
What is WHOIS?
WHOIS is a query and response protocol used for retrieving information about the registration of domain names, IP address blocks, and autonomous systems. The WHOIS database contains records for every registered domain name and IP address on the internet.
Why WHOIS Matters for Penetration Testing
WHOIS data provides valuable intelligence for penetration testers:
| Information Type |
Description |
Attack Value |
| Registrant Details |
Name, organization, address |
Social engineering targets |
| Administrative Contact |
Admin name, email, phone |
Direct contact for social engineering |
| Technical Contact |
Tech name, email, phone |
Technical contact for attacks |
| Domain Dates |
Creation, expiration, updated |
Domain age assessment, timeline building |
| Name Servers |
DNS infrastructure |
DNS enumeration targets |
| Registrar |
Domain registration company |
Registrar-specific attacks |
| IP Ranges |
Associated IP addresses |
Network mapping |
| Organization |
Company name and details |
Target profiling |
WHOIS Protocol
WHOIS operates on TCP port 43 and uses a simple text-based protocol:
# Basic WHOIS query
whois target.com
# Query specific WHOIS server
whois -h whois.publicinterestregistry.net target.org
# Query with raw output
whois target.com | grep -v "^%"
WHOIS Database Structure
flowchart TD
A[WHOIS Query] --> B{Query Type}
B -->|Domain| C[Registry WHOIS]
B -->|IP Address| D[RIR WHOIS]
B -->|ASN| E[RIR WHOIS]
C --> F[Registrar WHOIS]
F --> G[Registrant Data]
F --> H[Admin Contact]
F --> I[Tech Contact]
F --> J[Name Servers]
D --> K[Network Owner]
D --> L[IP Range]
D --> M[Country/Region]
D --> N[Organization]
E --> O[ASN Details]
E --> P[Network Routes]
E --> Q[Organization]
WHOIS Lookup Deep Dive
WHOIS Record Fields
A typical WHOIS record contains the following fields:
| Field |
Description |
Attack Relevance |
| Domain Name |
The registered domain |
Target identification |
| Registry Domain ID |
Unique registry identifier |
Record tracking |
| Registrar |
Domain registration company |
Registrar-specific research |
| Registrar URL |
Registrar website |
Additional research |
| Whois Server |
Registrar’s WHOIS server |
Direct queries |
| Referral URL |
Registrar referral link |
Additional info |
| Updated Date |
Last update timestamp |
Activity tracking |
| Creation Date |
Domain registration date |
Domain age assessment |
| Registry Expiry Date |
Domain expiration date |
Expiration monitoring |
| Registrar IANA ID |
IANA-assigned registrar ID |
Registrar identification |
| Domain Status |
Registration status |
Lock status, transfer lock |
| Name Server |
DNS name servers |
DNS enumeration |
| DNSSEC |
DNSSEC signing status |
Security assessment |
| Registrant Name |
Domain owner name |
Social engineering |
| Registrant Organization |
Owner organization |
Target profiling |
| Registrant Street |
Owner address |
Physical location |
| Registrant City |
Owner city |
Geographic targeting |
| Registrant State/Province |
Owner state/province |
Geographic targeting |
| Registrant Postal Code |
Owner postal code |
Physical location |
| Registrant Country |
Owner country |
Jurisdiction assessment |
| Registrant Phone |
Owner phone number |
Social engineering |
| Registrant Email |
Owner email address |
Direct contact |
| Admin Name |
Administrative contact name |
Social engineering |
| Admin Organization |
Admin organization |
Target profiling |
| Admin Street |
Admin address |
Physical location |
| Admin City |
Admin city |
Geographic targeting |
| Admin State/Province |
Admin state/province |
Geographic targeting |
| Admin Postal Code |
Admin postal code |
Physical location |
| Admin Country |
Admin country |
Jurisdiction assessment |
| Admin Phone |
Admin phone number |
Social engineering |
| Admin Email |
Admin email address |
Direct contact |
| Tech Name |
Technical contact name |
Social engineering |
| Tech Organization |
Tech organization |
Target profiling |
| Tech Street |
Tech address |
Physical location |
| Tech City |
Tech city |
Geographic targeting |
| Tech State/Province |
Tech state/province |
Geographic targeting |
| Tech Postal Code |
Tech postal code |
Physical location |
| Tech Country |
Tech country |
Jurisdiction assessment |
| Tech Phone |
Tech phone number |
Social engineering |
| Tech Email |
Tech email address |
Direct contact |
Sample WHOIS Record Analysis
$ whois example.com
Domain Name: EXAMPLE.COM
Registry Domain ID: 2336799_DOMAIN_COM-VRSN
Registrar GO DADDY.COM LLC
Registrar WHOIS Server: whois.godaddy.com
Registrar URL: http://www.godaddy.com
Updated Date: 2023-08-14T07:31:02Z
Creation Date: 1995-08-14T04:00:00Z
Registry Expiry Date: 2026-08-13T04:00:00Z
Registrar IANA ID: 146
Domain Status: clientDeleteProhibited
Domain Status: clientRenewProhibited
Domain Status: clientTransferProhibited
Domain Status: clientUpdateProhibited
Name Server: NS1.EXAMPLE.COM
Name Server: NS2.EXAMPLE.COM
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2026-09-01T10:00:00Z <<<
Field-by-Field Attack Analysis
Domain Status
The domain status field reveals important information about the domain’s registration state:
| Status |
Description |
Attack Relevance |
| clientDeleteProhibited |
Domain cannot be deleted |
Domain is protected |
| clientTransferProhibited |
Domain cannot be transferred |
Domain is locked |
| clientUpdateProhibited |
Domain cannot be updated |
Domain is protected |
| clientRenewProhibited |
Domain cannot be renewed |
Unusual status |
| serverDeleteProhibited |
Server-level delete protection |
Additional protection |
| serverTransferProhibited |
Server-level transfer protection |
Additional protection |
| serverUpdateProhibited |
Server-level update protection |
Additional protection |
| pendingDelete |
Domain is being deleted |
Domain may be available soon |
| pendingTransfer |
Domain transfer in progress |
Transfer opportunity |
| pendingRenew |
Domain renewal in progress |
Normal operation |
| redemptionPeriod |
Domain in redemption period |
Recovery possible |
| inactive |
Domain is inactive |
May be vulnerable |
DNSSEC Status
| Status |
Description |
Attack Relevance |
| unsigned |
DNSSEC not enabled |
Potential for DNS spoofing |
| signed |
DNSSEC enabled |
DNS data integrity verified |
| delegation signed |
Delegation is signed |
Partial DNSSEC protection |
# Extract creation date
whois target.com | grep "Creation Date"
# Extract expiration date
whois target.com | grep "Registry Expiry Date"
# Extract name servers
whois target.com | grep "Name Server"
# Extract registrant email
whois target.com | grep "Registrant Email"
# Extract admin email
whois target.com | grep "Admin Email"
# Extract tech email
whois target.com | grep "Tech Email"
# Extract registrar
whois target.com | grep "Registrar"
# Extract all email addresses
whois target.com | grep -i "email"
# Extract all phone numbers
whois target.com | grep -i "phone"
# Extract name servers only
whois target.com | grep "Name Server" | awk '{print $3}'
WHOIS Command Variations
Basic WHOIS Commands
# Basic domain lookup
whois target.com
# Basic IP lookup
whois 10.10.10.1
# Basic ASN lookup
whois AS15169
Querying Specific WHOIS Servers
# Query specific WHOIS server
whois -h whois.publicinterestregistry.net target.org
# Query registrar's WHOIS server
whois -h whois.godaddy.com target.com
# Query RIR WHOIS server
whois -h whois.arin.net 10.10.10.1
# Raw output (no comments)
whois target.com | grep -v "^%"
# Clean output (no comments or dashes)
whois target.com | grep -v "^%" | grep -v "^-"
# JSON-like output (using jq if available)
whois target.com | grep -v "^%" | grep -v "^-" | sed 's/^\(.*\): \(.*\)$/"\1": "\2",/'
# Extract specific fields
whois target.com | grep -E "Creation Date|Registry Expiry Date|Name Server|Registrar"
WHOIS with Different TLDs
Different TLDs have different WHOIS servers and data formats:
# .com domains
whois target.com
# .org domains
whois target.org
# .net domains
whois target.net
# .io domains
whois target.io
# .co domains
whois target.co
# Country-code TLDs
whois target.uk
whois target.de
whois target.jp
WHOIS Rate Limiting
WHOIS servers often implement rate limiting:
# Add delay between queries
for domain in domain1.com domain2.com domain3.com; do
whois $domain >> whois_results.txt
sleep 1 # Wait 1 second between queries
done
WHOIS Timeout Handling
# Set timeout for WHOIS queries
whois -H target.com 2>/dev/null || echo "Query failed for target.com"
# Timeout with timeout command
timeout 10 whois target.com || echo "Query timed out"
IP WHOIS Lookups
What is IP WHOIS?
IP WHOIS lookups provide information about IP address blocks, including the organization that owns the block, the geographic location, and contact information.
IP WHOIS Record Fields
| Field |
Description |
Attack Relevance |
| NetRange |
IP address range |
Network mapping |
| CIDR |
CIDR notation |
Network size |
| NetName |
Network name |
Network identification |
| NetHandle |
Network handle |
Record tracking |
| Parent |
Parent network |
Network hierarchy |
| NetType |
Network type |
Network classification |
| Organization |
Owning organization |
Target identification |
| RegDate |
Registration date |
Network age |
| Updated |
Last update date |
Activity tracking |
| Comment |
Additional comments |
Extra information |
| Ref |
Reference URL |
Additional data |
| Admin/Tech Contact |
Contact information |
Social engineering |
| Country |
Country code |
Geographic targeting |
| State/Province |
State/province |
Geographic targeting |
| City |
City |
Geographic targeting |
Sample IP WHOIS Record
$ whois 8.8.8.8
NetRange: 8.8.8.0 - 8.8.8.255
CIDR: 8.8.8.0/24
NetName: LVLT-GOGL-8-8-8
NetHandle: NET-8-8-8-0-1
Parent: NET-8-0-0-0-0
NetType: Direct Allocation
OriginAS: AS15169
Organization: Google LLC (GOGL)
RegDate: 2014-03-14
Updated: 2014-03-14
Comment: For spam issues please visit
Comment: Ref: https://rdap.arin.net/registry/ip/8.8.8.0
OrgName: Google LLC
OrgId: GOGL
Address: 1600 Amphitheatre Parkway
City: Mountain View
StateProv: CA
PostalCode: 94043
Country: US
RegDate: 2000-03-30
Updated: 2019-10-31
Comment: 94025
Ref: https://rdap.arin.net/registry/entity/GOGL
RefAbuseHandle: ABE352-ARIN
RefAbuseEmail: network-abuse@google.com
IP WHOIS Attack Relevance
| Information |
Attack Value |
| Organization |
Identifies the target organization |
| IP Range |
Reveals the full network range for scanning |
| Geographic Location |
Helps with physical targeting and social engineering |
| Abuse Contact |
Contact for reporting (and social engineering) |
| Network Name |
May reveal internal naming conventions |
| Origin AS |
Autonomous system information for routing attacks |
IP Range Discovery
# Get IP range from WHOIS
whois 10.10.10.1 | grep "NetRange"
# Extract CIDR notation
whois 10.10.10.1 | grep "CIDR"
# Get full IP range
whois 10.10.10.1 | grep -E "NetRange|CIDR"
# Scan the entire IP range
whois 10.10.10.1 | grep "NetRange" | awk '{print $3}' | tr -d '-' | while read start; do
whois 10.10.10.1 | grep "NetRange" | awk '{print $5}' | while read end; do
# Convert to CIDR and scan
nmap -sV -p- $start/24
done
done
Regional Internet Registries (RIRs)
IP addresses are managed by Regional Internet Registries:
| RIR |
Region |
WHOIS Server |
| ARIN |
North America |
whois.arin.net |
| RIPE NCC |
Europe, Middle East |
whois.ripe.net |
| APNIC |
Asia-Pacific |
whois.apnic.net |
| LACNIC |
Latin America |
whois.lacnic.net |
| AFRINIC |
Africa |
whois.afrinic.net |
# Query specific RIR
whois -h whois.arin.net 10.10.10.1
whois -h whois.ripe.net 10.10.10.1
whois -h whois.apnic.net 10.10.10.1
Domain Research Tools
Beyond the basic WHOIS command, several tools provide enhanced domain research capabilities.
SecurityTrails
SecurityTrails is a comprehensive domain and DNS history platform.
Features
| Feature |
Description |
| DNS History |
Historical DNS records |
| WHOIS History |
Historical WHOIS data |
| Subdomain Discovery |
Known subdomains |
| IP History |
Historical IP addresses |
| Backlinks |
Inbound links |
| API Access |
Programmatic access |
Usage
# Web interface: https://securitytrails.com
# API usage:
curl -H "APIKEY: your_api_key" \
"https://api.securitytrails.com/v1/domain/target.com/history"
crt.sh (Certificate Transparency)
crt.sh is a certificate transparency log search engine that reveals domains and subdomains through SSL/TLS certificates.
Features
| Feature |
Description |
| Certificate Search |
Search by domain, serial, or issuer |
| Subdomain Discovery |
Find subdomains from certificates |
| Historical Data |
Past certificate issuances |
| API Access |
Programmatic access |
Usage
# Web interface: https://crt.sh
# API usage:
curl -s "https://crt.sh/?q=target.com&output=json" | jq -r '.[].name_value' | sort -u
# Find all subdomains
curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value' | sort -u
# Find subdomains with specific pattern
curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value' | grep "api\|admin\|dev"
Attack Value
| Information |
Attack Value |
| Subdomains |
Expands attack surface |
| Internal Domains |
May reveal internal infrastructure |
| Certificate Details |
Reveals technology stack |
| Historical Data |
Shows past infrastructure |
viewdns.info
viewdns.info provides various DNS and domain lookup tools.
Features
| Tool |
Description |
| WHOIS Lookup |
Standard WHOIS data |
| Reverse WHOIS |
Find domains by owner |
| DNS Record Lookup |
All DNS record types |
| Domain Blacklist Check |
Check if domain is blacklisted |
| DNS Propagation Check |
Check DNS propagation |
| Domain Age Check |
Domain registration age |
Usage
# Web interface: https://viewdns.info
# Reverse WHOIS: https://viewdns.info/reversewhois/?q=email@example.com
# DNS Record Lookup: https://viewdns.info/recordlookup/?domain=target.com
dnsdumpster.com
dnsdumpster.com is a domain research tool that maps domain relationships.
Features
| Feature |
Description |
| DNS Records |
All DNS record types |
| Subdomains |
Discovered subdomains |
| IP Addresses |
Associated IP addresses |
| Network Visualization |
Visual domain map |
| WHOIS Data |
Registration information |
Usage
# Web interface: https://dnsdumpster.com
# Enter domain and view results
Other Domain Research Tools
Domain Age Assessment
Why Domain Age Matters
Domain age can provide important context for security assessments:
| Age Range |
Assessment |
Attack Relevance |
| 0-30 days |
Very new |
May be phishing, less established security |
| 30-90 days |
New |
May be test environment, less mature |
| 90 days-1 year |
Recent |
May have immature security practices |
| 1-5 years |
Established |
More mature security practices |
| 5-10 years |
Well-established |
Likely mature security practices |
| 10+ years |
Long-established |
Very mature, but may have legacy issues |
Calculating Domain Age
# Get creation date
creation_date=$(whois target.com | grep "Creation Date" | awk '{print $3, $4}')
# Calculate age
creation_epoch=$(date -d "$creation_date" +%s)
current_epoch=$(date +%s)
age_seconds=$((current_epoch - creation_epoch))
age_days=$((age_seconds / 86400))
age_years=$((age_days / 365))
echo "Domain age: $age_years years, $age_days days"
Domain Age Attack Relevance
| Scenario |
Attack Approach |
| New domain |
May have default configurations, weak security |
| Recently updated |
May have new vulnerabilities from changes |
| Expiring soon |
May have lax security if organization is distracted |
| Long-established |
May have legacy systems and outdated software |
| Frequently transferred |
May indicate instability or security concerns |
Domain Expiration Monitoring
# Get expiration date
expiry_date=$(whois target.com | grep "Registry Expiry Date" | awk '{print $4, $5}')
# Calculate days until expiration
expiry_epoch=$(date -d "$expiry_date" +%s)
current_epoch=$(date +%s)
days_until_expiry=$(( (expiry_epoch - current_epoch) / 86400 ))
echo "Days until expiration: $days_until_expiry"
# Alert if expiring soon
if [ $days_until_expiry -lt 30 ]; then
echo "WARNING: Domain expires in $days_until_expiry days!"
fi
What is a Registrar?
A registrar is an organization accredited to register domain names. The registrar information in WHOIS records reveals important details about the domain’s registration.
Common Registrars
| Registrar |
IANA ID |
Notes |
| GoDaddy |
146 |
Largest registrar |
| Namecheap |
1068 |
Popular budget registrar |
| Google Domains |
895 |
Google’s registrar service |
| Cloudflare |
1910 |
Security-focused registrar |
| AWS Route 53 |
4655 |
AWS registrar service |
| Tucows |
69 |
OpenSRS, Enom |
| Network Solutions |
2 |
One of the oldest registrars |
| Hover |
1993 |
Simple registrar |
| Porkbun |
1861 |
Budget registrar |
| Name.com |
625 |
Full-service registrar |
Registrar Attack Relevance
| Information |
Attack Value |
| Registrar Name |
Registrar-specific vulnerabilities |
| Registrar URL |
Additional research target |
| Whois Server |
Direct WHOIS queries |
| IANA ID |
Registrar identification |
Registrar-Specific Attacks
| Registrar |
Known Issues |
Attack Approach |
| GoDaddy |
Account takeover vulnerabilities |
Target registrar account |
| Namecheap |
Weak password policies |
Brute force registrar account |
| Google Domains |
Google account security |
Target Google account |
| Cloudflare |
Strong security |
Focus on other vectors |
# Get registrar name
whois target.com | grep "Registrar:" | awk '{print $2, $3}'
# Get registrar URL
whois target.com | grep "Registrar URL"
# Get registrar WHOIS server
whois target.com | grep "Whois Server"
# Get registrar IANA ID
whois target.com | grep "Registrar IANA ID"
# Query registrar's WHOIS server directly
registrar_whois=$(whois target.com | grep "Whois Server" | awk '{print $3}')
whois -h $registrar_whois target.com
DNSSEC Status
What is DNSSEC?
DNSSEC (Domain Name System Security Extensions) adds cryptographic signatures to DNS data to prevent spoofing and cache poisoning attacks.
DNSSEC in WHOIS
The WHOIS record includes a DNSSEC field that indicates the signing status:
| Status |
Description |
Security Implication |
| unsigned |
DNSSEC not enabled |
Vulnerable to DNS spoofing |
| signed |
DNSSEC fully enabled |
DNS data integrity verified |
| delegation signed |
Delegation is signed |
Partial DNSSEC protection |
Checking DNSSEC Status
# Check DNSSEC status in WHOIS
whois target.com | grep "DNSSEC"
# Check DNSSEC with dig
dig target.com DNSKEY
# Check DS record
dig target.com DS
# Check RRSIG records
dig target.com RRSIG
# Check DNSSEC validation
dig target.com +dnssec
DNSSEC Attack Relevance
| Status |
Attack Approach |
| unsigned |
DNS spoofing, cache poisoning |
| signed |
Focus on other attack vectors |
| delegation signed |
Partial protection, may have gaps |
Privacy and Proxy Detection
What is Privacy/Proxy Protection?
Domain privacy protection (also called WHOIS privacy or domain privacy) hides the registrant’s personal information from public WHOIS records.
Why Privacy Protection Matters
| Aspect |
Description |
Attack Relevance |
| Hidden Information |
Registrant details are obscured |
Reduces social engineering targets |
| Proxy Contact |
Proxy service contact is shown |
Proxy may be a research target |
| Privacy Service |
Privacy service name is visible |
Service-specific research |
| Detection |
Privacy can often be detected |
Indicates security awareness |
Common Privacy Services
| Service |
Provider |
Detection Indicators |
| Domains By Proxy |
GoDaddy |
“Domains By Proxy, LLC” |
| WhoisGuard |
Namecheap |
“WhoisGuard, Inc.” |
| Privacy Protect |
Google Domains |
“Contact Privacy Inc.” |
| RegistrarLock |
Cloudflare |
“Redacted for Privacy” |
| Contact Privacy |
Tucows |
“Contact Privacy Inc.” |
| Privacy service |
Various |
“Privacy service provided by” |
Detecting Privacy Protection
# Check for privacy protection
whois target.com | grep -i "privacy\|proxy\|redacted\|withheld"
# Check for specific privacy services
whois target.com | grep -i "Domains By Proxy\|WhoisGuard\|Privacy Protect"
# Check if registrant info is hidden
whois target.com | grep "Registrant Name"
# If result is "REDACTED FOR PRIVACY" or similar, privacy is enabled
# Check for proxy email
whois target.com | grep "Registrant Email"
# If email is from a privacy service, privacy is enabled
Privacy Protection Attack Relevance
| Scenario |
Attack Approach |
| Privacy enabled |
Focus on other attack vectors |
| Privacy not enabled |
Use WHOIS data for social engineering |
| Partial privacy |
Use available data for targeting |
| Privacy service known |
Research privacy service for weaknesses |
Bypassing Privacy Protection
| Method |
Description |
Effectiveness |
| Historical WHOIS |
Check past WHOIS records |
May reveal original registrant |
| Certificate Transparency |
Check CT logs for emails |
May reveal admin emails |
| Social Media |
Search for domain owner |
May reveal identity |
| Company Website |
Check contact pages |
May reveal contact info |
| LinkedIn |
Search for domain employees |
May reveal organization |
Email addresses from WHOIS records are valuable for:
| Purpose |
Description |
| Social Engineering |
Direct contact for phishing |
| Credential Stuffing |
Known emails for password attacks |
| Target Identification |
Identify key personnel |
| Email Enumeration |
Build email lists for attacks |
| Contact Verification |
Verify target contacts |
# Extract all email addresses
whois target.com | grep -i "email" | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
# Extract registrant email
whois target.com | grep "Registrant Email" | awk '{print $3}'
# Extract admin email
whois target.com | grep "Admin Email" | awk '{print $3}'
# Extract tech email
whois target.com | grep "Tech Email" | awk '{print $3}'
# Extract all unique emails
whois target.com | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u
Email Address Validation
# Validate extracted emails
emails=$(whois target.com | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u)
for email in $emails; do
# Check if email is from a privacy service
if echo "$email" | grep -qi "privacy\|proxy\|redacted\|whoisguard"; then
echo "$email - Privacy service (skip)"
else
echo "$email - Valid target"
fi
done
Email Address Attack Relevance
| Email Type |
Attack Value |
| Registrant Email |
Domain owner contact |
| Admin Email |
Administrative contact |
| Tech Email |
Technical contact |
| Abuse Email |
Abuse reporting contact |
| Privacy Email |
Privacy service contact (low value) |
Building Domain Timelines
Why Domain Timelines Matter
Domain timelines provide historical context for security assessments:
| Timeline Event |
Description |
Attack Relevance |
| Domain Creation |
When the domain was registered |
Domain age assessment |
| Domain Updates |
When the domain was updated |
Activity tracking |
| Domain Expiration |
When the domain expires |
Expiration monitoring |
| Name Server Changes |
When DNS was changed |
Infrastructure changes |
| Registrar Changes |
When registrar was changed |
Registration changes |
| WHOIS Updates |
When WHOIS was updated |
Contact changes |
Building a Domain Timeline
# Extract key dates
creation_date=$(whois target.com | grep "Creation Date" | awk '{print $3, $4}')
updated_date=$(whois target.com | grep "Updated Date" | awk '{print $3, $4}')
expiry_date=$(whois target.com | grep "Registry Expiry Date" | awk '{print $4, $5}')
echo "=== Domain Timeline for target.com ==="
echo "Creation Date: $creation_date"
echo "Last Updated: $updated_date"
echo "Expiry Date: $expiry_date"
echo ""
# Calculate domain age
creation_epoch=$(date -d "$creation_date" +%s)
current_epoch=$(date +%s)
age_days=$(( (current_epoch - creation_epoch) / 86400 ))
echo "Domain Age: $age_days days"
# Calculate days until expiration
expiry_epoch=$(date -d "$expiry_date" +%s)
days_until_expiry=$(( (expiry_epoch - current_epoch) / 86400 ))
echo "Days Until Expiration: $days_until_expiry"
Historical WHOIS Data
Historical WHOIS data can reveal past registration information:
| Source |
Description |
| SecurityTrails |
Historical WHOIS and DNS data |
| DomainTools |
Historical WHOIS records |
| WhoisHistory.org |
Free WHOIS history |
| Archive.org |
Wayback Machine for WHOIS |
# Check historical WHOIS (using SecurityTrails API)
curl -H "APIKEY: your_api_key" \
"https://api.securitytrails.com/v1/domain/target.com/history"
Timeline Attack Relevance
| Timeline Pattern |
Attack Approach |
| Recently created |
May have weak security |
| Recently updated |
May have new vulnerabilities |
| Frequently updated |
May indicate instability |
| Expiring soon |
May have lax security |
| Long history |
May have legacy issues |
Correlating WHOIS Data with Other Recon
WHOIS data becomes more valuable when correlated with other reconnaissance findings.
Correlation Framework
flowchart TD
A[WHOIS Data] --> B[Domain Research]
A --> C[DNS Enumeration]
A --> D[OSINT Gathering]
A --> E[Network Scanning]
B --> F[Subdomain Discovery]
C --> F
D --> F
E --> F
F --> G[Target Profile]
G --> H[Attack Vector Identification]
H --> I[Exploitation Planning]
Correlation Examples
1. WHOIS + DNS
# Get name servers from WHOIS
whois target.com | grep "Name Server"
# Query those name servers for zone transfer
whois target.com | grep "Name Server" | awk '{print $3}' | while read ns; do
echo "Trying zone transfer from $ns..."
dig axfr target.com @$ns
done
2. WHOIS + OSINT
# Get registrant organization
org=$(whois target.com | grep "Registrant Organization" | cut -d: -f2 | xargs)
# Search for the organization on social media
echo "Searching for $org on LinkedIn..."
echo "Searching for $org on GitHub..."
echo "Searching for $org on Twitter..."
3. WHOIS + Network Scanning
# Get IP range from WHOIS
ip_range=$(whois 10.10.10.1 | grep "NetRange" | awk '{print $3}')
# Scan the IP range
nmap -sV -p- $ip_range/24
4. WHOIS + Email Enumeration
# Extract emails from WHOIS
emails=$(whois target.com | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u)
# Use emails for further enumeration
for email in $emails; do
echo "Checking $email..."
# Check if email exists via SMTP
# Check if email is in breach databases
# Check if email is on social media
done
Correlation Checklist
Attack Chain Position
WHOIS and domain research are part of the Reconnaissance phase.
flowchart LR
A[WHOIS Lookup] --> B[Domain Research]
B --> C[DNS Enumeration]
C --> D[Subdomain Discovery]
D --> E[Network Scanning]
E --> F[Service Enumeration]
F --> G[Vulnerability Analysis]
G --> H[Exploitation]
style A fill:#ff6b6b,stroke:#333,stroke-width:2px
style B fill:#ff6b6b,stroke:#333,stroke-width:2px
WHOIS in the Kill Chain
| Kill Chain Phase |
WHOIS Activities |
| Reconnaissance |
WHOIS lookups, domain research, timeline building |
| Weaponization |
N/A |
| Delivery |
N/A |
| Exploitation |
N/A |
| Installation |
N/A |
| Command & Control |
N/A |
| Actions on Objectives |
N/A |
OSCP Exam Tips
Critical WHOIS Advice for OSCP
1. WHOIS is Limited in OSCP
In the OSCP exam environment, external WHOIS lookups may not work for exam domains. Focus on:
# Try WHOIS anyway (may work for some domains)
whois target.local
# Focus on DNS enumeration instead
dig target.local ANY
dig axfr target.local @ns1.target.local
2. Use WHOIS for External Research
If the exam provides external domains, use WHOIS for research:
# Get all WHOIS information
whois target.com
# Extract key information
whois target.com | grep -E "Creation Date|Registry Expiry Date|Name Server|Registrar|Email"
3. Correlate with DNS
# Get name servers from WHOIS
whois target.com | grep "Name Server"
# Use name servers for zone transfer
whois target.com | grep "Name Server" | awk '{print $3}' | while read ns; do
dig axfr target.com @$ns
done
# Extract all emails
whois target.com | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u
Common WHOIS Mistakes in OSCP
- Relying too much on WHOIS: External WHOIS may not work in the exam
- Ignoring DNS enumeration: DNS is more valuable in the exam environment
- Not extracting emails: Emails can be used for social engineering
- Missing name servers: Name servers are targets for zone transfers
- Not correlating data: WHOIS data is more valuable when correlated
Quick WHOIS Commands for OSCP
# 1. Basic WHOIS lookup
whois target.com
# 2. Extract key information
whois target.com | grep -E "Creation Date|Registry Expiry Date|Name Server|Registrar|Email"
# 3. Extract emails
whois target.com | grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' | sort -u
# 4. Get name servers for zone transfer
whois target.com | grep "Name Server" | awk '{print $3}'
# 5. Check DNSSEC status
whois target.com | grep "DNSSEC"
Summary
WHOIS and domain research provide valuable intelligence for penetration testing. Key takeaways:
- WHOIS reveals registration details: Registrant, admin, and tech contacts are social engineering targets
- Domain age matters: New domains may have weaker security; old domains may have legacy issues
- Name servers are key: They are targets for zone transfers and DNS enumeration
- Email extraction is valuable: WHOIS emails can be used for social engineering and credential attacks
- Privacy protection is common: Detect and work around privacy services
- Correlate with other recon: WHOIS data is more valuable when combined with DNS, OSINT, and network data
- Build timelines: Historical data provides context for security assessments
Mastering WHOIS and domain research will improve your ability to profile targets and identify attack vectors during the OSCP exam and real-world penetration tests.
References and Further Reading
Last Updated: 2026-09-01
Chapter 03: Information Gathering - Topic 04: WHOIS and Domain Research