Subdomain Takeover Hunting: Dangling DNS, Orphaned SaaS, and CTEM Remediation Workflows
Subdomain takeover hunting starts with dangling DNS: CNAMEs, NS delegations, and MX records abandoned after a SaaS tenant is deprovisioned. This CTEM guide covers attacker mechanics, the telemetry that surfaces orphaned records early, remediation workflows, and how Trusteed CTEM turns takeover findings into validated, owned action.

Subdomain Takeover Hunting: Dangling DNS, Orphaned SaaS, and CTEM Remediation Workflows
TL;DR
A subdomain takeover happens when a DNS record still points at cloud or SaaS infrastructure your team no longer controls — a deleted Heroku app, an orphaned storage bucket, a decommissioned marketing microsite — and someone else can claim that resource and serve content under your domain. The root cause is rarely a clever exploit. It is stale DNS left behind by ordinary business change. Hunting for it reliably requires continuous DNS inventory, provider fingerprinting, and certificate transparency monitoring, not a quarterly scan. Trusteed CTEM treats dangling records as first-class exposure: discovered, validated for exploitability, tied to an owner, and routed into a remediation workflow instead of a raw scanner alert queue.
What is subdomain takeover?
Subdomain takeover is a misconfiguration class in which a DNS record in a domain you control resolves to a third-party endpoint that no longer exists or is no longer claimed by you. Anyone who can create a resource with the same name at that provider inherits the hostname.
A practitioner definition: a record-to-resource binding where the DNS side is still authoritative and the destination side is unclaimed.
The canonical pattern looks like this:
- A team creates
promo.example.comas a CNAME toexample-promo.herokuapp.com. - The campaign ends; someone deletes the Heroku app but leaves the CNAME.
promo.example.comstill resolves and returns the provider's "no such app" page.- An attacker registers
example-promoat the same provider, and the provider's shared infrastructure now serves attacker content on your hostname.
The same logic applies to A records pointing at released cloud IPs, NS delegations pointing at lapsed nameservers, and MX records pointing at deprovisioned mail tenants. The DNS side of the binding is what makes it yours. The destination side is what makes it claimable.
This is why takeover is a DNS hygiene problem as much as a security tooling problem. Discovery is the easy half. The hard half is knowing which records are still supposed to exist, who owns them, and what the remediation path is when they are not.
Why it matters now
Subdomain takeover is one of the few high-impact exposure classes that gets worse as an organization becomes more modern. Every SaaS migration, marketing microsite, staging environment, and short-lived integration adds a DNS record. Every decommission removes a resource without necessarily removing the record.
The business impact compounds because hostnames are trust anchors, not just addresses:
- Cookies and session scope. A parent-domain cookie (
.example.com) is sent to any subdomain that resolves. A takeover can capture sessions issued by sibling applications. - OAuth and SSO redirect URIs. Applications that allowlist a redirect URI pattern under your domain can be manipulated when an attacker controls one of those hostnames.
- CSP and CORS allowlists. Content Security Policy entries and cross-origin allowlists that trust
*.example.comextend that trust to whoever claims the orphaned name. - Phishing and mail reputation. A takeover on a domain used for email can support convincing credential-harvesting pages; dangling MX records can be worse, redirecting mail outright.
- Certificate issuance signals. If an attacker obtains a TLS certificate for a hostname you do not actively use, that often appears in certificate transparency logs before the misuse is visible in traffic.
- Chain potential. Takeover is frequently the first step in a longer chain: a trusted origin enables cache poisoning, WAF bypass, or internal-network access via CORS and postMessage assumptions.
In threat-exposure terms, this is a class where detection value is high, exploitation is cheap, and the fix is usually a single DNS change — which makes it an ideal fit for a continuous, prioritized workflow rather than a periodic audit.
How attacks / risks work
The mechanics vary by record type, and severity varies with them.
Dangling CNAME to a SaaS or PaaS endpoint. The most common case. Providers with per-tenant naming — application platforms, static hosting, CMS hosting, form builders, helpdesk and marketing platforms, status pages — each have a recognizable "unclaimed" response: a specific 404 body, a provider-branded error string, or an HTTP status and header combination. Fingerprinting depends on knowing those patterns and checking them continuously, because the destination state changes the moment a tenant is deleted.
Dangling A/AAAA records to recycled cloud IPs. When an elastic IP or public cloud address is released, it returns to the provider pool and can be reallocated. A record pointing at it no longer points at anything you own. This class is easy to miss because there is no provider error page to fingerprint — the address simply comes back to life with someone else's workload.
Dangling NS delegation. The highest-severity variant. If a subzone's NS records point at nameservers you no longer control (a lapsed provider, an abandoned DNS account), the attacker who claims that nameserver account controls the entire subzone: records, mail routing, verification TXT entries. Treat NS records with the same rigor as production credentials.
Dangling MX and verification TXT records. MX records aimed at a retired mail tenant can enable mail interception or forged inbound paths. Leftover verification TXT records — including the tokens used to prove ownership of a SaaS tenant — can also become a shortcut for claiming a service under your name.
Operational causes. Reorgs and rebrands, agency-managed campaigns that end, free-trial infrastructure never migrated to production, sandbox environments spun up by engineers and never decommissioned, acquisitions where DNS was merged but ownership was not. In practice, almost none of these are malicious. They are the predictable residue of a change process that does not include DNS.
The attacker workflow is largely automated: gather subdomains, resolve them, fingerprint responses against known provider signatures, and test claimability. The defender's advantage is that the same automation can run continuously against your own inventory — with ownership context attached.
Detection and visibility
You cannot fixed-list your way out of this problem, because the vulnerable condition is state, not code. Good telemetry looks like a set of continuously refreshed evidence sources:
- Authoritative zone data versus discovered names. Compare what your DNS provider says exists against what reconnaissance observes from the outside. Unexplained deltas are the risk signal.
- Record-level inventory with provenance. For every CNAME, A/AAAA, NS, MX, and TXT record: which provider, which service, which internal owner, which environment, and when it was last touched.
- Provider fingerprint checks. Active HTTP(S) probing of each hostname, evaluated against known unclaimed-resource signatures, plus DNS-level checks for delegation and mail records.
- Certificate transparency monitoring. Newly issued certificates for hostnames you do not operate or have retired are strong indicators that a name is live in someone else's hands — or about to be.
- Passive DNS history. Useful for spotting names that appeared briefly, changed providers, or still resolve to infrastructure that no longer belongs to you.
- Cloud and SaaS asset inventory. Records are only dangling relative to what you still own. Without asset inventory, "dangling" is guesswork.
- Post-decommission verification. A scheduled re-check after any service retirement, campaign end, or environment teardown.

What separates mature programs here is not the fingerprint list. It is the ownership data attached to each record, and the discipline of re-checking after every change that could orphan one.
Reduce risk / best practices
- Maintain a DNS-to-owner registry. Every record has a human owner, a business purpose, and an expected lifetime. Records without owners are the ones that become dangling.
- Make DNS teardown part of decommissioning. Add record removal to the same checklist that deletes the app, the bucket, and the SaaS tenant. Sequence matters: remove the record first.
- Use provider claim-verification tokens. Many providers let you prove ownership with a TXT record or account binding. Keep those in place and monitored so a provider-side deletion cannot silently free your hostname.
- Prefer records you control. Where a provider supports it, use delegated subdomains with your own nameservers rather than apex CNAMEs to shared tenant names.
- Treat NS and MX as critical. Any dangling delegation should be remediated immediately, with the same urgency as an exposed credential.
- Watch certificate transparency. Alert on issuance for retired or unknown hostnames and investigate before misuse spreads.
- Scan continuously, not annually. Takeover windows open the moment a resource is deleted. A quarterly sweep leaves months of exposure.
- Route findings into one prioritized queue. A dangling name pointing at a vulnerable, internet-facing service is a different risk than a dangling name pointing at a dead page. Prioritize exploitability and business context.
- Re-verify after remediation. Confirm the record is gone from authoritative DNS, from public resolvers, and from cached resolvers — then confirm the provider resource is also released.
How Trusteed CTEM helps

- Continuous attack surface inventory. Trusteed CTEM discovers domains, subdomains, IPs, services, and technologies through passive and active discovery, so orphaned records surface inside an inventory you already maintain and scan on an ongoing cadence rather than in a one-off report.
- Findings enriched with real-world context. Detections are correlated with catalog CVE data and augmented with EPSS/KEV and exploit references where available, so a hostname that fronts an exposed, exploitable service ranks above one that resolves to a harmless placeholder.
- Validation before alarm. Trusteed's SOC gate is deliberate: not every scanner hit becomes an alarm. Findings are validated for exploitability and business context, so dashboards and analyst queues focus on
should_alarmitems — a meaningful difference when DNS misconfiguration checks are noisy by nature. - DNS, mail, and TLS posture in the same platform. Network, web, SSL/TLS, and mail/DNS posture scanning live alongside application testing, which is where takeover risk actually gets chained and exploited.
- Depth for the apps behind the hostname. A dedicated API surface worker plus a deep DAST worker cover the web and API exposure that a reclaimed subdomain would inherit.
- Reporting and operator workflow. Framework-oriented views and customer reporting support the audit trail remediation needs, managed from app.trusteed.io.
Trusteed CTEM vs point tools
| Capability | Typical point tool / one-off takeover checker | Trusteed CTEM |
|---|---|---|
| Discovery scope | Runs against a list you supply | Continuous discovery of domains, subdomains, IPs, services, and technologies |
| Record context | Reports a match, not an owner | Asset inventory with ownership and scan-plan context |
| Exploitability | Binary hit or miss | CVE correlation with EPSS/KEV and exploit references where available |
| Noise handling | Every hit is an alert | Validation / SOC gate so only actionable findings alarm |
| Application depth | DNS and HTTP response only | Web, API surface, SSL/TLS, and mail/DNS posture scanning |
| Cadence | Point-in-time | Ongoing scan plans that re-check after change |
| Reporting | Raw output | Compliance-oriented views and customer reporting |
| Workflow | Export to a ticket | Prioritized queue operated at app.trusteed.io |
Point tools — template-based scanners, takeover checkers, container and CI scanners — are genuinely useful signal generators. They are not a CTEM workflow. The gap is inventory, validation, prioritization, and the operational loop that closes findings.
FAQ
How is subdomain takeover different from a DNS misconfiguration? DNS misconfiguration is the umbrella. Takeover is the specific case where the misconfigured record points at infrastructure someone else can claim. A wrong TTL is a misconfiguration; an orphaned CNAME to a deleted SaaS tenant is a takeover risk.
Do I need to worry about this if my DNS is managed by a mature provider? Yes. The record is authoritative and correct from DNS's point of view. The problem exists at the destination — the provider resource was deleted, and the record was not. Managed DNS does not detect that.
What is the highest-severity variant? Dangling NS delegation. If the nameservers for a subzone are no longer under your control, the entire zone — records, mail, verification tokens — can be operated by someone else. Dangling MX is a close second because it directly affects email.
How fast can a takeover be exploited? Once a resource is deleted and a record remains, the window is open immediately. Claiming is often trivial. This is why continuous checking matters more than fingerprint breadth.
Can certificate transparency logs help me detect takeovers? They help detect signals: a new certificate issued for a hostname you have retired or never operated suggests someone is actively using it. CT logs alone don't confirm takeover, but they are a strong monitoring input when combined with DNS and provider checks.
How does CTEM differ from just running a scanner? A scanner answers "does this pattern match?" CTEM answers "what do I own, what is exposed, what is actually exploitable, who owns the fix, and did it get fixed?" Continuous Threat Exposure Management adds inventory, validation, prioritization, and a remediation loop around the scanning signal.
What should remediation look like in practice? Remove the record from authoritative DNS, verify it has aged out of public and cached resolvers, confirm any provider-side resource is released, and re-check after the next decommission cycle. Then fix the process that let the record outlive its resource.
Related resources
- Trusteed CTEM platform — continuous exposure management for external and internal attack surface.
- Trusteed vulnerability intelligence blog — KEV, emergent-threat, and exposure-management analysis.
- Trusteed operator console — scan plans, findings, and validation workflow.
- OWASP: Subdomain Takeover — web security testing guidance covering host and DNS configuration issues.
- NIST SP 800-81-2: Secure Domain Name System (DNS) Deployment Guide — DNS operational and security controls.
- CISA: Securing Domain Name Systems — guidance on DNS infrastructure hardening and monitoring.