Part 5 / 6

IP Tracing and WHOIS

🕑 90-120 minutes 📖 Intermediate Level 📋 Module 3

Introduction

IP address tracing is a fundamental skill in cyber crime investigation. Every device connected to the internet has an IP address that can help identify its location and owner. This section will teach you how to trace IP addresses, use WHOIS lookup, detect VPNs and proxies, and perform geo-location.

📚 Learning Objectives

After this part, you will be able to trace IP addresses, perform WHOIS lookup, identify VPN and proxy usage, and use geo-location techniques to identify the physical location of an IP address.

IP Address Tracing

IP tracing is the process of finding the owner and physical location of an IP address. This is often the first step in identifying cyber criminals.

Steps for IP Tracing

  1. Obtain IP Address: From email headers, server logs, or network traffic
  2. Identify IP Type: Check if it's public or private, static or dynamic
  3. WHOIS Lookup: Find the registered owner of the IP block
  4. Geo-location: Determine approximate physical location
  5. ISP Contact: Request subscriber details through legal process

Where to Find IP Addresses

📧

Email Headers

X-Originating-IP, Received headers contain sender's IP address.

💻

Server Logs

Web servers, FTP servers, and application logs record client IP addresses.

🌐

Website Analytics

Services like Google Analytics track visitor IP addresses.

💬

Chat Applications

Some applications log IP addresses in their databases.

Command Line Tools

# Ping - Check if IP is alive ping 8.8.8.8 # Traceroute - Show path to destination tracert 8.8.8.8 (Windows) traceroute 8.8.8.8 (Linux/Mac) # Nslookup - DNS lookup nslookup google.com # Dig - Advanced DNS lookup dig google.com # Whois - Domain/IP registration info whois 8.8.8.8

WHOIS Lookup

WHOIS is a protocol that provides registration information for domain names and IP addresses. It is one of the most important tools for cyber crime investigation.

WHOIS for IP Addresses

WHOIS lookup for an IP address provides:

  • Network Owner: Organization that owns the IP block
  • Address Range: CIDR notation of the IP block
  • Contact Information: Technical and abuse contacts
  • Regional Registry: Which RIR allocated the IP
  • Country: Country where IP is registered

Regional Internet Registries (RIRs)

RIRRegionWHOIS Server
ARINNorth Americawhois.arin.net
RIPE NCCEurope, Middle East, Central Asiawhois.ripe.net
APNICAsia Pacific (including India)whois.apnic.net
LACNICLatin Americawhois.lacnic.net
AFRINICAfricawhois.afrinic.net

Sample WHOIS Output

% Information related to '103.45.64.0 - 103.45.67.255' inetnum: 103.45.64.0 - 103.45.67.255 netname: EXAMPLEISP-IN descr: Example ISP India Private Limited country: IN admin-c: ADMIN-AP tech-c: TECH-AP abuse-c: ABUSE-AP status: ALLOCATED PORTABLE mnt-by: APNIC-HM last-modified: 2023-01-15T10:30:45Z person: Network Administrator address: 123 Tech Park, Mumbai country: IN phone: +91-22-12345678 e-mail: abuse@exampleisp.in

WHOIS Tools

ARIN WHOIS
whois.arin.net
For North American IP addresses and domains.
APNIC WHOIS
wq.apnic.net/whois-search
For Asia-Pacific region including India.
RIPE Database
apps.db.ripe.net
For European and Middle Eastern IP addresses.
ICANN WHOIS
lookup.icann.org
Unified lookup for domains.
WHOIS Privacy

Many domain registrars offer WHOIS privacy services that hide registrant information. In such cases, you need to contact the privacy service provider with legal documentation to obtain actual registrant details.

VPN and Proxy Detection

Criminals often use VPNs (Virtual Private Networks) and proxies to hide their real IP addresses. Detecting these is an important skill for investigators.

Types of Anonymization Services

🔒

VPN (Virtual Private Network)

Encrypts all traffic and routes it through a server in another location. Changes visible IP address.

🔄

Proxy Server

Acts as intermediary for web requests. May not encrypt traffic. HTTP/SOCKS proxies common.

🛠

Tor (The Onion Router)

Routes traffic through multiple encrypted layers. Very difficult to trace. Exit nodes are public.

🌐

Residential Proxies

Use real residential IPs. Harder to detect than datacenter IPs.

VPN/Proxy Detection Techniques

TechniqueDescription
IP Database CheckUse databases like MaxMind, IP2Location to check if IP belongs to known VPN/proxy provider
PTR Record CheckReverse DNS may reveal VPN provider names (e.g., vpn-123.nordvpn.com)
Port ScanningOpen VPN ports (1194, 443, 500) may indicate VPN server
ASN AnalysisCheck if ASN belongs to known hosting/VPN providers
Tor Exit Node ListCheck against public list of Tor exit nodes
HTTP HeadersX-Forwarded-For, Via headers may reveal proxy use

VPN Detection Tools

  • IPHub: API for VPN/proxy/hosting detection
  • ip-api.com: Provides VPN/proxy detection in API
  • Shodan: Identifies open ports and services
  • Tor Project Exit List: check.torproject.org
  • AbuseIPDB: Community database of malicious IPs
💡 When VPN is Detected

If a VPN is detected, the investigation doesn't end. Options include:
- Request logs from VPN provider (if they maintain logs)
- Analyze timestamps to correlate with other evidence
- Look for IP leaks (WebRTC, DNS leaks)
- Check if user made mistakes revealing real IP elsewhere

Geo-location

IP geo-location is the technique of determining the physical location of an IP address. While not 100% accurate, it provides a good starting point for investigation.

How IP Geo-location Works

Geo-location databases use various data sources:

  • RIR Data: Regional registries provide country-level accuracy
  • ISP Data: Internet service providers provide city-level data
  • User Data: Aggregated from websites, GPS, Wi-Fi, etc.
  • Latency Measurements: Network latency helps triangulate location

Accuracy Levels

LevelAccuracyNotes
Country95-99%Highly reliable
State/Region80-90%Generally reliable
City50-80%Varies by location
Postal Code30-50%Often inaccurate
Street LevelVery LowNot reliable for IP

Geo-location Tools

MaxMind GeoIP
maxmind.com
Industry standard geo-location database. Offers free GeoLite2 and commercial GeoIP2.
IP2Location
ip2location.com
Provides IP geo-location and additional data like ISP, domain, mobile carrier.
IPinfo.io
ipinfo.io
Free tier available. Provides geo-location, ASN, and company information.
DB-IP
db-ip.com
Free and commercial geo-location database with good accuracy.
Limitations of Geo-location

- Mobile IPs may show ISP headquarters, not actual location
- VPNs and proxies will show server location, not user location
- Corporate networks may centralize internet access
- IP assignments change over time
Always corroborate geo-location with other evidence.

Steps to Identify Subscriber

  1. Document the IP: Record IP address, timestamp, timezone, and source
  2. WHOIS Lookup: Identify the ISP that owns the IP block
  3. Preservation Request: Send immediate preservation request to ISP
  4. Legal Request: Prepare Section 91/92 CrPC (or BNSS 94/95) request
  5. Submit to ISP: Submit through proper channel (nodal officer)
  6. Receive Subscriber Details: ISP provides subscriber information

Information ISPs Can Provide

  • Subscriber name and address
  • ID proof submitted during registration
  • Contact number and email
  • Service address and billing address
  • MAC address of customer premises equipment
  • Connection logs for the requested time period

Major ISP Nodal Officers

In India, major ISPs have dedicated nodal officers for law enforcement requests:

  • Airtel: Nodal Officer handles requests for Airtel Broadband, Mobile, DTH
  • Jio: Separate teams for different services
  • BSNL: Circle-wise nodal officers
  • Vodafone-Idea: Combined nodal team
  • ACT Fibernet: City-wise contacts
💡 Important Note

ISPs typically require:
- FIR copy or court order
- Exact timestamp with timezone
- IP address (and port number for CGNAT)
- Official letter on department letterhead
Response time varies from 24 hours to 2 weeks depending on ISP and case priority.

📚 Key Points
  • IP addresses can be found in email headers, server logs, website analytics, and application databases
  • WHOIS lookup provides information about the registered owner of IP blocks
  • RIRs (ARIN, APNIC, RIPE, etc.) maintain WHOIS databases for different regions
  • VPNs, proxies, and Tor are commonly used to hide real IP addresses
  • VPN detection can be done using IP databases, PTR records, and port scanning
  • Geo-location accuracy decreases from country level (95%+) to street level (very low)
  • Always include exact timestamp with timezone when requesting subscriber details from ISPs
  • Geo-location has limitations - mobile IPs and VPNs can give misleading results