Skip to content
Memory corruption Write-up Advanced

SIGRed: Exploiting a 17 Year-Old Bug in Windows DNS Servers

A 17-year-old integer overflow in the Windows DNS server's handling of SIG records allowed an attacker to trigger a heap-based buffer overflow by sending a malicious DNS response, potentially leading to remote code execution with SYSTEM privileges. The vulnerability could be exploited by an unauthenticated attacker who can cause the server to query a malicious DNS server, and in some cases even from a browser.

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.

Sagi Tzadik, on research.checkpoint.com

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 an integer overflow: the size calculation for a SIG record's buffer used a 16-bit value, so a large uncompressed name plus a large signature could wrap around to a small number, leading to a heap buffer overflow when copying the data.

Impact

An attacker could potentially achieve remote code execution with SYSTEM privileges, leading to full domain compromise, though the report notes that exploitation requires defeating Control Flow Guard and that browser-based triggering is limited to Internet Explorer and non-Chromium Edge.

What the attacker needed

Attacker controls a domain and DNS server; victim DNS server forwards queries; victim queries attacker's domain; for browser attack: victim uses IE or legacy Edge

The fix

The vulnerability was fixed by Microsoft, as implied by the CVE assignment and the report's discussion of patches.

How it was found

  1. Configure the attacker's domain's NS records to point to a malicious DNS server.
  2. Query the victim Windows DNS server for NS records of the attacker's domain.
  3. The victim forwards the query to its configured forwarder, which returns the malicious NS record.
  4. The victim caches the response, so subsequent queries for subdomains of the attacker's domain are sent to the malicious server.
  5. Send a malicious DNS response containing a SIG record with a large signature and a compressed name that causes an integer overflow.
  6. The victim processes the response, leading to a heap-based buffer 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.

This report describes a serious flaw in the software that runs DNS servers on Windows. DNS is like the internet's phone book, turning names into addresses. The flaw let an attacker send a specially crafted message that caused the server to write more data than it had space for, which could let the attacker take control of the server.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.