Interview Prep/DevSecOps/Incident Response and Governance

A security researcher reports they took over `promo.example.com`, which pointed to a deleted cloud resource. What happened?

IntermediateScenarioIncident Response and Governance
Answer

Situation read → Subdomain takeover through a dangling DNS record. The CNAME still pointed to a deleted resource (S3 website, Azure app, Heroku), and the attacker claimed that name.

What I'd do →

  1. Delete the dangling DNS record immediately.
  2. Check whether cookies scoped to .example.com could have been read by the attacker's page.
  3. Scan all DNS zones for CNAMEs pointing to non-existent resources (tools like dnsReaper, or a script comparing records to cloud inventory).
  4. Manage DNS in Terraform together with the resource it points to, so they are created and destroyed together.

Why → Takeovers enable phishing and cookie theft on a trusted domain.

Interview tip → "DNS and the resource it points to should share a lifecycle" is the lesson.

All DevSecOps questions

More on Incident Response and Governance