Motivation
A 17-year-old integer overflow in the Windows DNS server's parsing of SIG records allowed an unauthenticated attacker to trigger a heap-based buffer overflow by sending a malicious DNS response, potentially leading to remote code execution as SYSTEM and full domain compromise.
research.checkpoint.com
Published on research.checkpoint.com
DNS, which is often described as the “phonebook of the internet”, is a network protocol for translating human-friendly computer hostnames into IP addresses. Because it is such a core component of the internet, there are many solutions and implementations of DNS servers out there, but only a few are extensively used.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the allocation size passed to RR_AllocateEx is truncated to 16 bits, so a calculated size larger than 65,535 bytes wraps around to a small value, leading to a heap buffer overflow when the full data is copied.
Impact
An attacker could achieve remote code execution with SYSTEM privileges on the DNS server, leading to Domain Administrator rights and full compromise of the corporate infrastructure; however, triggering from a browser is limited to Internet Explorer and non-Chromium Edge because most browsers block HTTP requests to port 53.
What the attacker needed
Attacker controls a domain and DNS server; victim DNS server forwards queries; for browser trigger: IE or non-Chromium Edge
The fix
Microsoft released a patch for CVE-2020-1350; the text does not detail the fix but implies it was addressed.
How it was found
- Configure a domain's NS records to point to a malicious DNS server.
- Query the victim Windows DNS server for NS records of that domain, causing it to forward the query and learn the malicious name server.
- Send a DNS response with a large SIG record (over 64KB) using TCP and pointer compression to trigger the overflow.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The Windows DNS server, which helps computers find each other on a network, had a bug in how it read a special type of DNS answer called a SIG record. An attacker could send a crafted answer that made the server write more data than it had space for, corrupting memory. Because the DNS server runs with high privileges, this could let the attacker take over the whole network.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.