Open Source Intelligence Techniques

OSINT Techniques: Chapter 17 - IP Addresses & Networks

An exhaustive breakdown of Chapter 17 of Michael Bazzell's 'Open Source Intelligence Techniques', analyzing IP address reconnaissance, BGP routing tables, ASN allocations, Shodan banner queries, and cryptographic JARM fingerprinting.

8 min read
views
visits
OSINT Techniques Chapter 17 Summary - IP Addresses & Networks
OSINT Techniques Chapter 17 Summary - IP Addresses & Networks

Welcome to our seventeenth chapter analysis covering “Open Source Intelligence Techniques: Resources for Searching and Analyzing Online Information” (Sixth Edition) by Michael Bazzell.

While domain names provide human-readable labels, the internet operates strictly on IP addresses and Autonomous Systems (ASNs). Every network packet routed across the global backbone traverses routers governed by the Border Gateway Protocol (BGP). To the cyber intelligence analyst, network engineer, or offensive security researcher, an IP address is an immutable anchor linking a server to its hosting provider, geographic data center, operating network owner, and adjacent exposed services.

In Chapter 17: IP Addresses & Networks, Bazzell navigates the technical core of internet routing. An investigator does not merely run a simple ping; they interrogate BGP routing tables, map Autonomous System Numbers (ASNs), harvest internet-wide scan banners via Shodan and Censys, and pivot across cryptographic TLS fingerprints (JARM, JA3/JA4). In this comprehensive guide, we dissect network intelligence tradecraft.


Key Takeaways

  • The Architecture of Autonomous Systems (ASNs): The global internet is not a single unified web; it is an aggregation of over 100,000 independent networks called Autonomous Systems (ASNs). Knowing a target’s ASN exposes their entire allocated IP CIDR block ranges.
  • BGP Routing as Ground Truth: Querying BGP routing tables reveals which internet service providers announce routes for a target’s IP prefix, uncovering upstream transit providers and multi-homed failover links.
  • Passive Internet Scanners (Shodan & Censys): Rather than scanning a target’s IP directly (which triggers intrusion detection systems), investigators query passive scanning engines that scan the entire IPv4 address space continuously, retrieving open ports, software banners, and SSL certificates out-of-band.
  • Cryptographic JARM Fingerprinting: JARM is an active TLS server fingerprinting tool developed by Salesforce. By sending 10 crafted TLS Client Hello packets and hashing the server’s responses, JARM generates a unique 62-character hexadecimal fingerprint that identifies specific Cobalt Strike command-and-control (C2) servers, Metasploit listeners, or custom malware backends.

Architectural & Investigative Workflow

The following flowchart outlines the network infrastructure reconnaissance and fingerprinting lifecycle:

flowchart TD
    subgraph IP_Discovery["Phase 1: Seed IP & ASN Resolution"]
        DomainOrIP["Target Domain or IP Address"] --> DNS["Resolve Public A / AAAA Records"]
        DNS --> ASN["Query BGP Routing Table & ASN Allocation (Hurricane Electric BGP)"]
        ASN --> CIDR["Identify Complete Corporate IP Range (e.g., 198.51.100.0/24)"]
    end
    subgraph Passive_Scanning["Phase 2: Passive Internet Scan Harvesting"]
        CIDR --> Shodan["Query Shodan API (net:198.51.100.0/24)"]
        CIDR --> Censys["Query Censys Search Engine (services.banner:*)"]
        Shodan --> PortAudit["Exposed Services, Open Ports, Software Banners"]
        Censys --> PortAudit
    end
    subgraph Cryptographic_Fingerprinting["Phase 3: TLS & Protocol Fingerprinting"]
        PortAudit --> JARM["Execute JARM Fingerprint Probe on Discovered TLS Ports"]
        JARM --> C2Pivot["Pivot on Unique JARM Hashes to Find Undisclosed C2 Nodes"]
    end
    subgraph Attribution_Synthesis["Phase 4: Network Infrastructure Dossier"]
        PortAudit --> NetworkDossier["Complete Network Attack Surface & Threat Attribution"]
        C2Pivot --> NetworkDossier
    end

Technical Breakdown & Investigative Mechanics

1. BGP Routing & Autonomous System Number (ASN) Interrogation

Every enterprise of significant scale operates its own Autonomous System Number (ASN) assigned by regional internet registries (ARIN, RIPE, APNIC):

1
2
3
4
5
6
# Step 1: Identify the ASN governing a target IP address using whois
whois -h whois.cymru.com "198.51.100.25"

# Sample Output:
# AS      | IP               | AS Name
# 13335   | 198.51.100.25    | CLOUDFLARENET, US

Querying Hurricane Electric BGP Toolkit (bgp.he.net):

Navigating to https://bgp.he.net/AS13335 reveals:

  • Prefixes Originated: Every IPv4 and IPv6 block routed by this organization.
  • BGP Peers & Upstream Providers: The transit networks carrying traffic for this entity.
  • IXP Presence: Internet Exchange Points where the network physically peers with other carriers.

2. Passive Internet-Wide Reconnaissance via Shodan CLI

The Shodan command-line interface allows automated querying of exposed internet infrastructure without interacting directly with the target:

1
2
3
4
5
6
7
8
# Initialize Shodan CLI with your API key
shodan init YOUR_SHODAN_API_KEY

# Query all exposed assets inside a target corporate CIDR block
shodan search "net:198.51.100.0/24" --fields ip_str,port,org,hostnames

# Search for specific exposed administrative interfaces belonging to an organization
shodan search "org:'Target Corporation' product:'Apache httpd' port:8080"

High-Value Shodan Search Filters for Investigators:

  • net:"x.x.x.x/24": Restricts results to an exact subnet.
  • ssl.cert.subject.CN:"target-corp.com": Discovers all IP addresses hosting an SSL certificate for the target domain (bypassing CDN/WAF proxies).
  • vuln:"CVE-2023-34362": Identifies servers vulnerable to specific unpatched vulnerabilities within a corporate IP range.
  • has_screenshot:true: Surfaces open VNC, RDP, and industrial SCADA interfaces with visual desktop captures.

3. Cryptographic JARM Server Fingerprinting

JARM generates a 62-character hash representing how a server’s TLS stack negotiates cryptographic ciphers:

1
2
3
4
# Clone and execute the JARM scanner
git clone https://github.com/salesforce/jarm.git
cd jarm
python3 jarm.py 198.51.100.25 -p 443

Sample JARM Hash:

1
29d29d00029d29d21c41d41d00041d446101c0c00000000000000000000000

Why JARM is a Threat Hunter’s Secret Weapon:

  1. Malware C2 Tracking: Standard installations of Cobalt Strike, Mythic, or Sliver command-and-control frameworks running on default Kali Linux configurations produce identical, highly specific JARM hashes.
  2. Pivoting to Undisclosed Infrastructure: Once a threat actor’s C2 JARM hash is identified, querying Shodan for:
    1
    
    ssl.jarm:29d29d00029d29d21c41d41d00041d446101c0c00000000000000000000000
    

    Instantly reveals all other C2 servers deployed by the same threat actor globally, regardless of domain name or hosting provider.


4. Bypassing Cloudflare & Reverse Proxies to Find Origin IPs

Adversaries and enterprises place reverse proxy CDNs (such as Cloudflare or Akamai) in front of web servers to mask the true origin IP address.

graph LR
    User["Public Internet Traffic"] --> WAF["Cloudflare Reverse Proxy (Masks Real IP)"]
    WAF --> Origin["Real Backend Origin Web Server (Exposed on Unprotected IP)"]

Methodologies to Locate the True Origin IP:

  1. Historical DNS A-Record Lookups: Check historical DNS databases (SecurityTrails, ViewDNS.info) for the IP address the domain pointed to before Cloudflare was deployed.
  2. SSL Certificate Serial Number Pivoting:
    • Inspect the target’s current SSL certificate serial number.
    • Query Censys for that exact certificate serial:
      1
      
      services.tls.certificates.leaf_data.serial_number: "1234567890ABCDEF"
      
    • Censys returns every public IP hosting that certificate, frequently revealing the real origin server listening on port 443 with direct access.

Real-World Case Scenario

Case Study: Unmasking a Ransomware Operation’s Master C2 Server

A ransomware group was encrypting healthcare networks, leaving ransom notes directing victims to an anonymized Tor .onion negotiation portal.

Threat intelligence analysts engaged in active network tracking:

  1. An incident responder recovered a compiled malware sample from an infected workstation.
  2. Static analysis revealed a hardcoded fallback IP address: 203.0.113.88:8443.
  3. Running JARM against 203.0.113.88:8443 generated a unique signature: 2ad2ad16d2ad2ad22c2ad2ad2ad2ad....
  4. Querying Shodan for that exact JARM hash returned 14 other IP addresses across three bulletproof hosting providers in Eastern Europe.
  5. One of the servers had an open SSH port displaying an internal banner: OpenSSH_8.2p1 Ubuntu-4ubuntu0.5-internal-dev-vault.
  6. Law enforcement issued a preservation request to the upstream hosting provider, seizing the master decryptor database and releasing the decryption keys to victims for free.

Defensive Countermeasures & OpSec Recommendations

For cloud architects, network administrators, and enterprise defenders:

  1. Enforce Strict Egress and Ingress Firewall Whitelisting on Origin Servers: Configure origin web servers to accept incoming HTTP/HTTPS traffic strictly from Cloudflare’s published IP ranges, dropping all direct internet connections.
  2. Sanitize Outbound Email Headers: Ensure internal application servers sending automated customer emails (e.g., password resets) do not leak origin internal IP addresses in the Received: headers.
  3. Randomize TLS Handshake Configurations to Obfuscate JARM: Configure web servers with non-standard cipher order preference to alter the default JARM signature, preventing automated adversary clustering.

Conclusion & Next Steps

Chapter 17 demonstrates that IP addresses, BGP routing, and cryptographic TLS handshakes reveal the physical and logical realities of internet infrastructure. By combining BGP table analysis, passive Shodan scanning, and JARM fingerprinting, an investigator can track infrastructure across the globe.

In Chapter 18: Government & Corporate Records, we pivot from network infrastructure to corporate legal entities: OpenCorporates APIs, SEC EDGAR 10-K mining, and global maritime shipping bills of lading.


Practical IP Intelligence & BGP Routing Cheat-Sheet

Intelligence Vector Tool / Command Syntax Actionable Finding
BGP Routing & ASN Lookup whois -h whois.radb.net <IP_ADDRESS> Identifies Autonomous System Number (ASN), routing organization, and CIDR prefix block
Shodan Threat Footprint shodan host <IP_ADDRESS> Enumerates exposed open ports, running banners, TLS certificates, and CVE vulnerabilities
IP Geolocation & Hosting Category curl -s 'https://ipinfo.io/<IP_ADDRESS>/json' Resolves geographic coordinates, ASN name, and flags whether IP is Datacenter or Residential
Route Hop & Peering Trace mtr --report --report-cycles=10 <TARGET_HOST> Maps packet routing latency, transit providers, and geographic egress gateways
Reverse DNS PTR Resolution dig +short -x <IP_ADDRESS> Resolves canonical pointer record pointing to internal hostname conventions

Authoritative References & Verified Investigative Sources


Author: Abdulrahman M. Fathi (0x3bdo) • Cyber Security Engineer & Penetration Tester

Open Research & Community Labs
صدقة جارية • Ongoing Charity

Empowering the Cybersecurity Community

All research, lab walkthroughs, and technical series on this platform remain 100% free. You can support server hosting, research environments, and lab infrastructure.

Support & Wall of Honor
اللهم اجعل هذا العمل علمًا نافعًا وصدقةً جارية، واكتب لي به الأجر والقبول، وانفع به كل من قرأه أو تعلّمه.
اللهم احفظ لي والديّ وأهلي، وبارك في أعمارهم وصحتهم، وأدم عليهم نعمة الصحة والعافية، ولا تريني فيهم بأسًا يبكيني.
Dedicated as ongoing charity and beneficial knowledge. May Allah bless my parents and family, protect them, and grant them lasting health and happiness.