Subdomain Module

The subdomain enumeration module is the cornerstone of reconFTW, discovering all subdomains associated with a target using multiple complementary techniques.


Module Overview

Function
Type
Purpose
Tools

sub_passive

Passive

API-based subdomain discovery

subfinder, github-subdomains

sub_crt

Passive

Certificate transparency logs

crt.sh

sub_noerror

Active

DNS NOERROR response analysis

dnsx

sub_brute

Active

DNS bruteforce with wordlists

puredns

sub_permut

Active

Permutation generation

gotator, ripgen

sub_ia_permut

Active

AI-powered permutations

subwiz

sub_regex_permut

Active

Regex-based permutations

regulator

sub_recursive_passive

Passive

Recursive passive enum

subfinder

sub_recursive_brute

Active

Recursive bruteforce

puredns

sub_scraping

Semi-active

Web scraping extraction

katana

sub_analytics

Passive

Google Analytics correlation

AnalyticsRelationships

sub_tls

Active

TLS certificate discovery

tlsx

sub_dns

Active

DNS record resolution

dnsx

subtakeover

Active

Subdomain takeover detection

nuclei, dnstake

zonetransfer

Active

DNS zone transfer check

dig

s3buckets

Active

S3 bucket enumeration

S3Scanner, CloudHunter


Configuration Options


Passive Enumeration

sub_passive - API-Based Discovery

The primary passive enumeration function querying multiple data sources.

Sources Queried:

  • Subfinder (50+ sources including):

    • VirusTotal

    • SecurityTrails

    • Shodan

    • Censys

    • AlienVault

    • Chaos

    • And many more...

  • GitHub subdomains

How It Works:

Output:

Configuration:

Tip: Configure API keys in ~/.config/subfinder/provider-config.yaml for better results.


sub_crt - Certificate Transparency

Queries certificate transparency logs for issued certificates.

How It Works:

Output:

Sample Findings:

Configuration:


sub_analytics - Google Analytics Correlation

Discovers related domains through shared Google Analytics IDs.

How It Works:

Output:

Why It Works: Organizations often use the same Google Analytics ID across multiple properties, revealing:

  • Related domains

  • Acquired companies

  • Partner sites

  • Development environments

Configuration:


Active Enumeration

sub_brute - DNS Bruteforcing

Performs DNS bruteforce using wordlists to discover subdomains.

How It Works:

Wordlists Used:

  • Standard: $subs_wordlist (~10k entries)

  • Deep mode: $subs_wordlist_big (~100k+ entries)

Output:

Configuration:

Performance: Bruteforcing can generate significant DNS traffic. Adjust rate limits for your environment.


sub_noerror - DNS NOERROR Analysis

Discovers subdomains by analyzing DNS NOERROR responses (domain exists but no record type).

How It Works:

Why It Works: Some DNS servers return NOERROR for existing domains even without specific records, revealing domains that standard bruteforce might miss.

Output:

Configuration:


sub_scraping - Web Scraping

Extracts subdomains from web pages, JavaScript files, and crawled content.

How It Works:

What It Finds:

  • Links in HTML

  • API endpoints in JavaScript

  • References in source maps

  • Hardcoded URLs

Output:

Configuration:


sub_tls - TLS Certificate Discovery

Discovers subdomains by connecting to TLS ports and extracting certificate information.

How It Works:

Ports Checked:

Output:

Configuration:


Permutation Techniques

sub_permut - Standard Permutations

Generates subdomain variations from discovered subdomains.

Permutation Types:

  • Prefix: dev-api, staging-api, api-v2

  • Suffix: api-dev, api-staging, api-2

  • Word insertion: api-internal, api-test

  • Number variations: api1, api2, api3

Tools:

  • gotator: Deep permutations (slower, more thorough)

  • ripgen: Fast permutations (faster, less thorough)

How It Works:

Output:

Configuration:


sub_ia_permut - AI-Powered Permutations

Uses machine learning to generate intelligent permutations based on patterns.

How It Works:

Output:

Configuration:


sub_regex_permut - Regex-Based Permutations

Analyzes subdomain patterns and generates variations using regex.

How It Works:

Output:

Configuration:


Recursive Enumeration

sub_recursive_passive

Performs passive enumeration on discovered subdomains.

How It Works:

Example:

Configuration:

Warning: This uses many API queries. Ensure you have adequate API credits.


sub_recursive_brute

Performs DNS bruteforce on discovered subdomains.

How It Works:

Configuration:

Warning: This is extremely resource-intensive. Only enable for high-value targets.


DNS Analysis

sub_dns - DNS Resolution

Resolves all discovered subdomains to IP addresses and extracts DNS records.

Records Extracted:

  • A records (IPv4)

  • AAAA records (IPv6)

  • CNAME records

  • MX records

  • TXT records

  • NS records

Output:

Sample DNS Records Output:

Configuration:


Security Checks

subtakeover - Subdomain Takeover Detection

Identifies subdomains vulnerable to takeover.

What It Checks:

  • Dangling CNAME records

  • Unclaimed cloud resources

  • Expired services

  • Misconfigured DNS

Tools Used:

  • nuclei: Takeover templates

  • dnstake: Additional checks

How It Works:

Output:

Sample Output:

Configuration:


zonetransfer - DNS Zone Transfer

Checks if DNS servers allow zone transfers (AXFR).

What It Does: Attempts zone transfer against all NS records. Successful transfers reveal all DNS records.

Output:

Configuration:

Note: Zone transfers are rarely successful but when they work, they reveal everything.


s3buckets - S3 Bucket Enumeration

Discovers S3 buckets related to the target.

Tools Used:

  • S3Scanner: Bucket discovery and permission check

  • CloudHunter: Additional cloud enumeration

Output:

Sample Output:

Configuration:


Data Flow


Output Files Summary

File
Content

subdomains/subdomains.txt

Final deduplicated subdomain list

subdomains/subdomains_passive.txt

Passive enumeration results

subdomains/subdomains_crt.txt

Certificate transparency results

subdomains/subdomains_brute.txt

Bruteforce results

subdomains/subdomains_permut.txt

Permutation results

subdomains/subdomains_scraping.txt

Web scraping results

subdomains/subdomains_analytics.txt

Analytics correlation

subdomains/subdomains_tls.txt

TLS discovery results

subdomains/subdomains_dnsrecords.txt

Full DNS records

subdomains/subdomains_zonetransfer.txt

Zone transfer results

subdomains/s3buckets.txt

S3 bucket enumeration

hosts/ips.txt

Resolved IP addresses

webs/takeover.txt

Subdomain takeover vulnerabilities


Running Subdomain Enumeration Only


Best Practices

  1. Use Fresh Resolvers: Update resolvers regularly for accurate results

  2. Enable API Keys: Configure subfinder providers for full coverage

  3. Adjust Threads: Balance speed vs. accuracy based on target size

  4. Monitor Resources: Bruteforce and permutations can use significant disk/memory

  5. Review Wildcards: Check for wildcard DNS that may cause false positives

  6. Verify Takeovers: Always manually verify takeover vulnerabilities before reporting


Next Steps

Last updated