> For the complete documentation index, see [llms.txt](https://heinosass.gitbook.io/leet-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heinosass.gitbook.io/leet-sheet/web-app-hacking/dns-attacks.md).

# DNS Attacks

## Dangling Records

{% embed url="<https://nakedsecurity.sophos.com/2020/07/07/company-web-names-hijacked-via-outdated-cloud-dns-records/>" %}

Let’s say a company sets up a temporary site - julyoffer.company.com - which is only supposed to be active for 1 month and will not be used after that.

Since it’s a temporary site, you might not include it in your main website, but rather make a new microsite. You use the hosting provider `hostingco` and set up a DNS record like so:

```
julyoffer.example.com: alias (CNAME record) -> temp-1234.hostingco.example (cache for 5 mins)
```

When the julyoffer site is taken down, but the DNS record is left dangling, then you might have a problem. If hostingco recycles the temporary cloud names (temp-1234), then an attacker may be able to set up his own site on temp-1234.hostingco.example

In that case, the attacker could take over traffic coming to julyoffer.example.com. He could use that to host malware on a trusted domain, or conduct a phishing campaign.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://heinosass.gitbook.io/leet-sheet/web-app-hacking/dns-attacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
