>samit_hota
Back to research
ETHICAL HACKING

Building a High-Signal External Recon Pipeline That Actually Scales

Samit Hota·
#recon#ethical-hacking#methodology

Most external recon guides teach you how to collect 50,000 dead subdomains and call it a day. That isn’t reconnaissance—it’s log hoarding. If your recon process ends with a bloated text file of unverified hostnames, you are wasting hours poking at dead CNAME pointers, parked domains, and Cloudflare edge nodes.

A usable recon methodology doesn’t just collect data; it aggressively aggressive filters out noise. The goal is to move from an unbounded root domain down to a prioritized, ranked list of live, exposed services where high-value vulnerabilities (like unauthenticated admin portals, exposed APIs, and legacy infrastructure) actually live.

Here is the four-stage pipeline I use on every external engagement to transform raw domain lists into actionable attack surface.

Phase 1: Passive Passive Gathering Without Noise

Start by querying passive aggregators and Certificate Transparency (CT) logs. Avoid active brute-forcing at this point; you want zero network traffic hitting the target’s primary nameservers yet.

We use subfinder for multi-source aggregation and a direct curl against crt.sh to ensure we don’t miss recently issued SSL/TLS certificates.

# 1. Run subfinder across all passive sources
subfinder -d target.com -all -silent -o passive_subfinder.txt

# 2. Extract domain names directly from Certificate Transparency logs via crt.sh
curl -s "https://crt.sh/?q=%25.target.com&output=json" | \
  jq -r '.[].name_value' | \
  sed 's/\*\.//g' | \
  sort -u > passive_crt.txt

# 3. Combine and deduplicate raw findings
cat passive_subfinder.txt passive_crt.txt | sort -u > raw_passive_domains.txt

Passive sources will inevitably yield wildcard certificates (e.g., *.dev.target.com) and stale DNS records that haven’t pointed anywhere since 2018. Do not manually inspect this file.

Phase 2: Mass DNS Resolution and Wildcard Filtering

The most common trap in recon is the wildcard DNS response. If *.target.com resolves to an IP address (like an Akamai edge or a parking page), basic tools like httpx or nmap will treat every single generated subdomain as a live, unique target.

To solve this, use puredns. It runs mass DNS resolution while actively detecting and stripping wildcard responses across sub-level domains.

First, fetch a reliable set of public DNS resolvers:

curl -s https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt -o resolvers.txt

Now, resolve the passive domain list while applying wildcard detection:

puredns resolve raw_passive_domains.txt \
  -r resolvers.txt \
  --wildcard-tests 10 \
  --write resolved_domains.txt \
  --write-wildcards wildcards.txt

At this stage, resolved_domains.txt contains only domains that actively resolve to real IP addresses and are not caught in a blanket wildcard response.

Phase 3: Targeted Service Probing and HTTP Fingerprinting

Do not run a full 65,535-port Nmap scan across all resolved IPs right away. It takes too long, triggers SOC alerts prematurely, and mostly returns closed ports. Instead, probe for common web services and administrative interfaces across a targeted subset of ports: 80, 443, 8000, 8080, 8443, 8888, 9000, 9090, 9443.

We use httpx to extract status codes, page titles, CNAME records, technology stacks, and response lengths into structured JSON output.

httpx -l resolved_domains.txt \
  -ports 80,443,8000,8080,8443,8888,9000,9090,9443 \
  -status-code \
  -tech-detect \
  -title \
  -content-length \
  -location \
  -json \
  -o http_services.json

The output file http_services.json now contains full metadata for every active web listener on the target domain.

Phase 4: Transforming Raw JSON into a Ranked Attack Surface

This is where most security professionals stop, and it’s where the actual methodology begins. A list of 1,200 web services is still too much noise. You need to slice this dataset into actionable buckets based on high-risk indicators.

We use jq to query http_services.json and extract specific categories of interest.

Priority 1: High-Risk Internal and Middleware Technologies

Filter for administrative endpoints, internal tooling, and CI/CD/monitoring stacks (e.g., Jenkins, Grafana, Spring Boot, Swagger, Consul, Kibana).

cat http_services.json | jq -r '
  select(.tech[]? | test("Jenkins|Grafana|Swagger|Spring|Kubernetes|Consul|Kibana|Prometheus"; "i")) |
  "[\(.status_code)] \(.url) - Tech: \(.tech | join(", "))"'

Priority 2: Non-Standard Web Ports

Services running on non-standard ports (like 8443 or 9000) are far more likely to be unmonitored development instances or raw administrative portals that bypassed the main WAF.

cat http_services.json | jq -r '
  select(.port != 80 and .port != 443) |
  "[\(.status_code)] \(.url) (\(.title // "No Title"))"'

Priority 3: HTTP 403 / 401 Forbidden Endpoints

A 403 Forbidden isn’t a dead end—it’s an confirmation that an internal asset exists behind an access control list. These are prime candidates for host header injection, path normalization tricks (/admin/..;/), or origin-server IP bypasses.

cat http_services.json | jq -r '
  select(.status_code == 403 or .status_code == 401) |
  "\(.url) [Code: \(.status_code)] [Server: \(.webserver // "Unknown")]"'

Priority 4: Staging, Dev, and Environment Specific Subdomains

Regex search page titles and URLs for explicit staging and development keywords that frequently run verbose debugging, default credentials, or unpatched code.

cat http_services.json | jq -r '
  select(.url | test("dev|stage|stg|test|internal|admin|vpn|corp"; "i")) |
  "[\(.status_code)] \(.url) - Title: \(.title // "N/A")"'

Executing on the Output

By executing this four-phase pipeline, you convert thousands of unverified external subdomains into four clear lists of prioritized targets:

  1. Exposed internal tech stacks -> Test for default credentials and CVEs.
  2. Non-standard web ports -> Inspect for unmanaged microservices and origin bypasses.
  3. 401/403 endpoints -> Attempt path traversal, HTTP header smuggling, and proxy bypasses.
  4. Dev/Staging hosts -> Check for verbose stack traces, missing auth, and source code disclosure.

Recon is not about collecting the biggest domain list; it’s about systematically reducing vast corporate external footprints down to the few assets the defense team forgot they were running.

Want a second set of eyes on your security posture?

Let's talk about where your real exposure is.

Book an advisory call