VHost & SNI Enumeration
The VHost & SNI module discovers hidden virtual hosts living on each target IP. Modern infrastructure routinely puts dozens of distinct applications behind a single IP — admin panels, staging environments, internal APIs, k8s ingress backends — and DNS rarely advertises all of them. The module probes every candidate hostname against every target IP at two layers (HTTP Host: header and TLS SNI) and flags responses that diverge from the bare-IP baseline.
It runs as GROUP 6 Phase A (parallel with Nuclei, GraphQL Security, and Subdomain Takeover). Disabled by default. Enable in the project settings under the VHost & SNI Enumeration tab.
Why two layers
Web routing happens at two different points in the request lifecycle, and the ecosystem is split across both:
| Layer | What we lie about | Catches | Misses |
|---|---|---|---|
| L7 (HTTP Host header) | The HTTP Host: header sent inside the TLS tunnel | Classic Apache/Nginx vhosts that route on the application layer | Modern reverse proxies that decide where to send the connection before parsing HTTP |
| L4 (TLS SNI) | The hostname in the TLS ClientHello (server_name extension) | k8s ingress controllers, NGINX-ingress, Traefik, Cloudflare, AWS ALB SNI listeners — anything that routes at the TLS handshake | Plain Apache vhosts that only look at Host: |
Sending only one of the two leaves whole classes of hidden infrastructure undetected. The module sends both per candidate, so coverage compounds. When the L7 and L4 responses serve different pages for the same hostname, that itself is a high-severity finding (host_header_bypass, "Routing Inconsistency (L7 vs L4)") — a primitive for bypassing edge controls that filter at one layer but not the other. When both layers reach the same page, the name is a hidden vhost seen twice: hidden_vhost, "Hidden Virtual Host", with layer: "both".
Pipeline position
GROUP 5 - Resource enumeration (Katana, Hakrawler, jsluice, FFuf, GAU, Kiterunner, Arjun)
GROUP 5b - JS Reconnaissance
GROUP 6 Phase A - Nuclei || GraphQL Security || Subdomain Takeover || VHost & SNI <- parallel fan-out
GROUP 6 Phase B - MITRE enrichment (consumes Nuclei CVEs)
Phase A tools are launched via ThreadPoolExecutor. Every scanner is handed one deep copy of the shared combined_result, taken before the first one starts, and its _isolated wrapper copies it again, so no scanner reads the dict while finished answers are merged into it. VHost & SNI pulls inputs from earlier groups (port_scan IPs/ports, http_probe TLS SAN data, DNS resolver map, ExternalDomain co-residency).
Wall-time cost when added to a full scan: typically zero. Nuclei dominates this group at 5-30 minutes, while VHost & SNI completes in 5-15 seconds for a single-IP target with the default wordlist.
Target collection
The module assembles a per-IP scan plan from combined_result:
| Layer | Source in recon_data | Purpose |
|---|---|---|
| IP targets | port_scan.by_host[*].ip + ports list. Falls back to dns.subdomains[*].ips.ipv4 with default 80/443 when port_scan didn't run | Each IP gets its own baseline + candidate sweep |
| Per-IP candidate hostnames | Six in-scope sources merged + deduped per IP (see below) | The list of hostnames to test against the IP |
Candidate sources per IP
For each IP, the module merges hostnames from up to seven sources, lowercases everything, drops duplicates, and filters via _is_valid_hostname:
Subdomainnodes that resolve to this IP (viaRESOLVES_TO)ExternalDomainnodes that resolve to the same IP — out-of-scope subdomains co-resident on the IP, often the highest-signal source- TLS Subject Alternative Names captured on every
BaseURLserved from this IP — wildcard*.acme.comis stripped toacme.com - CNAME targets from
DNSRecordentries - Default wordlist (~2,380 curated admin/dev/staging/internal/modern-stack prefixes shipped with the recon image, expanded as
{prefix}.{target_apex}). Not used on a shared CDN edge IP (see No wordlist on a shared CDN edge) - Custom wordlist uploaded per-project — bare prefixes are expanded against the apex, full hostnames (containing a dot) are used as-is
The combined set is capped at VHOST_SNI_MAX_CANDIDATES_PER_IP (default 2,000) per IP. Excess candidates are dropped deterministically (sorted alphabetically) so reruns hit the same set.
In an IP-mode project the candidates follow IP mode and Hostnames on target IPs instead.
A name public DNS already points at the IP is never "hidden"
A hidden vhost is a site with no public DNS for the IP that serves it. A name this run's DNS already points at the IP is public, so it is never reported as a Hidden Virtual Host, however much its page differs from the raw-IP answer. On a shared CDN or proxy IP every customer's site differs from the default page, so before this rule each such name was reported as hidden.
The names counted as DNS-known for an IP are the ones whose current A/AAAA in this run include it: the subdomains and the apex in the run's DNS block, and the names httpx resolved to it (certificate-SAN and JS names join the DNS block without addresses and are resolved by httpx later).
Those names are still probed, because a routing inconsistency on one (L7 and L4 serving different pages) is a finding whatever DNS says. Such a finding carries dns_known: true, leaves vhost_hidden: false on its Subdomain, and is never injected as a new BaseURL. Every other anomaly on a DNS-known name is set aside and counted in the IP's vhost_sni_suppressed_dns_known.
Names the IP serves whose DNS points elsewhere, or nowhere (certificate SANs, wordlist hits) stay hidden-vhost candidates: they are the interesting cases.
IP mode and Hostnames on target IPs
An IP-mode project has no root domain, and its hostnames are decided by the project's Hostnames on target IPs mode, which runs before this module (pipeline step). So in IP mode:
- Graph candidates (sources 1-4) are replaced by the hostnames that step recorded, each tried only on a target IP it was seen on (a hostname the step scanned, also on the target IPs it resolved to). A name the guardrail, the RoE or the hostname check refused is never tried. No recorded name is tried on an IP that IP Attribution tagged as a shared CDN edge or could not attribute, and none at all when IP Attribution did not run: an edge answers a name with whichever customer's site it serves.
- IP only forces Use graph candidates off, whatever the project stores, and records no name, so the only names tried are the full hostnames of your custom wordlist.
- With no root domain, the default wordlist and the bare prefixes of the custom wordlist are skipped in every mode; full hostnames from the custom wordlist are tried.
- Every recorded name was seen on its IP, so it counts as DNS-known there: it is never reported as a Hidden Virtual Host, only for a routing inconsistency.
- A hidden vhost found on an IP is reported on that IP and never added as a BaseURL (
VHOST_SNI_INJECT_DISCOVEREDis ignored): an IP-mode project's URLs are its addresses and the hostnames it selected.
With VHost & SNI on, every recording mode sends the names it did not scan. VHost & SNI is off by default. Turned on with Use graph candidates, in Record hostnames, Record + scan matching and Record + scan all it sends every recorded name as the SNI and the
Hostheader to the target IP it was seen on, whether or not the mode scanned it: a name the mode left unscanned (record_only,filter_no_match,filter_excluded,resolves_outside_targets,cap_reached, ...) is tried too. Only a name refused asinvalid_name,hard_blockedorroe_excludedis never sent, and no name is sent to a shared CDN edge IP. So an exclude entry stops a name from being scanned, not from being tried asHost/SNI on its own target IP while VHost & SNI is on; to keep a name off the wire entirely, add it to the Rules of Engagement exclusions. The packets still go only to your target IPs, so nothing leaves the target list, but the names do travel to those IPs. If the engagement covers the addresses only and the names must not be sent at all, keep VHost & SNI off, turn off Use graph candidates, or use IP only.
Probe sequence (per IP × port)
For every (IP, port) pair, the module runs one baseline plus two probes per candidate hostname:
Step 1 — Baseline
Single curl against the bare IP with no Host override. Records {status, size}.
curl -sk -o /dev/null -w "%{http_code} %{size_download}" \
--connect-timeout 3 --max-time 9 \
https://1.2.3.4:443/
If this fails (TCP refused, TLS handshake fails, curl status code 0), the entire (IP, port) is skipped with a warning. There is no point comparing candidate responses against a missing baseline.
A skipped port is not "checked, nothing hidden": it is listed in the recon JSON under vhost_sni.unchecked_ports, and its earlier VHost & SNI findings are kept (other tools' findings there still prune as usual). The report's Coverage Limitations shows the gap (source vhost_sni_enum, reason "baseline probe failed or probing errored"). An IP whose probing raised an error keeps the findings on every one of its ports the same way, and a run with no curl binary keeps every earlier VHost & SNI finding.
Step 2 — L7 probe (Host header trick)
For each candidate hostname, override the HTTP Host header while still dialling the bare IP:
curl -sk -o /dev/null -w "%{http_code} %{size_download}" \
-H "Host: admin.example.com" \
--connect-timeout 3 --max-time 9 \
https://1.2.3.4:443/
The TLS handshake carries SNI = 1.2.3.4 (the URL hostname), but the HTTP request inside the tunnel claims admin.example.com. Apache/Nginx vhosts that route on Host: will hand back the matching backend.
Step 3 — L4 probe (TLS SNI trick)
Only runs on HTTPS ports. Uses --resolve to skip DNS while sending the candidate hostname as the TLS SNI:
curl -sk -o /dev/null -w "%{http_code} %{size_download}" \
--resolve "admin.example.com:443:1.2.3.4" \
--connect-timeout 3 --max-time 9 \
https://admin.example.com:443/
The TCP connection still goes to 1.2.3.4, but the ClientHello carries server_name = admin.example.com and curl naturally sets the matching Host: header. Reverse proxies that decide which backend to talk to before reading any HTTP — k8s ingress controllers, Traefik, Cloudflare, NGINX-ingress — will route to the admin backend.
L7 and L4 probes for all candidates run concurrently per port via ThreadPoolExecutor(max_workers=VHOST_SNI_CONCURRENCY). Each probe gets a --connect-timeout of VHOST_SNI_TIMEOUT seconds with a hard --max-time triple that, plus a Python-side subprocess timeout adding two seconds of grace.
Step 4 — Anomaly detection
For every probe, compare the response to the baseline:
| Condition | Verdict |
|---|---|
| Status code differs from baseline | anomaly |
Status matches AND |size_observed - size_baseline| > VHOST_SNI_BASELINE_SIZE_TOLERANCE (default 50 bytes) | anomaly |
| Otherwise | match — no finding |
The size tolerance suppresses noise from Set-Cookie nonces, CSRF tokens, and per-request timestamps that legitimately change the body byte count without changing the underlying response.
Severity classification
Each anomaly is classified by _classify_severity into one of four tiers:
| Severity | Trigger | Vulnerability type |
|---|---|---|
high | L7 and L4 serve different pages for the same hostname (a different status, or a different page once per-request noise is normalised away). One layer routed to a different backend than the other — a proxy-bypass primitive | host_header_bypass ("Routing Inconsistency (L7 vs L4)") |
medium | The discovered hostname matches an internal-keyword pattern (admin, staging, internal, jenkins, vault, k8s, argocd, phpmyadmin, etc. — see INTERNAL_KEYWORDS) | hidden_vhost (L7-only, or both layers serving the same page) or hidden_sni_route (L4-only) |
low | Different status code than baseline, no internal-keyword match | (same as above) |
info | Same status code, only the body size differs beyond tolerance | (same as above) |
Internal-keyword matching is deterministic: when a label matches multiple keywords (e.g. admin-portal matches both admin and portal), the longest keyword wins (lexicographic tiebreak), making the classification stable across reruns.
Discovered URLs feed downstream tools
When VHOST_SNI_INJECT_DISCOVERED is on (default), each confirmed hidden vhost (never a name DNS already points at the IP) is added as a fresh entry in combined_result["http_probe"]["by_url"] with discovery_source: "vhost_sni_enum" and live: true. This means:
- Subdomain Takeover (sister tool in the same Phase A group) sees the new alive URLs in its
_collect_alive_urls()pass, even though they were discovered after Group 4 finished. - Follow-up partial recon runs (Katana, Nuclei) pick up the new BaseURL nodes from the graph and crawl/scan the discovered surface without rerunning the full pipeline.
The injection never overwrites existing by_url entries — already-known URLs are left untouched.
Tools used
| Tool | Where | Notes |
|---|---|---|
curl | Recon container base image | Standard Linux curl. Every probe is a single subprocess.run([...]) with the argument list — no shell, no string interpolation into a command line, no injection surface |
httpx | ProjectDiscovery, already pulled by GROUP 4 | Used only in partial recon mode to filter the user's subdomain candidates for liveness; not used in full-pipeline mode |
No new Docker image, no new pip dependency, no new API key. The module is intentionally lightweight.
Hostname injection safety
The candidate hostname pipeline ends with _is_valid_hostname (RFC-1123 label regex anchored with \Z so newlines cannot slip past $). The validator rejects:
- Colons (
:) — would corrupt--resolve "<host>:<port>:<ip>"syntax - Newlines (
\n) — would inject HTTP headers - Spaces, quotes, backticks, dollar signs, backslashes, NUL bytes — defence-in-depth even though
subprocess.runwith a list bypasses the shell - Labels longer than 63 chars or hostnames longer than 253 chars
- Underscores (
_) and characters outside[A-Z0-9-] - Labels starting or ending with
-
A malformed entry — whether it landed via the user's custom wordlist, a corrupted graph node, or a TLS SAN with weird shape — is silently dropped before it reaches curl.
Concurrency model
| Layer | Parallelism | Configurable |
|---|---|---|
| IP iteration | Sequential | No (deliberate — preserves ordering for deterministic logging) |
| Port iteration per IP | Sequential | No |
| Candidate × layer probes per port | Concurrent via ThreadPoolExecutor | Yes (VHOST_SNI_CONCURRENCY, default 20) |
| Phase A fan-out | Concurrent (vhost_sni runs alongside Nuclei, GraphQL, Takeover); one tool at a time under an RoE rate ceiling | No (handled by the orchestrator) |
The per-IP serial design is deliberate: a typical scan has a handful of IPs, so the savings from inter-IP parallelism are small, while the deterministic single-IP reporting makes log triage easier. Within an IP, candidate-level concurrency dominates the total wall time.
Under an engagement rate ceiling the ceiling sets the pace, not the worker pool. Every curl probe (baseline, control and candidate) is one request and takes a slot of the clock all of recon's own requests share, so an IP takes about its probe count divided by the ceiling, in seconds. With the default wordlist (capped at 2,000 candidates per IP) on ports 80 and 443, that is some 6,000 probes, about 50 minutes per IP at 2 requests per second.
A test pinned at VHOST_SNI_CONCURRENCY=8 confirms the module never exceeds the configured cap (max inflight ≤ concurrency + 2 thread-scheduling buffer).
Default wordlist
recon/wordlists/vhost-common.txt ships with the recon image. 2,380 unique entries organised into eleven topical sections:
- Admin / management surfaces (
admin,manage,console,panel, ...) - Dev / staging / pre-prod (
dev,staging,qa,uat,preprod, ...) - CI/CD / build / deploy (
jenkins,gitlab,argocd,harbor, ...) - Monitoring / logging (
grafana,prometheus,kibana,splunk, ...) - Containers / orchestration (
kubernetes,k8s,rancher,traefik, ...) - Databases / caches (
phpmyadmin,pgadmin,redis,mongo, ...) - Authentication / SSO (
keycloak,okta,vault,ldap, ...) - Email / communication (
mail,mx,exchange,webmail, ...) - File storage / sharing (
nextcloud,nas,synology,seafile, ...) - Security tools / SOC (
splunk,siem,crowdstrike,wazuh, ...) - ML / AI / blockchain / IoT (
mlflow,kubeflow,geth,ipfs, ...)
Each prefix is expanded as {prefix}.{target_apex} per target IP. Project-specific custom prefixes go into the Custom Wordlist textarea on the project form (stored as a Text column, no length limit).
No wordlist on a shared CDN edge
A CDN edge answers almost any name with some customer's site or its own catch-all page, so a wordlist there measures the CDN, not the target, and costs up to VHOST_SNI_MAX_CANDIDATES_PER_IP probes per port. The default wordlist is therefore skipped on shared CDN edge IPs: the IPs IP Attribution tagged shared_edge. A partial VHost & SNI run reads that tag from the IP node.
An IP with no tag (IP Attribution was off, or the graph predates it) falls back to the earlier check:
- an IP naabu, httpx or tlsx flagged with an edge-only CDN name (Cloudflare, Fastly, Akamai, CloudFront, Imperva, Sucuri, Azure Front Door, ...), or
- an IP inside a CDN's published edge prefixes (the shared list in
recon/helpers/cdn_ranges.py).
Plain cloud hosting (aws, azure, gcp labels) is not an edge, and no other IP changes: a Kubernetes ingress or a shared reverse proxy is exactly where real hidden apps live. On an edge IP the graph candidates and the custom wordlist are still probed, and the control probes still handle catch-all pages.
The skip is recorded as a coverage note (source vhost_sni_wordlist, reason "shared CDN edge", the number of IPs), which the report's Coverage Limitations block shows. It is not a finding and does not stop the end-of-run prune. The list of skipped IPs is in the recon JSON (vhost_sni.scan_metadata.wordlist_skipped_edge_ips).
Full parameter reference
Master toggle
| Parameter | Default | Description |
|---|---|---|
VHOST_SNI_ENABLED | false | Master toggle. When off, the module is skipped and recon output contains { "skipped_reason": "disabled" } |
Layer toggles
| Parameter | Default | Description |
|---|---|---|
VHOST_SNI_TEST_L7 | true | Run the HTTP Host-header probe per candidate. Catches classic Apache/Nginx vhosts |
VHOST_SNI_TEST_L4 | true | Run the TLS SNI probe per candidate. Only fires on HTTPS ports. Catches reverse-proxy / k8s ingress / CDN routing |
If both are off the module exits with { "skipped_reason": "all_layers_disabled" }.
Candidate sources
| Parameter | Default | Description |
|---|---|---|
VHOST_SNI_USE_GRAPH_CANDIDATES | true | Pull candidate hostnames from existing graph nodes (Subdomain, ExternalDomain, TLS SANs, CNAMEs); in IP mode, the hostnames recorded on each target IP. Highest-signal source. Forced off in an IP project set to IP only |
VHOST_SNI_USE_DEFAULT_WORDLIST | true | Use the bundled vhost-common.txt (~2,380 prefixes), expanded as {prefix}.{apex} |
VHOST_SNI_CUSTOM_WORDLIST | "" | Optional newline-separated prefixes/hostnames from the project form (Text column, no size cap) |
VHOST_SNI_MAX_CANDIDATES_PER_IP | 2000 | Hard cap on candidates per IP. Excess entries are dropped deterministically (sorted alphabetically) |
Performance / behaviour
| Parameter | Default | Clamp | Description |
|---|---|---|---|
VHOST_SNI_TIMEOUT | 3 | >= 1 | curl --connect-timeout per probe (seconds). Total per-probe budget is 3× this value |
VHOST_SNI_CONCURRENCY | 20 | >= 1 | Parallel probes per (IP, port). Higher = faster, louder |
VHOST_SNI_BASELINE_SIZE_TOLERANCE | 50 | >= 0 | Bytes of size delta to ignore when status code matches baseline. Suppresses cookie/timestamp jitter |
VHOST_SNI_INJECT_DISCOVERED | true | - | When a hidden vhost is confirmed, create a BaseURL node and add it to http_probe.by_url so downstream tools (Subdomain Takeover, partial-recon Nuclei) pick it up |
Output structure
Results live under combined_result.vhost_sni:
{
"by_ip": {
"1.2.3.4": {
"ip": "1.2.3.4",
"baseline": {"status": 403, "size": 548},
"candidates_tested": 247,
"ports_tested": 2,
"anomalies": [
{
"hostname": "admin.example.com",
"ip": "1.2.3.4",
"port": 443,
"scheme": "https",
"layer": "L7",
"baseline_status": 403,
"baseline_size": 548,
"observed_status": 200,
"observed_size": 4823,
"size_delta": 4275,
"severity": "medium",
"internal_pattern_match": "admin"
}
],
"anomaly_count": 3,
"is_reverse_proxy": true,
"hosts_hidden_vhosts": true
}
},
"findings": [
{
"id": "vhost_sni_3f9c2a7b1e04d58c6a21",
"name": "Hidden Virtual Host: admin.example.com",
"type": "hidden_vhost",
"severity": "medium",
"source": "vhost_sni_enum",
"hostname": "admin.example.com",
"ip": "1.2.3.4",
"port": 443,
"scheme": "https",
"layer": "L7",
"baseline_status": 403,
"baseline_size": 548,
"observed_status": 200,
"observed_size": 4823,
"size_delta": 4275,
"internal_pattern_match": "admin",
"description": "Setting Host: admin.example.com on 1.2.3.4:443 returns a different response than the baseline IP request. The hostname pattern 'admin' suggests an internal/admin application.",
"discovered_at": "2026-04-25T14:30:00Z"
}
],
"discovered_baseurls": [
"https://admin.example.com"
],
"summary": {
"ips_tested": 5,
"candidates_total": 1247,
"anomalies_l7": 3,
"anomalies_l4": 1,
"high_severity": 1,
"medium_severity": 2,
"low_severity": 1,
"info_severity": 0
},
"scan_metadata": {
"duration_sec": 12.4,
"scan_timestamp": "2026-04-25T14:30:00Z",
"wordlist_default_used": true,
"wordlist_default_count": 2380,
"wordlist_custom_count": 0,
"graph_candidates_used": true,
"test_l7": true,
"test_l4": true,
"size_tolerance": 50,
"concurrency": 20,
"timeout": 3
}
}
finding.id is a deterministic hash of (hostname, IP, port, layer) (vhost_sni_<20 hex>, the IP canonicalised) so reruns update the same Vulnerability node instead of duplicating, and two names that differ only in punctuation (dev-api and dev.api) stay two findings.
Upgrading from the older id form (vhost_sni_<hostname>_<ip>_<port>_<layer> with punctuation folded to _): run python tooling/scripts/vhost_finding_rekey.py --all (a dry run), then again with --apply while the agent, webapp and recon orchestrator are stopped, before the first scan. It moves the mute, the Priority Board layers and the fix items to the new ids. Without it, the next scan writes new ids, prunes the old nodes and keeps muted or judged ones as stale duplicates.
Graph schema
Input nodes (consumed)
The module never queries Neo4j directly during full-pipeline runs — all inputs come from the in-memory combined_result dict. The graph provenance of those inputs is:
| Graph node | Produced by | How this module uses it |
|---|---|---|
IP | DNS recon (GROUP 1), Naabu / Masscan (GROUP 3) | Target IPs to probe. Pulled from port_scan.by_host[*].ip with fallback to dns.subdomains[*].ips.ipv4; in IP mode, only the ports this run found live on each target IP |
Port | Naabu / Masscan (GROUP 3), Nmap (GROUP 3.5) | Ports to test per IP. Honours an explicit scheme field on the port spec when present (so an HTTPS service on port 9001 doesn't get probed as HTTP) |
Subdomain | Subdomain Discovery (GROUP 1) | First-tier candidate source — every Subdomain that resolves to the target IP is added |
ExternalDomain | Domain recon — out-of-scope subdomains | Co-residency check: ExternalDomain nodes that resolve to the same IP become candidates. Often higher signal than in-scope Subdomains |
BaseURL | Httpx (GROUP 4) | TLS Subject Alternative Names captured by httpx (tls_subject_alt_names / tls_sans) become candidates. Wildcards *.acme.com are stripped to acme.com |
Certificate | Httpx (GROUP 4) | Same SAN extraction as BaseURL when the Certificate node carries them |
DNSRecord (CNAME) | DNS recon (GROUP 1) | CNAME targets resolving to the target IP become candidates |
ExternalDomain -SEEN_ON-> IP | Hostnames on target IPs (IP mode) | The hostnames recorded on each target IP, with their reason: the IP-mode candidate source (from the run's ip_hostnames block in a full run, from the graph in a partial run) |
In Partial Recon, the module instead calls _build_vuln_scan_data_from_graph() which directly reads Subdomain, IP, Port, and BaseURL nodes for the project, plus any user-supplied subdomains/IPs injected by the modal.
Nodes that are not read: Service, Endpoint, Technology, Parameter, Header, CVE, MitreData, Capec, Secret, ThreatPulse, Malware.
Output nodes (produced)
| Graph node | Operation | Notes |
|---|---|---|
Vulnerability | MERGE by deterministic id | One node per anomaly. source="vhost_sni_enum", type="hidden_vhost" / "hidden_sni_route" / "host_header_bypass". first_seen set on create, last_seen on every run, so reruns update in place |
BaseURL | MERGE by url | Created for every confirmed hidden vhost (discovery_source="vhost_sni_enum") so Katana / Nuclei follow-up partial recon can scan the new surface |
Subdomain (in scope only) | MERGE by name | Created on demand when a finding's hostname is a child of the engagement's domain and no Subdomain exists yet, flagged source="vhost_sni_enum" and has_dns_records=false. A hostname outside that domain is never added to the inventory |
HAS_VULNERABILITY relationship | MERGE | From the in-scope Subdomain to the Vulnerability, or from the IP that served it when the hostname is out of scope. For host_header_bypass findings the IP gets the edge as well |
HAS_BASEURL relationship | MERGE | From the Subdomain to the new BaseURL, falling back to Service -[:SERVES_URL]-> for an out-of-scope host |
No
RESOLVES_TO. A server answering for a Host header proves routing, not DNS, and behind a shared frontend the two routinely disagree. Earlier releases wrote that edge anyway; re-probing a pair now removes the leftover, unless a DNS writer corroborated it (the edge carriesrecord_type).
Properties enriched on existing nodes
Subdomain (the in-scope Subdomain that became an anomaly):
| Property | Value |
|---|---|
vhost_tested | true |
vhost_hidden | true when the name is a confirmed hidden vhost; false when DNS points the name at the IP (only a routing inconsistency is reported for it) |
vhost_routing_layer | "L7" / "L4" / "both" |
vhost_status_code | observed status code |
vhost_size_delta | bytes difference vs baseline |
sni_routed | true if layer is L4 or both |
vhost_tested_at | ISO timestamp |
IP (every IP that was probed):
| Property | Value |
|---|---|
vhost_sni_tested | true |
vhost_baseline_status | baseline status code |
vhost_baseline_size | baseline body size |
hosts_hidden_vhosts | true if any hidden vhost was confirmed |
hidden_vhost_count | number of hidden vhosts found |
is_reverse_proxy | true if at least one L4 anomaly fired (SNI routing differs from default → likely k8s ingress / NGINX-ingress / Cloudflare) |
is_permissive_frontend | true if a port answered nearly every candidate with the same one or two responses, so its anomalies were discarded as noise |
vhost_sni_suppressed_by_control | candidates dropped because they matched a random-hostname control probe |
vhost_sni_suppressed_dns_known | names DNS points at this IP that served their own site, so were not reported as hidden |
vhost_sni_suppressed_as_noise | anomalies discarded on permissive-frontend ports (none of them became a finding) |
vhost_sni_suppressed_sample | up to 20 of those discarded names, as hostname:port, sorted |
vhost_sni_tested_at | ISO timestamp |
A permissive frontend's anomalies are not written as findings, because almost all of them are the frontend's default page. The last two properties keep that decision visible: if a real hidden vhost sits behind a catch-all frontend, its name may be in the sample.
A name found on a target IP but outside the engagement's domains (a co-hosted third party) is kept as a BaseURL hung off the IP's Service, as a record of what the IP serves. Partial recon does not treat such a host as a scan target: that name resolves wherever its own DNS points, usually somebody else's server.
No new node labels are introduced. No new relationship types are introduced. The module deliberately reuses existing types so the graph schema stays narrow.
Anchor attachment precedence
For every finding, the mixin tries three anchor strategies in order:
- Match existing
Subdomainwith{name: hostname, user_id, project_id}andMERGEtheHAS_VULNERABILITYedge to it. - For
host_header_bypassfindings, also attach to theIP— the IP is the vulnerable surface (the routing inconsistency is server-side), so the finding shows up in IP-level dashboards too. - Create the
Subdomainwhen the hostname is in scope, flaggedhas_dns_records=false, and attach theVulnerabilityto it. A hidden panel is usually in no zone file at all, so without this the finding it exists to produce would be unreachable from the graph page. - Otherwise attach to the
IPthat served it. A co-hosted third-party name is not ours to add to the inventory, but its finding still has to hang off something.
Properties written on each Vulnerability
| Property | Value |
|---|---|
id | deterministic vhost_sni_<20 hex>: a hash of the hostname, the canonical IP, the port and the layer |
user_id, project_id | tenant isolation |
source | "vhost_sni_enum" |
type | "hidden_vhost" (L7-only, or both layers serving the same page) / "hidden_sni_route" (L4-only) / "host_header_bypass" (L7 and L4 serve different pages) |
name | e.g. "Hidden Virtual Host: admin.example.com" |
severity | high / medium / low / info |
description | human summary including the discovered hostname, IP, port, layer, and any internal-keyword match |
hostname | lowercased FQDN of the discovered vhost |
host | same as hostname (for query convenience) |
ip | target IP that hosts the vhost |
port | target port |
scheme | "http" / "https" |
layer | "L7" / "L4" / "both" |
baseline_status, baseline_size | the bare-IP response used as comparison |
observed_status, observed_size | the response with the host/SNI lie applied |
size_delta | signed difference in bytes |
internal_pattern_match | matched internal-keyword (e.g. "admin", "jenkins") or null |
dns_known | true when this run's DNS points the hostname at this IP (then the finding is a routing inconsistency) |
matched_at | the URL form (https://admin.example.com[:port]) |
is_dast_finding | false |
first_seen, last_seen | ISO timestamps |
Rules of Engagement
VHost & SNI inherits the project-level RoE applied during GROUP 1 (subdomain discovery) and GROUP 3 (port scanning), and checks every IP it collected once more before probing it: an address an IP or CIDR entry excludes is never probed, whether it came from port_scan.by_host, an address a name in dns.subdomains resolved to, a graph row or an IP typed into a partial run. The refusal is logged as [-][RoE] vhost_sni: not sent to ... and recorded as a coverage gap under the source roe_excluded.
The module sends real HTTP traffic to the target, so it is treated as active and respects the same in-scope/out-of-scope rules as the rest of the active-scan tools.
Recon presets
Every recon preset has an explicit decision recorded:
| Preset | VHost & SNI | Rationale |
|---|---|---|
| ai-surface-recon | enabled | On with the preset's active vuln/security block |
| api-security | enabled | API gateways often hide behind reverse proxies + SNI routing |
| bug-bounty-deep | enabled | Bug-bounty staple — hidden vhosts are gold |
| bug-bounty-quick | enabled (graph-only, no default wordlist) | Speed-tuned: only data-driven candidates |
| cloud-exposure | enabled | k8s ingress / Cloudflare = SNI routing is the deciding factor |
| compliance-audit | enabled | host_header_bypass IS a compliance finding |
| cve-hunter | enabled | More attack surface = more CVE matches |
| directory-discovery | enabled | Hidden vhosts are hidden HTTP surfaces (same discovery class as ffuf dirs) |
| full-active-scan | enabled | "Every active tool at max intensity" |
| full-maximum-scan | enabled (concurrency 40, max candidates 5,000) | Everything maxed |
| graphql-recon | enabled | GraphQL endpoints often live on internal vhosts |
| infrastructure-mapper | enabled | Reveals reverse-proxy / ingress topology |
| parameter-injection | enabled | More endpoints = more parameters to fuzz |
| red-team-operator | enabled (L4 off, no default wordlist, concurrency 5) | Stealth-tuned: graph-only candidates, low concurrency, L7-only |
| secret-hunter | enabled | Admin panels (hidden vhosts) often leak secrets |
| subdomain-takeover | enabled (concurrency 30) | Aggressive — kindred concept (both expose hidden infrastructure) |
| web-app-pentester | enabled | Webapp pentest staple |
| full-passive-scan | explicit false | Preset's identity is "no packets to target" |
| osint-investigator | explicit false | "No active scanning" |
| stealth-recon | explicit false | 2,380 probes would be catastrophically slow and noisy |
| large-network | explicit false | Per-IP serial loop × thousands of IPs = days |
| internal-network | explicit false | A per-IP serial loop is impractical across a subnet |
| supply-chain-audit | explicit false | Not needed to answer the dependency question; no extra traffic |
| web-cache-poisoning | explicit false | Host enumeration does not help prove a cache bug on the URLs already known |
| dns-email-security | leave default | DNS/email-only, not a web preset |
| secret-miner | leave default | Pure JS analysis, no host discovery |
The decision matrix above is enforced by a content test in webapp/src/lib/recon-presets/vhost-sni.test.ts — adding a new preset that doesn't make a deliberate decision fails that test, and with it the unit gate (./redamon.sh test unit).
Stealth mode
Stealth mode switches VHost & SNI off (VHOST_SNI_ENABLED=false), and a partial VHost & SNI run on a stealth project is refused (VhostSni is off in stealth mode). For a quieter run outside stealth mode, tune it at the preset layer — the red-team-operator preset sets VHOST_SNI_TEST_L4=false, VHOST_SNI_USE_DEFAULT_WORDLIST=false, and VHOST_SNI_CONCURRENCY=5 to keep noise low. The stealth-recon preset disables the module entirely.
If you build a custom stealth preset, the recommended quiet configuration is:
VHOST_SNI_ENABLED=true
VHOST_SNI_TEST_L7=true
VHOST_SNI_TEST_L4=false # SNI brute is louder
VHOST_SNI_USE_DEFAULT_WORDLIST=false # 2,380 probes = noisy
VHOST_SNI_USE_GRAPH_CANDIDATES=true # only test what's in the graph
VHOST_SNI_CONCURRENCY=5 # slow + quiet
VHOST_SNI_INJECT_DISCOVERED=true # still wire findings into the graph
Partial recon
VHost & SNI is available as a Partial Recon tool (tool_id="VhostSni"). The modal accepts two user-input types:
- Custom subdomains — added as candidate hostnames (must be in scope: equal to apex or end with
.<apex>). In an IP-mode project a typed hostname follows Hostnames on target IPs: refused in IP only and Record hostnames, judged by the same rule as a found name in the two scanning modes - Custom IPs — added as extra targets to probe (validated as IPv4 or CIDR /24-/32)
Partial-recon run behaviour:
VHOST_SNI_ENABLEDis force-set totruefor the run, overriding the project toggle. On a stealth project the run is refused instead: stealth mode switches the tool off.settings_overridesfrom the modal bypass stored project settings for that run.- Custom subdomains are resolved via the system resolver; resolved IPs are added as additional targets.
- Custom IPs without an attachment subdomain become a
UserInputnode withtool="VhostSni"and aPRODUCEDedge to each IP. - Graph-existing targets can be included or excluded via the Include existing graph targets checkbox. When both graph and custom inputs are empty, the run exits with a "no IP targets" message.
- Confirmed findings are written to the graph as if the full pipeline ran, so repeated partial runs converge on the same
Vulnerability.idinstead of duplicating.
See Recon Pipeline Workflow -- Partial Recon for the modal layout.
Implementation notes
- No new dependencies. The module uses only
curl(already in the recon container base image) andhttpx(already pulled by GROUP 4). Norequirements.txtchange, no new Dockerfile entry, no new API key. - Deterministic output across reruns. Set iteration of
INTERNAL_KEYWORDSis non-deterministic across Python invocations, so the matcher collects all matches per label and picks the longest (lex tiebreak). Two runs against the same target produce the same finding IDs and the same severities. - BOM-safe wordlist loader. The default wordlist is read with
encoding="utf-8-sig"so a Windows-edited file with a UTF-8 BOM doesn't corrupt the first entry. - Hostname validator uses
\Z, not$. Python's$matches before a trailing\n, which would letevil\n.example.comslip past validation and inject HTTP headers viacurl --resolve. The module uses\Z(absolute end of string) explicitly. - Scheme override honoured. When the upstream port spec carries an explicit
schemefield (e.g. http_probe knows9001speaks HTTPS), the module honours it instead of re-deriving from the port number. - Subprocess-list invocation. Every curl call is
subprocess.run([...], shell=False)with the argument list — no shell, no string interpolation. Defense-in-depth: hostname validation rejects shell metacharacters even though they couldn't reach a shell. - Per-port baseline. Each (IP, port) combination gets its own baseline. A failed baseline skips that port only — other ports on the same IP still get scanned.
- Per-IP serial loop. Inter-IP parallelism is intentionally not exposed; per-port concurrency dominates wall time for typical targets.
Test coverage
The module ships with 282 tests across 11 files (~4,000 lines, ~282/282 passing):
| File | Container | Focus |
|---|---|---|
recon/tests/test_vhost_sni_enum.py | orchestrator | 102 unit + module-integration tests for every helper and the end-to-end runner with mocked curl |
recon/tests/test_vhost_sni_smoke.py | orchestrator | 10 real-curl + real-HTTP-server smoke tests against an in-process multi-vhost server |
recon/tests/test_vhost_sni_tls_smoke.py | orchestrator | 7 tests against a real TLS server with a self-signed cert (validates --resolve actually steers SNI) |
recon/tests/test_vhost_sni_edge_cases.py | orchestrator | 46 hostname-injection-safety, wordlist-encoding-edge, curl-output-parsing, and finding-multiplicity tests |
recon/tests/test_vhost_sni_stress.py | orchestrator | 6 concurrency stress tests (200 candidates, max-inflight cap, no thread leaks) |
recon/tests/test_vhost_sni_regression.py | both | 28 source-level wiring + settings + pipeline registration tests |
recon/tests/test_vhost_sni_partial.py | orchestrator | 14 partial-recon orchestration tests |
recon/tests/test_vhost_sni_fp_regression.py | recon | false-positive regressions through the real probe: shared-edge templates, names DNS already points at the IP, the CDN-edge wordlist skip, the hidden-vhost vs routing-inconsistency naming |
tests/test_vhost_sni_graph_integrity.py | agent | the mixin's statements without Neo4j: no RESOLVES_TO, reachable findings, vhost_hidden false for a DNS-known name |
recon/tests/test_vhost_sni_graph.py | agent | 8 graph-mixin tests against real Neo4j (idempotency, multi-tenancy, defensive node creation) |
webapp/src/lib/recon-presets/vhost-sni.test.ts | webapp | Zod-schema, RECON_PARAMETER_CATALOG, and per-preset content tests (every registered preset must have a decision) |
webapp/src/components/projects/ProjectForm/vhostSniWiring.test.ts | webapp | 16 workflow-definition + nodeMapping + tooltip wiring tests |
webapp/src/lib/report/vhostSniReport.test.ts | webapp | 17 report-data type-shape + risk-score-formula + reportTemplate.ts structure tests |
webapp/src/lib/vhostSniPrisma.test.ts | webapp | 4 real Prisma round-trip tests against PostgreSQL (defaults, write-then-read, large text column, snake_case mapping) |
Related pages
- Project Settings Reference -- VHost & SNI Enumeration -- full parameter tables
- Recon Pipeline Workflow -- pipeline diagram
- Running Reconnaissance -- execution model
- Subdomain Takeover Detection -- sister GROUP 6 Phase A scanner (kindred concept: both expose hidden infrastructure)
- GraphQL Security Testing -- another sibling GROUP 6 Phase A scanner
- Origin Discovery -- sibling GROUP 6 Phase A scanner that unmasks the origin IP behind a CDN/WAF (kindred concept: both defeat an edge/routing layer)
- Recon Presets -- full preset list with VHost & SNI defaults per preset
- Rules of Engagement -- host exclusion rules applied before probes fire