Subdomain takeover verification
TL;DR. You must decide whether a flagged CNAME represents an exploitable takeover when the provider requires pre-claim domain ownership verification. Automated scanners treat HTTP error signatures as immediate takeovers even if the platform blocks unauthenticated tenant registration. Your decision relies on takeover/subzy.txt and live DNS queries for verification tokens.
In phase 7: subdomain takeover checks, subzy flags dangling records by matching HTTP response bodies against known provider fingerprints. You now determine whether those flagged hostnames allow unauthorized registration or stop at administrative hygiene.
The decision
Section titled “The decision”Can an external party claim this dangling subdomain without access to the target DNS zone?
The tempting wrong answer treats any 404 in takeover/subzy.txt as an immediate takeover. Seeing an error page tempts you to file a report or register the tenant name before checking platform rules.
You hold takeover/subzy.txt and dns/cnames.txt.
Your evaluation branches on provider verification rules:
-
Provider requires domain verification. Platforms demand a DNS TXT challenge token before attaching custom domains. If the token is missing or claimed by the target, an external user cannot attach the hostname. Drop the candidate and log an unexploitable dangling CNAME.
-
Provider allows unverified tenant claims. The service maps custom hostnames directly from incoming CNAME headers. If the resource name is globally available, the subdomain is vulnerable. Document the missing resource identifier and stop without creating the tenant.
-
CNAME targets internal infrastructure. The hostname points to a private gateway returning 404 to public traffic. Drop the finding as an internal routing artifact.
Manual verification requires time to review provider rules and query DNS. Skipping verification produces invalid submissions that close as informative. Registration attempts risk creating unmanaged assets.
Limit verification traffic. Cap DNS lookups at 5 packets per second and curl requests at 2 requests per second.
Where the data comes from
Section titled “Where the data comes from”Data comes from two recon files, live DNS lookups, and provider documentation.
Phase 4 produces dns/cnames.txt with dnsx, mapping subdomains to CNAME targets.
Phase 7 produces takeover/subzy.txt with subzy, matching HTTP responses against signatures.
Provider documentation defines platform verification requirements.
Live DNS TXT lookups query the target zone for verification challenge tokens.
Fields attach to specific sources:
subdomain: Hostname underexample.comintakeover/subzy.txt.cname: Canonical target indns/cnames.txt.provider: Hosting service identified by subzy.fingerprint: HTTP error string matched by subzy.verification_type: Platform requirement for DNS TXT or certificate checks.
The file takeover/subzy.txt cannot contain account ownership state or backend validation rules. It inspects public HTTP responses without checking recent policy updates. Raw scanner output contains string matches. It lacks exploitability confirmation.
Three records
Section titled “Three records”# SAMPLE, invented[VULNERABLE] - [github] - docs.example.com (CNAME: example.github.io)[VULNERABLE] - [azure] - portal.example.com (CNAME: example-portal.azurewebsites.net)[VULNERABLE] - [s3] - assets.example.com (CNAME: example-assets.s3.amazonaws.com)The first record evaluates docs.example.com.
It asserts that docs.example.com points to example.github.io and returns the GitHub Pages 404 body.
It does not assert that an external account can claim docs.example.com. GitHub requires a DNS TXT challenge before routing traffic.
Next command:
# Query TXT records to check for an active GitHub Pages domain verification tokendig +short TXT _github-pages-challenge-example.example.comIf GitHub requires verification and the zone lacks the token, drop the finding.
The second record evaluates portal.example.com.
It asserts that portal.example.com points to example-portal.azurewebsites.net and returns an Azure 404 page.
It does not assert that the Azure web app name is available or that Azure permits binding without verification. Azure App Service enforces domain verification through a TXT record named asuid.portal.example.com.
Next command:
# Query TXT records to determine whether an Azure domain verification ID existsdig +short TXT asuid.portal.example.comIf Azure enforces domain verification IDs, drop the host from your queue.
The third record evaluates assets.example.com.
It asserts that assets.example.com points to example-assets.s3.amazonaws.com and S3 returns NoSuchBucket.
It does not assert that an external account can create the bucket example-assets or that S3 routes traffic without CloudFront verification.
Next command:
# Check HTTP response headers from the S3 endpoint without modifying bucket statecurl -s -I -H "Host: assets.example.com" http://example-assets.s3.amazonaws.comIf S3 allows direct creation and the bucket is available, document the dangling pointer. Stop before registering the bucket. If the platform requires certificate validation, drop the finding.
The convincing dud
Section titled “The convincing dud”The convincing dud is docs.example.com pointing to example.github.io.
Subzy flags the host as vulnerable because the HTTP body contains ‘There isn't a GitHub Pages site here.’ The output looks like an exploitable takeover.
The check that kills it reviews GitHub custom domain requirements and the target DNS zone. GitHub requires a TXT verification record containing an account challenge token. When an external account attempts to add docs.example.com, GitHub rejects the claim because the user cannot prove control of example.com.
You verify this defense with a DNS query:
# Check for existing GitHub challenge records in the target domaindig +short TXT _github-pages-challenge-example.example.comWithout the matching token, GitHub refuses to route traffic. The finding is an unexploitable dangling pointer.
You record in assessment notes: ‘Subzy flagged docs.example.com as vulnerable, but GitHub Pages enforces DNS TXT ownership verification that prevents third-party tenant claims.’
Scanners match error strings. When an origin repository is deleted, the edge returns a 404 page. The scanner flags the string without checking whether platform controls block registration. Reporting from scanner text mistakes an unmapped host for an exploitable takeover. Triagers reject these submissions because external accounts cannot complete onboarding.
What this step cannot see
Section titled “What this step cannot see”This verification step cannot see private cloud routing tables or internal split-horizon DNS zones.
A hostname such as internal-api.example.com can resolve to a public cloud IP or a CNAME to an internal load balancer. Queried over the public internet, the provider returns 404 because no public routing exists. The resource operates within a private Amazon VPC, Azure Virtual Network, or private Kubernetes ingress.
A security auditor catches this condition during internal cloud reconnaissance. They resolve the hostname through internal resolvers or inspect management plane configurations:
# Query cloud infrastructure to verify whether private endpoint routing existsaws route53 list-resource-record-sets --hosted-zone-id Z1234567890 --query "ResourceRecordSets[?Name == 'internal-api.example.com.']"External verification operates from the outside using public DNS records and web responses. Inspecting private route tables, virtual network peering, and internal cloud configurations requires authenticated access to corporate cloud infrastructure. That work belongs to internal infrastructure reconnaissance.
When you stop
Section titled “When you stop”You stop your evaluation based on clear criteria:
-
When provider documentation confirms mandatory domain ownership verification and the target zone lacks the challenge record, drop the host immediately.
-
When the provider allows unverified claims and program rules authorize claims, document the dangling CNAME chain and stop before serving public content.
-
When provider documentation is ambiguous, leave the host in the verification queue for senior operator review.
Follow the program rule strictly. If the program policy states ‘stop at DNS proof’, never attempt to register cloud accounts or claim buckets. Present the DNS records and provider documentation showing unverified claim paths.
Spend three minutes per flagged host: one minute reviewing verification rules, one minute querying challenge records, and one minute recording status in takeover/verified.tsv.
In an automated pipeline, apply a fail-closed policy. If a DNS query times out, if a provider API status is uncertain, or if verification documentation is missing, mark the record as UNVERIFIED_BLOCKED. The pipeline halts automated escalation on that host and alerts an analyst.
The file you hand off
Section titled “The file you hand off”You write your results to takeover/verified.tsv.
The file contains six tab-separated columns:
host: Evaluated hostname underexample.com.cname: Destination CNAME record returned by DNS.provider: Identified cloud or hosting service.verification_rule: Provider requirement, such asTXT_CHALLENGE_REQUIREDorUNVERIFIED_CLAIM_ALLOWED.status: Evaluation outcome, such asDUD_VERIFIED_BLOCKED,CONFIRMED_DANGLING, orINTERNAL_MAPPING.action: Operational decision, such asDROP,REPORT, orCLEANUP_TICKET.
The next step asks: Does this dangling record expose exploitable external impact, or does it require an internal DNS cleanup ticket?
Hand off confirmed findings to your report in phase 7: subdomain takeover checks. Hand off non-exploitable dangling names to internal operations for DNS retirement, and route valid service endpoints to phase 8: URL discovery for boundary crawling.
Unverified
Section titled “Unverified”| Where | Claim | Why it is uncertain |
|---|---|---|
docs.example.com |
Claimable on GitHub Pages | GitHub requires an organization TXT verification challenge. |
portal.example.com |
Claimable on Azure App Service | Azure enforces domain verification IDs via TXT records. |
assets.example.com |
S3 bucket claimable by any account | Service control policies or regional reservations can block creation. |
status.example.com |
Statuspage record allows claim | Provider validates billing accounts and ownership before routing. |
shop.example.com |
Store slug permits claim | The merchant account can be frozen rather than deleted. |
Open local graph around this page
Linked from here
No other pages link here yet.
Recon AtlasFor authorized testing only. Your scope is the map edge.