Skip to main content

Research

Request Smuggling in DNS Resolution

Designing and testing for request smuggling across hop boundaries in DNS resolution

Pentrova Research Pentrova Research
6 min read

Reading mode

What is Request Smuggling?#

Request smuggling is a type of vulnerability that can be exploited by attackers to bypass security controls and gain unauthorized access to sensitive data. It involves smuggling a request across hop boundaries, allowing an attacker to manipulate the request and potentially gain access to sensitive information. This can be particularly problematic in DNS resolution, where an attacker can exploit vulnerabilities to manipulate DNS responses and gain access to sensitive data. Request smuggling can be used to exploit vulnerabilities in DNS resolution, such as those introduced by EDNS0 options, which can carry information about the network that originated a DNS query. Additionally, HTTP/2 introduces a single, robust mechanism for request smuggling, which can be exploited by attackers. To understand request smuggling, it is essential to consider the complexities of DNS resolution and the various protocols involved, including HTTP/1.1, HTTP/2, and EDNS0. By understanding these protocols and their vulnerabilities, organizations can better protect themselves against request smuggling attacks.

How DNS Resolution Works#

DNS resolution is the process of translating a domain name into an IP address. It involves a recursive resolver, which sends a request to a stub resolver, which then sends the request to a DNS server. The DNS server responds with the IP address associated with the domain name. However, as noted in draft-hoffman-dns-last-hop-01, the connection between the stub resolver and the DNS server can be susceptible to malicious or unintentional alteration, making it vulnerable to request smuggling.

Request Smuggling Across Hop Boundaries#

Request smuggling across hop boundaries in DNS resolution involves exploiting the differences in how different servers interpret the length of a request. As explained in HTTP Desync Attacks: Request Smuggling Reborn, HTTP/2 introduces a single, robust mechanism for doing this, which can be exploited by attackers. Additionally, EDNS0 options, such as those described in RFC 7871 - Client Subnet in DNS Queries, can be used to carry information about the network that originated a DNS query, making it easier for attackers to smuggle requests.

Comparison of Request Smuggling Techniques#

The following table compares different request smuggling techniques:

TechniqueAdvantagesDisadvantages
HTTP/1.1 Request SmugglingEasy to exploit, high success rateLimited to HTTP/1.1, can be detected by security controls
HTTP/2 Request SmugglingMore difficult to detect, can be used with HTTP/2Requires more complex exploitation techniques
EDNS0 Request SmugglingCan be used with DNS queries, easy to exploitLimited to DNS queries, can be detected by security controls
Bottom line: Each request smuggling technique has its advantages and disadvantages, and the choice of technique depends on the specific vulnerability being exploited.

Detecting Request Smuggling Vulnerabilities#

Detecting request smuggling vulnerabilities can be challenging, but there are several methods and tools that can be used. One approach is to use timing-based scanning to detect potential request smuggling vulnerabilities. This involves analyzing the time it takes for a DNS query to be responded to, and looking for any anomalies that could indicate a request smuggling vulnerability. Additionally, tools such as Burp Suite can be used to test for request smuggling vulnerabilities. These tools can intercept DNS queries and analyze the responses to determine if a request smuggling vulnerability exists. Another approach is to use automated scanning tools to identify potential vulnerabilities in DNS resolution. These tools can analyze DNS queries and responses, and identify any potential weaknesses in the system. By using these methods and tools, organizations can detect request smuggling vulnerabilities and take steps to remediate them.

How to Test for Request Smuggling#

Testing for request smuggling involves a series of steps to determine if a system is vulnerable to request smuggling attacks. The first step is to configure a tool such as Burp Suite to intercept DNS queries. This allows the tester to analyze the DNS queries and responses, and to inject smuggled requests into the DNS queries. The next step is to send a DNS query with a smuggled request and analyze the response to determine if the request was smuggled successfully. This can involve using various request smuggling techniques, such as HTTP/1.1 request smuggling, HTTP/2 request smuggling, or EDNS0 request smuggling. The tester should repeat the test with different request smuggling techniques to determine the most effective method. Additionally, the tester should analyze the response to determine if the request was smuggled successfully, and to identify any potential vulnerabilities in the system. By following these steps, organizations can test for request smuggling vulnerabilities and identify potential weaknesses in their systems.

Remediation and Mitigation Strategies#

Remediating and mitigating request smuggling vulnerabilities involves several strategies. One approach is to use DNSSEC to authenticate DNS responses and prevent request smuggling. DNSSEC uses digital signatures to authenticate DNS responses, making it more difficult for attackers to manipulate DNS responses. Additionally, EDNS0 options can be used to carry information about the network that originated a DNS query, making it more difficult for attackers to smuggle requests. Another approach is to use HTTP/2-specific security measures, such as TLS encryption, to prevent request smuggling. Additionally, organizations can implement security controls, such as firewalls and intrusion detection systems, to detect and prevent request smuggling attacks. By using these strategies, organizations can remediate and mitigate request smuggling vulnerabilities, and protect themselves against request smuggling attacks. It is also essential to regularly test and update systems to ensure that they are not vulnerable to request smuggling attacks, and to stay up-to-date with the latest security patches and updates.

FAQ#

What is the difference between request smuggling and HTTP desync attacks?#

Request smuggling is a type of vulnerability that can be exploited by attackers to bypass security controls and gain unauthorized access to sensitive data, while HTTP desync attacks are a type of attack that involves exploiting the differences in how different servers interpret the length of a request.

How can I use Burp Suite to test for request smuggling vulnerabilities?#

Burp Suite can be used to intercept DNS queries and test for request smuggling vulnerabilities by sending a DNS query with a smuggled request and analyzing the response.

What are the potential consequences of a successful request smuggling attack?#

A successful request smuggling attack can allow an attacker to gain unauthorized access to sensitive data, manipulate DNS responses, and potentially take control of a system.

Written by

Pentrova Research Pentrova Research

Pentrova Research writes about offensive security, LLM-driven pentest chains, and how to ship exploit-grade evidence into engineering pipelines.

Confirmed Findings

See finding confirmation in action

Replace unconfirmed scanner alerts with findings confirmed by AI review of evidence captured from your target, each request ready to copy as cURL.

Request a Pilot →

Keep reading

Site search

↑↓ navigateEnter openEsc close