Lesson 6 of 9 · 23m
Impact, Exploit Paths, and Responsible Proof
Why a controlled subdomain is security-critical: phishing, cookies, OAuth callbacks, CSP trust, email abuse, and how to prove impact without causing harm.
A subdomain takeover is not dangerous because an attacker can host a joke page under your brand. It is dangerous because browsers, users, certificate authorities, and internal systems all assign meaning to names. Trust is attached to the label.
What an attacker inherits
campaign.acme-corp.com
-> browser origin under your brand
-> possible TLS certificate through DNS validation
-> reputation inherited from parent domain
-> trust in phishing emails and support workflows
-> access depending on cookie scope and application designIf cookies are scoped broadly, such as Domain=acme-corp.com, attacker-controlled subdomains may receive them. Modern cookie rules and browser protections reduce some abuse, but broad cookie scope remains a common self-inflicted weakness.
OAuth and redirect confusion
Applications often allow callback URLs under the primary domain. A loose rule like 'any *.acme-corp.com redirect is trusted' turns a forgotten subdomain into an account-token capture endpoint. Review callback validation for exact-match schemes, hosts, paths, and whether wildcard subdomain trust is genuinely needed.
Content trust is not cosmetic
A controlled subdomain can serve JavaScript to users who believe they are on your property. It can also affect:
- Content Security Policy source lists that trust subdomains broadly.
- CORS rules using suffix matching instead of exact origins.
- PostMessage origin checks with weak hostname validation.
- PDF viewers, chat widgets, and support portals embedded under brand names.
Responsible proof is minimal proof
A safe proof-of-concept should demonstrate control or plausibility without touching real users:
1. Preserve DNS and HTTP evidence.
2. Use a unique canary string in the finding, not a real credential harvester.
3. If authorized, host a plain text marker on controlled infrastructure.
4. Never collect cookies, tokens, credentials, or user traffic.
5. Report the shortest path to remediation.The best remediation is usually boring: delete the dangling DNS record. If the hostname is still needed, restore ownership by recreating the backing resource and documenting the owner.
Triage impact honestly
A dangling blog-cdn name used only as an object host is different from login-help referenced by authentication flows. Ask where the hostname is trusted: browser origin, email links, OAuth redirects, CSP, mobile app configuration, or internal service discovery.
Field notes
- A takeover with no users can still be severe if a certificate authority or OAuth client trusts the name.
- Search application configuration for the exact hostname before rating impact.
- Watch for copy-paste scope mistakes in reports: a dangling record in one environment is not proof every environment is vulnerable.
- Fix the process after fixing the record. Otherwise the same launch-and-forget path returns next quarter.
Was this lesson helpful?