How Do Attackers Take Over Subdomains Pointing at Cloud Services?
Published 2026-11-14 · Reviewed 2026-11-14 · 6 min read · By the Ingenious AI team
Is someone impersonating your domain right now?
Run the free DomainGuard scan: lookalike registrations, MX-armed variants, certificate-transparency and CAA checks for your domain, in one report.
Run my free DomainGuard scanThe short answer
Attackers take over subdomains when a CNAME record points at a cloud resource that no longer exists — a deleted storage bucket, a removed web app, an abandoned CDN endpoint. The DNS record still sends your subdomain's visitors to that service, and if the attacker can register a new resource with the same name, the service starts answering for your subdomain. No hacking of your systems is involved; the attacker simply claims an abandoned name you still point at. The fix is an audit rhythm: every CNAME in your zone should resolve to a resource you can prove you still own.
The mechanism: a pointer outliving its target
Subdomains usually delegate by CNAME: events.yourbrand.com might point at a site-builder hostname, app.yourbrand.com at a cloud web app, files.yourbrand.com at a storage endpoint. The arrangement is safe while the target exists and is yours. It becomes a vulnerability at decommissioning time, when a team deletes the cloud resource — finishing a campaign, migrating platforms, closing a project — and nobody removes the DNS record, because DNS lives with a different team or a different memory.
From that moment your subdomain is a loaded pointer aimed at a name anyone can claim. Cloud resources are identified by names in shared namespaces: a storage account name, an app-service hostname, a CDN endpoint. Whoever registers the freed name first receives your subdomain's traffic, can serve any content under your brand's address, and can usually obtain a valid TLS certificate for it automatically. Attackers scan for exactly these dangling records at internet scale, with published fingerprints for dozens of vulnerable services.
Provider patterns: Azure, AWS, and GCP
On Azure, the classic cases are deleted App Service sites, storage accounts, and CDN endpoints whose hostnames end in recognisable suffixes; the takeover signal is a CNAME to such a suffix returning the provider's 'not found' style response. On AWS, abandoned S3 website buckets are the famous case — a CNAME or alias to a bucket that now returns NoSuchBucket invites an attacker to create a bucket with the same name in the same region and inherit the subdomain. Elastic Beanstalk and CloudFront distributions have their own variants of the same shape.
GCP follows the same physics with its own surfaces: App Engine and Firebase hosting names, Cloud Storage buckets serving websites, and load-balancer backends whose DNS outlives the project. The provider names differ; the audit question never does. For every external target in your zone, can you open the provider console today and show the live resource, in your account, with that exact name? Any record failing that test is either already takeable or one deletion away from it.
How attackers find yours before you do
Takeover hunting is automated and patient. Scanners enumerate subdomains from Certificate Transparency logs and passive DNS, follow every CNAME chain, and fingerprint the responses against a library of takeover signatures — the specific error pages and status codes each provider returns for unclaimed resources. A dangling record on a scanned subdomain can be found within days of the target's deletion, and the claim itself takes the attacker minutes.
This is why 'we will notice if something appears' is not a strategy. The first content served from a taken-over subdomain is often quiet: a credential page aimed at one campaign, a cookie-setting redirect, a file used to prove domain control to some other service. Subdomain control can also be used to pass domain-validation checks — email-based and DNS-based verification alike — which turns a forgotten marketing subdomain into a skeleton key for certificates and service accounts in your brand's name.
Auditing your zone like you mean it
Export the full DNS zone and list every CNAME, then every target, then the owning team and the live resource for each. Resolve each chain end-to-end (tools like dig with +trace show the hops) and record what the endpoint actually returns today. Cross-check against CT logs: certificates issued for your subdomains that your teams do not recognise are a high-priority lead, because an attacker who claims a resource typically secures it with HTTPS early.
Interview the organisation, not just the zone. The dangling records belong to finished campaigns, departed vendors, hackathon projects, and agencies that set up landing pages under your name. Ask marketing and IT the same question — 'what have we deleted or stopped paying for in two years?' — and reconcile the answers against the CNAME list. DomainGuard's audit covers the external half of this: dangling-record and takeover-risk findings appear in the same report as your lookalikes, because from outside, that is exactly how an attacker assembles the picture.
Fixing, and preventing recurrence
For a record whose resource is gone and unneeded, the fix is one deletion in DNS — do it the moment the audit confirms abandonment, before any deeper investigation, because every hour of delay is exposure. For records pointing at live third parties, document the owner and renewal, and set a calendar review. If a takeover has already happened, treat it as an incident: remove the DNS record first (that severs the attack instantly, regardless of whose resource it is), then investigate what was served and whether any validation or tokens were issued against the subdomain.
Prevention is a process change, tiny and absolute: no cloud resource under a company subdomain is deleted without a paired DNS ticket, and no DNS record is created pointing outside without a named owner recorded next to it. Add the quarterly zone audit to the same calendar as your DMARC report review. Estates stay safe not because they were audited once, but because the audit is a rhythm an attacker cannot wait out.
Five actions to take today
- Export your DNS zone and list every CNAME with its target, its owning team, and its live resource.
- Resolve every CNAME chain and flag any target returning a provider 'not found', 'NoSuchBucket', or similar unclaimed signature.
- Delete DNS records for abandoned resources immediately — removal severs a takeover in progress.
- Cross-check Certificate Transparency logs for certificates on your subdomains that no team recognises.
- Adopt the paired-ticket rule: no external resource is deleted without a matching DNS cleanup ticket.
Worked example: Brightpath Tutoring closes four dangling records
Brightpath Tutoring, a fictional education company monitoring 3 domains, audited 212 DNS records across its zones and found 31 CNAMEs pointing outside. Four targets no longer existed: a campaign site from two years earlier, a deleted storage bucket, a vendor portal the company had churned away from, and a test app on a cloud suffix. One of the four was already returning an unclaimed-resource signature that takeover scanners fingerprint. All four records were deleted the same afternoon; the remaining 27 externals got named owners and a quarterly review date. The audit took one engineer one day — against a subdomain estate the company had accumulated over six years.
FAQ
How do I know if a subdomain has already been taken over?
Visit it and resolve its CNAME chain. Content you do not recognise served under your subdomain, a fresh certificate nobody requested, or a provider page where your service used to be are the tell-tale signs. Removing the DNS record stops it immediately.
Which cloud services are most commonly involved?
Any service that assigns names in a shared namespace: cloud web apps, storage buckets with website hosting, CDN endpoints, and site builders. The published takeover fingerprint lists cover dozens of providers.
We still use the vendor, but the subdomain shows an error. Is that a takeover risk?
Possibly. If the vendor deleted or renamed your instance, the name may be claimable even though your commercial relationship continues. Confirm the exact target hostname with the vendor and correct or remove the record.
Does removing the CNAME hurt anything legitimate?
If the target resource is genuinely gone, nothing legitimate can be using it — the record only serves whoever claims the name next. Verify abandonment with the owning team, then delete without delay.
How often should the audit run?
Quarterly at minimum, and event-driven whenever a campaign ends, a vendor is churned, or a project is decommissioned. Deletion events are when dangling records are born.