Subdomain Takeovers
Compromise a subdomain by taking over resources no longer existing
Last updated
Compromise a subdomain by taking over resources no longer existing
Last updated
Subdomains e.g., projects.mywebsite.com
have DNS records that can point to resources like servers or AWS S3 buckets
When the resource is deleted but the DNS record remains, an attacker can create a new resource with the same name, redirecting traffic to the attacker's
S3 buckets can host static websites and leverage a domain name by having an associated CNAME record configured. This allows you to go to mywebsite.com
instead of https://mywebsite.s3.amazonaws.com
. However, if the bucket is deleted but the CNAME still exists, an attacker can create a new bucket and website, effectively routing any traffic to the attacker's website.
This vulnerability can be discovered while navigating to a domain and receiving a 404 error along with the code NoSuchBucket
. The examples below show a bucket without a CNAME record but the same error messages would show regardless.