A subdomain takeover occurs when a subdomain is pointing to another domain (CNAME) that no longer exists. If an attacker were to register the non existing domain then the target subdomain would now point to your domain effectively giving you full control over the target’s subdomain. What makes this vulnerability so interesting is that you can be safe one minute and a single DNS change can make you vulnerable the next minute.
The vulnerability here is that the target subdomain points to a domain that does not exist. An attacker can then register the non existing domain. Now the target subdomain will point to a domain the attacker controls.
nuclei -t <path>/nuclei-templates/takeovers/* -l all-live.txt
Subdomain TakeOvers by iamaakashrathee
Resources:
https://0xpatrik.com/subdomain-takeover-ns/
How Recon helped me to to find a Facebook domain takeover