Host Module

The host analysis module examines the infrastructure behind discovered assets, including port scanning, CDN detection, WAF identification, cloud enumeration, and geolocation.


Module Overview

Function
Purpose
Tools

portscan

Port discovery (passive + active)

nmap, smap

cdnprovider

CDN detection and filtering

cdncheck

waf_checks

WAF detection

wafw00f

favicon

Real IP discovery via favicon

fav-up

cloud_extra_providers

Extra cloud storage enumeration

curl

geo_info

IP geolocation

ipinfo

banner_grabber

Service banner extraction

nmap


Configuration Options

# In reconftw.cfg

# Master toggle
PORTSCANNER=true

# Port scanning
PORTSCAN_PASSIVE=true     # Shodan-based (requires API key)
PORTSCAN_ACTIVE=true      # Nmap-based

# Nmap options
PORTSCAN_ACTIVE_OPTIONS="--top-ports 200 -sV -n -Pn --open --max-retries 2 --script vulners"

# Other host checks
FAVICON=true              # Favicon IP discovery
CDN_IP=true               # CDN detection
GEO_INFO=true             # Geolocation
WAF_DETECTION=true        # WAF detection

# IPv6
IPV6_SCAN=true            # IPv6 discovery

Port Scanning

Passive Port Scanning (Shodan)

Uses Shodan API to retrieve port/service information without touching the target.

How It Works:

Advantages:

  • No direct target interaction

  • Historical data available

  • Fast results

Limitations:

  • Requires Shodan API key

  • Data may be outdated

  • Only indexed hosts

Output:

Sample Output:

Configuration:


Active Port Scanning (Nmap)

Performs direct port scanning against target IPs.

How It Works:

Default Scan Options:

Option Breakdown:

Option
Description

--top-ports 200

Scan top 200 ports

-sV

Version detection

-n

No DNS resolution

-Pn

Skip host discovery

--open

Show only open ports

--max-retries 2

Retry limit

--script vulners

Check for CVEs

Output:

Sample Output:

Configuration:

Custom Scan Profiles:


CDN Detection

cdnprovider - CDN Identification

Identifies IPs behind CDN providers to avoid scanning CDN infrastructure.

Why It Matters:

  • CDN IPs don't represent the actual target

  • Scanning CDNs wastes resources

  • May violate CDN terms of service

  • Focus on real infrastructure

CDN Providers Detected:

  • Cloudflare

  • Akamai

  • Fastly

  • CloudFront

  • Incapsula

  • And many more...

How It Works:

Output:

Sample Output:

Configuration:


WAF Detection

waf_checks - Web Application Firewall Detection

Identifies WAF/security products protecting web applications.

WAFs Detected:

  • Cloudflare

  • AWS WAF

  • Akamai

  • Imperva/Incapsula

  • ModSecurity

  • Sucuri

  • F5 BIG-IP

  • And 100+ more...

How It Works:

Output:

Sample Output:

Why It Matters:

  • Adjust attack strategies

  • Understand defensive posture

  • Identify bypass opportunities

  • Report in findings

Configuration:


Favicon Analysis

favicon - Real IP Discovery

Discovers real IP addresses behind CDN/proxy by analyzing favicon hashes.

How It Works:

Technique:

  1. Download favicon from target

  2. Calculate hash (MurmurHash3)

  3. Search Shodan for matching hashes

  4. Servers with same favicon may be the real origin

Output:

Sample Output:

Configuration:


Geolocation

geo_info - IP Geolocation

Retrieves geographic information for discovered IP addresses.

Information Gathered:

  • Country

  • Region/State

  • City

  • Organization/ISP

  • ASN

How It Works:

Output:

Sample Output:

Use Cases:

  • Understand infrastructure distribution

  • Identify hosting providers

  • Compliance/jurisdiction issues

  • Attack surface mapping

Configuration:


Cloud Storage Enumeration

cloud_extra_providers - Extra Cloud Provider Checks

Discovers misconfigured cloud storage buckets beyond standard S3 enumeration.

Cloud Providers Checked:

  • Google Cloud Storage (GCS)

    • https://storage.googleapis.com/{name}/

    • https://{name}.storage.googleapis.com/

  • Azure Blob Storage

    • https://{name}.blob.core.windows.net/{container}

    • Tests common containers: public, static, media, images, assets, backup, files, cdn

How It Works:

Name Generation:

  1. Domain root (e.g., "example" from "example.com")

  2. Company name variations

  3. Subdomain prefixes (e.g., "api", "dev", "staging")

  4. Combined with common container names

Output:

Sample Output:

What It Finds:

  • Publicly accessible storage buckets

  • Buckets returning 403 (exist but restricted - worth manual testing)

  • Misconfigured backup/static file storage

Security Implications:

  • Public buckets may contain sensitive data

  • 403 responses confirm bucket existence (enumeration value)

  • Backup buckets often contain valuable data

Note: This complements the OSINT module's cloud_enum function by testing additional providers and name variations.


IPv6 Scanning

IPv6 Discovery and Scanning

Discovers and scans IPv6 addresses when available.

How It Works:

Configuration:

Note: IPv6 scanning may reveal additional attack surface not visible via IPv4.


Data Flow


Output Files Summary

File
Content

hosts/ips.txt

All resolved IP addresses

hosts/cdn.txt

IPs identified as CDN

hosts/portscan_passive.txt

Shodan port results

hosts/portscan_active.txt

Nmap scan results

hosts/portscan_active.xml

Nmap XML output

hosts/portscan_active.gnmap

Nmap greppable output

hosts/waf.txt

WAF detection results

hosts/geo.txt

Geolocation data

hosts/favicontest.txt

Favicon real IP discovery

hosts/grpc_reflection.txt

gRPC services with reflection

subdomains/cloud_extra.txt

Extra cloud storage findings


Integration with Vulnerability Scanning

Host analysis results feed into vulnerability scanning:

  1. Port scan results → Password spraying targets

  2. Service versions → CVE matching (vulners script)

  3. Non-CDN IPs → Focus active testing

  4. WAF detection → Adjust attack strategies


Best Practices

  1. CDN Awareness: Don't waste resources scanning CDN IPs

  2. Rate Limiting: Aggressive port scans can trigger alerts

  3. Authorization: Ensure port scanning is in scope

  4. Service Detection: Version info helps identify vulnerabilities

  5. Passive First: Start with Shodan to minimize noise

  6. IPv6 Coverage: Don't forget IPv6 attack surface


Nmap Scan Customization

Quick Discovery

Full Scan

Stealth Scan

Service Focus


Next Steps

Last updated