How NetTrace Works

A deep dive into every step of the scan pipeline — from the moment you press Trace to the final security score.

The Scan Pipeline

When you enter a domain or IP and hit Trace, NetTrace orchestrates 27 intelligence modules across 3 parallel threads. Here's the high-level flow:

Input
Domain / IP / MAC
Classify
Type detection & validation
Resolve
DNS → Primary IP
3 Threads
Parallel execution
Score
Security grade A–F
Results
Live dashboard
Thread 1 Main Intelligence

Runs up to 12 workers concurrently in a ThreadPool. Two phases:

Phase 1 — Independent
DNS, WHOIS, SSL, Geo, HTTP, WAF, Tech, Screenshot, Email, Robots, TLS Ciphers, Social, CSP, CT Logs, Domain Age, Reputation, DNSSEC, Propagation
Phase 2 — Dependent
CVE Lookup, Vulnerability Checks, Subdomain Takeover (uses Phase 1 data)
Thread 2 Port Scanning

Isolated thread — runs separately because port scans are slow and rate-limited.

Rate limited: 1 scan per 30 min (unauthenticated)
5 depth levels (Light → Deep)
Includes banner grabbing & HTTP probing
Thread 3 Traceroute

Network path tracing with real-time hop-by-hop geo-mapping on an interactive map.

System traceroute with ping fallback
Concurrent geoIP lookups per hop
First 3 hops hidden (infra protection)

Module Deep Dive

Every module explained — what it does, how it works under the hood, and what data you get back.

DNS Intelligence
DNS records, DNSSEC validation & global propagation
How it works

NetTrace uses the dnspython library to query authoritative DNS servers for 7 record types: A (IPv4), AAAA (IPv6), MX (mail), TXT (SPF, verification), NS (nameservers), CNAME (aliases), and SOA (authority). Each resolved IP gets a reverse DNS (PTR) lookup to map IPs back to hostnames.

DNSSEC Validation

A separate module checks DNSSEC by querying for DNSKEY, DS (Delegation Signer), and RRSIG records using EDNS (Extension Mechanisms for DNS). This verifies the cryptographic chain of trust from root servers to the domain.

Propagation Check

Queries 8 global resolvers simultaneously (Google 8.8.8.8, Cloudflare 1.1.1.1, Quad9 9.9.9.9, OpenDNS, CleanBrowsing, Yandex, DNSPod, KT) to verify the domain resolves consistently worldwide. Detects DNS propagation issues after recent changes.

Data returned
A / AAAA records
MX mail servers
TXT records (SPF)
NS nameservers
CNAME aliases
SOA authority
Reverse DNS (PTR)
DNSSEC status
8-resolver propagation
domain.com
DNS Resolvers
7 Record Types
8 Global Checks
SSL & Security
Certificate analysis, TLS ciphers, security headers & reputation
SSL Certificate

Connects to the target via TLS using Python's ssl module and the cryptography library. Extracts the full X.509 certificate: subject, issuer chain, serial number, validity period, days until expiry, negotiated cipher suite, public key size (RSA/ECDSA), and all Subject Alternative Names (SANs).

TLS Cipher Analysis

Tests TLS version support by attempting connections with TLS 1.0, 1.1, 1.2, and 1.3 separately. Identifies deprecated protocols, checks for forward secrecy (ECDHE/DHE key exchange), and flags weak cipher suites.

Security Headers

Audits 9 critical HTTP security headers: HSTS, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, COOP, CORP, and X-XSS-Protection. Each missing header is flagged with its risk level.

IP Reputation

Checks the resolved IP against 6 DNS-based blacklists (Spamhaus ZEN, SpamCop, SORBS, Barracuda, CBL) using reverse DNS queries. Reports clean/listed status per blacklist.

Data returned
Certificate details
Issuer chain
Expiry countdown
SANs list
TLS version support
Cipher strength
Forward secrecy
9 header audits
6 blacklist checks
TLS Handshake
X.509 Parse
Cipher Probe
Header Audit
WHOIS & Registration
Domain ownership, registrar, dates & domain age
3-Layer WHOIS Fallback

NetTrace uses a sophisticated 3-layer approach to maximize coverage across all TLDs:

1
python-whois library
Standard WHOIS protocol for common TLDs (.com, .net, .org, etc.)
2
Raw socket WHOIS
Direct TCP port 43 queries to 111+ specialized WHOIS servers for exotic TLDs. Includes IANA server auto-discovery.
3
Web WHOIS scrapers
HTTP-based WHOIS for registries that don't support port 43 (e.g. .mt, .za).
Domain Age & Archive

Calculates domain age from WHOIS creation date and queries the Wayback Machine CDX API for historical snapshot count, earliest and latest captures. Provides a complete registration timeline.

Data returned
Registrar name
Creation date
Expiration date
Nameservers
Domain status
Domain age
Wayback snapshots
Archive timeline
python-whois
fail? ↓
Raw socket :43
fail? ↓
Web scraper
IP Geolocation
Physical location, ISP, organization & ASN mapping

Uses the ip-api.com geolocation API with batch support for up to 100 IPs per request. Maps each IP to its physical location, network provider, and autonomous system.

The resolved coordinates are plotted on an interactive Leaflet.js map with custom styling for both dark and light themes, showing the server's approximate location with ISP/ASN details.

Data returned
Country & region
City & coordinates
Timezone
ISP name
Organization
ASN number
Traceroute Mapping
Interactive network path visualization with geo-mapping
Path Tracing

Executes the system traceroute command with a fallback to TTL-based ping probing when traceroute is unavailable. Each hop's IP is resolved via concurrent geoIP lookups using a ThreadPool.

Live Map

Results stream in real-time to a Leaflet.js map. Each hop appears as an animated dot with polyline connections. The origin is green, intermediate hops are blue with gradient styling, and the destination is red. Popups show latency, provider, ASN, and location per hop.

Privacy

The first 3 hops are hidden and replaced with masked entries to protect internal network infrastructure. Configurable hop limit: 5–50 hops (max 20 for unauthenticated users).

Per-hop data
IP address
Hostname
Latency (ms)
City & country
Coordinates
ASN & provider
You (origin)
→ hop 1 → hop 2 → ...
Intermediate
→ ... →
Destination
Web Analysis
Screenshot, WAF, protocols, tech stack, cookies & content security
Screenshot

Captures a full-page screenshot using headless Chromium. SSRF-protected — rejects private/internal IPs before connecting. The screenshot is stored and served for visual preview.

WAF & CDN Detection

Fingerprints WAF/CDN providers by matching response headers and cookies against a signature database: Cloudflare, AWS WAF, Akamai, Imperva, F5 BIG-IP, Sucuri, and more.

Protocol Detection

Tests HTTP/2 support via ALPN negotiation during TLS handshake and HTTP/3 (QUIC) via Alt-Svc header analysis. Reports supported protocol versions.

Technology Stack

Detects server software, frameworks, CMS platforms, analytics tools, and JS libraries by scanning HTTP headers (Server, X-Powered-By) and HTML content against regex patterns.

Cookie Audit

Audits every cookie for security flags: Secure, HttpOnly, SameSite, and __Host- / __Secure- prefix compliance. Each cookie gets a security score.

Content Security

Scans page content for mixed content (HTTP resources on HTTPS pages), counts inline scripts, catalogs external script domains, and detects unencrypted form submissions.

Robots.txt & Sitemap

Fetches and parses robots.txt and sitemap.xml. Detects exposed sensitive paths matching keywords like admin, api, backup, config, and database. Lists sitemap URLs.

Data returned
Visual screenshot
WAF / CDN vendor
HTTP/2 & HTTP/3
Technology list
Subdomains
Reverse IP hosts
Cookie audit
Mixed content
Inline scripts
Robots.txt rules
Sensitive paths
Port Scanning
TCP port probing, service detection & banner grabbing
TCP Probing

Uses raw TCP socket connections with a 2-second timeout to probe each port. Open ports are fingerprinted: known service ports get a named label (SSH, HTTP, MySQL, etc.), and banner-grabbing is performed on common banner ports (FTP, SSH, SMTP, etc.).

5 Depth Levels
Light 20 most common ports
Basic ~100 well-known ports
Standard ~1,000 common service ports
Thorough ~2,500 registered ports
Deep ~10,000 ports (full scan)

Levels 2–5 require authentication. Rate limited to 1 scan per 30 minutes for unauthenticated users.

Per-port data
Port number
Open / closed
Service name
Banner data
HTTP probe
Email, Social & OSINT
Email authentication (SPF/DKIM/DMARC), social profiles, CT logs
Email Authentication

DNS lookups for SPF, DKIM, and DMARC records. Analyzes policy strength, mechanism details, and spoofability risk. Produces a composite email security score (0–3).

Social Discovery

Scans the target's HTML for social media profiles (Twitter, Facebook, LinkedIn, Instagram, GitHub, YouTube, TikTok, Reddit), email addresses (mailto: links), and phone numbers using regex pattern matching.

Certificate Transparency

Queries crt.sh (Certificate Transparency log aggregator) for every SSL certificate ever issued for the domain. Returns issuer breakdown, date range, and all SANs — useful for discovering subdomains.

Subdomain Takeover

Checks discovered CNAME targets against known vulnerable hosting services (S3, Heroku, GitHub Pages, Netlify, Azure, etc.) and scans for takeover fingerprint strings in responses.

Data returned
SPF record & policy
DKIM presence
DMARC policy
Spoofability score
Social profiles
Email addresses
CT log certificates
Takeover vulnerable
Vulnerability & CVE Analysis
Known CVEs, clickjacking & open redirect testing
CVE Lookup

Maps detected software versions (from HTTP headers and tech detection) to CPE vendor/product patterns, then queries the National Vulnerability Database (NVD) API. Returns matching CVEs with severity levels (Critical, High, Medium, Low) and affected version ranges.

Clickjacking Test

Analyzes X-Frame-Options and Content-Security-Policy frame-ancestors headers to determine if the site is vulnerable to clickjacking/UI redress attacks.

Open Redirect Test

Tests common URL parameter names (url, redirect, next, return, goto) with redirect payloads to detect open redirect vulnerabilities.

Data returned
CVE identifiers
CVSS severity
Affected software
Clickjacking risk
Open redirect risk

Security Score

After all modules complete, NetTrace computes a composite security grade (A–F) from weighted categories:

25 pts
SSL Certificate
Valid cert, not expired, strong key
27 pts
Security Headers
HSTS, CSP, X-Frame-Options & more (3 pts each)
15 pts
IP Reputation
Clean across 6 DNS blacklists
13 pts
Open Ports
Fewer open ports = higher score
10 pts
HTTPS Redirect
HTTP → HTTPS automatic redirect
10 pts
DNSSEC
Signed DNS with valid chain of trust
10 pts
Email Security
SPF + DKIM + DMARC present
8 pts
Cookie Security
Secure, HttpOnly & SameSite flags
A 90–100 B 75–89 C 60–74 D 40–59 F 0–39

Rate Limits & Authentication

Unauthenticated
  • 5 scans per 30 minutes
  • 1 port scan per 30 minutes
  • Port scan: Light level only
  • Traceroute: max 20 hops
  • Major domains blocked
Authenticated
  • Unlimited scans
  • Unlimited port scans
  • All 5 port scan levels
  • Traceroute: up to 50 hops
  • All domains scannable

Tech Stack

Python 3 & Flask Backend & API
Bootstrap 5 UI framework
Leaflet.js Interactive maps
SQLite Results database
Back to NetTrace