[PDF] IP Fragmentation and Measures against DNS Cache Poisoning





Previous PDF Next PDF



BIND 9 Memory Management BIND 9 Memory Management

15 дек. 2022 г. Required for DNS-over-TLS and DNS-over-HTTPS. In BIND 9.16 the ... BIND 9 on Linux and FreeBSD can bind to a port already in use by another ...



Part 3 - Load Balancing With DNSdist

Add DNS-over-TLS or DNS-over-HTTPS. 5 . 7. Page 18. All content © 2021 Internet On Linux with the help of eBPF



Performance of DNS over QUIC

DNS over TLS DNS over HTTPS and DNS over QUIC and compare them all to see After Ubuntu installation



DNS over TCP and TLS

11 нояб. 2014 г. – Bind implementation will begin next. • i-d for WG to consider adopting ... Linux-3.6 default 3.13. – TLS resumption (RFC-5077): client keeps.



How to deliver DNS Services (DoT and DoH) with NGINX

• BIND is 35 being first developed in 1984 on 4.2. BSD UNIX Time for Change? 22. • That backwards compatible thing is about to change. • DNS over TLS (DoT).



A New Needle and Haystack: Detecting DNS over HTTPS Usage

26 авг. 2019 г. Encrypted DNS protocols such as DNS over HTTPS (DoH) and DNS over TLS (DoT) ... author of the BIND DNS application argued that "DoH is an over ...



Installation and Configuration of DoH (DNS over HTTPS) and DoT

DoT (DNS over TLS). December 2020. Manual for. Page 2. System Requirements. 1) OS By default it listens on port 53 which conflicts with bind listening port.



Latest Measurements on DNS Privacy

• Bind 9.12.1 (No TLS). • Unbound 1.7.0. • Knot Resolver 2.3.0. • dnsdist 1.3.0. Other nameservers are available…. Page 6. DNS WG @ RIPE76. DNS Privacy 



Sharelatex Example

2 июл. 2021 г. method for using DNS over TLS to establish secure sessions: • Session Initiation: A DNS server that supports DNS over TLS listens for and.



Performance of DNS over QUIC

TLS and DNS over HTTPS have so far increased process- ing requirements and latency. DNS over QUIC is a new proposed protocol over the faster QUIC transport 



BIND 9 copy

Response cache dnsdist can detect abuse and can rate-limit or block abusive sources. DNS-over-TLS and DNS-over-HTTPS support. DNScrypt support.



A New Needle and Haystack: Detecting DNS over HTTPS Usage

26?/08?/2019 like DNS over HTTPS (DoH) and DNS over TLS (DoT) to allow for the ... author of the BIND DNS application argued that "DoH is an over the ...



IP Fragmentation and Measures against DNS Cache Poisoning

31?/05?/2022 DNS over TLS between the DNS resolver and the authoritative DNS server ... which either had BIND 9 on Linux/Unix or MS DNS on Windows Server ...



Persistent DNS connections for improved performance

07?/06?/2019 We focus on DNS-over-TLS between stub resolver and recursive resolver and study ... blue



Sharelatex Example

4.3.1 Solution: DNS over TLS . 4.5.1 Solution: LDAP with TLS . ... 15 Initialisation and test of DoT configuration using BIND9 and Stunnel. . . . 35.



DNS over TCP and TLS

11?/11?/2014 prevent attacks on the DNS server: use existing TCP anti-DoS ... C & S: <negotiate a TLS session with a new session key in binary>.



Installation and Configuration of DoH (DNS over HTTPS) and DoT

Install and verify Bind9. III. Install and verify dnsdist. IV. Generate TLS certificate. V. Configure dnsdist for DoH and DoT.



RFC 9210: DNS Transport over TCP - Operational Requirements

RFC 7858 - Specification for DNS over Transport Layer Security (TLS) and a limit of six retries as is the default in Linux).



Enterprise Linux Network Services (GL275) H7092S

security with SELinux and Netfilter DNS concepts and implementation with Bind



DNS over TLS using stunnel - ISC Knowledgebase

25 mai 2021 · This article explains how to provide a DNS over TLS service using BIND 9 and stunnel as well as set up a privacy aggregator



BIND Implements DoH - ISC

17 fév 2021 · DNS-over-TLS (DoT) is a popular alternative to DoH BIND A BIND server can accept queries over traditional DNS (aka Do53) DoH and DoT



[PDF] DoH and DoT

Page 6 DNS over HTTPS (DoH) • DNS Queries sent over HTTPS • Request/Response in JSON format GET/POST • Port: 443



[PDF] Release 9188 Internet Systems Consortium

16 mar 2023 · BIND 9 may be configured to provide such capability on supported Linux or Unix platforms DNS over TLS may be configured to



[PDF] Performance of DNS over QUIC - University of Twente Student Theses

In this paper we build a setup for testing DNS protocols and we test the performance of DNS over UDP DNS over TLS DNS over HTTPS and DNS over QUIC and 



[PDF] DNS over TCP and TLS - IETF

11 nov 2014 · prevent attacks on the DNS server: use existing TCP anti-DoS C S:



[PDF] BIND 9 Administrator Reference Manual - ripe

11 avr 2023 · 11 A Brief History of the DNS and BIND Ubuntu LTS 18 04 20 04 22 04 over-TLS DNS-over-HTTPS or VPN DNSSEC makes DNS records 



DNS over TLS/HTTP(S) - DebOps

Unfortunately DoQ/DoH3 is not yet supported by BIND (or common Linux clients) but that is likely to change in the future Clients using external DoT/DoH 



[PDF] Measuring DNS-over-HTTPS Performance Around the World

Both protocols send DNS tra c over a TLS connection with DoH to receive DNS and HTTP requests The authoritative name server runs BIND9 on Linux [27]



Chapter 4 Setting up and configuring a BIND DNS server

By default Red Hat Enterprise Linux uses SELinux in enforcing mode Important Running BIND on RHEL with SELinux in enforcing mode is more secure than 

  • How to set DNS over TLS Linux?

    BIND9 v9. 18 improves support for DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH). However, while the docs explain how to use TLS for the server part, it does not reveal how to enable DNS-over-TLS for query forwarding.
  • Does BIND support DNS over TLS?

    Enable DNS over TLS for Forwarded Queries

    1Navigate to Services > DNS Resolver.2Uncheck Enable DNSSEC Support. DNSSEC is not generally compatible with forwarding mode, with or without DNS over TLS.3Check Enable Forwarding Mode.4Check Use SSL/TLS for outgoing DNS Queries to Forwarding Servers.5Click Save.6Click Apply Changes.
  • How to set DNS over TLS?

    How to Install and Configure a Private BIND DNS Server on Ubuntu

    1Prerequisites.2Install the latest updates.3Install BIND 9 on the DNS server.4Edit the named.conf.options file.5Edit the named.conf.local file.6Create a directory for your zone files.7Create the forward zone file.8Create the reverse zone file.

IP Fragmentation and Measures

against DNS Cache Poisoning (Frag-DNS)

Document history

Version Date Editor Description

1.0 31.05.2022 BSI

Table 1: Document history

Federal Office for Information Security

P.O. Box 20 03 63

53133 Bonn

E-Mail: dns@bsi.bund.de

Internet: https://www.bsi.bund.de

© Federal Office for Information Security 2022

Authors and Acknowledgement

Federal Office for Information Security 3

Authors and

Acknowledgement

This study was executed by

becon GmbH and sys4 AG on behalf of the Federal Office for Information

Security (BSI). This publication was authored by:

• Carsten Strotmann, sys4 AG • Roland van Rijswijk-Deij, NLnet Labs • Patrick Ben Koetter, sys4 AG

Table of Contents

Federal Office for Information Security 4

Table of

C ontent s

1 Executive summary ............................................................................................................................................................................. 7

2 Issue Statement .................................................................................................................................................................................... 10

2.1 The Current State of Research ........................................................................................................................................... 10

2.2 IP Fragmentation ..................................................................................................................................................................... 11

2.3 Avoiding IP Fragmentation ................................................................................................................................................ 12

2.4 DNS cache poisoning ............................................................................................................................................................. 13

2.5 DNSSEC - boon and bane .................................................................................................................................................... 14

3 Current state of IP fragmentation ............................................................................................................................................... 16

3.1 Significance of DNS IP fragmentation ........................................................................................................................... 16

3.1.1 Testing procedure ............................................................................................................................................................... 16

3.1.2 Amount of fragmented DNS traffic ........................................................................................................................... 17

3.1.3 Distribution of fragmented DNS traffic over time ............................................................................................. 17

3.1.4 Fragmentation by nameservers ................................................................................................................................... 18

3.1.5 Fragmentation by DNS resource record type ....................................................................................................... 19

3.1.6 Number of DNS fragments ............................................................................................................................................ 20

3.1.7 Size of DNS fragments ...................................................................................................................................................... 20

3.1.8 Conclusion ............................................................................................................................................................................. 21

3.2 Fragmentation observed in DNS traffic from authoritative DNS severs ...................................................... 22

3.2.1 DNS IP fragmentation send from authoritative DNS servers ....................................................................... 22

3.2.2 EDNS0 maximum response size distribution ....................................................................................................... 24

3.2.3 Distribution of response sizes ....................................................................................................................................... 25

3.2.4 Conclusion ............................................................................................................................................................................. 26

3.3 UPD-only authoritative DNS servers ............................................................................................................................. 27

3.3.1 Test procedure ..................................................................................................................................................................... 27

3.3.2 Authoritative DNS servers without TCP support ................................................................................................ 28

3.3.3 Measurement results ......................................................................................................................................................... 29

3.3.4 Impact of domains with TCP problems on DNS ................................................................................................. 29

3.3.5 Conclusion ............................................................................................................................................................................. 30

3.4 Vulnerability assessment ...................................................................................................................................................... 30

3.4.1 Handling of path MTU changes by operating systems ..................................................................................... 31

3.4.2 OS fragmentation reassembly queue depth ........................................................................................................... 35

3.4.3 Operating systems used for authoritative DNS servers .................................................................................... 36

4 Measures against IP fragmentation ............................................................................................................................................ 38

4.1 Testbeds ........................................................................................................................................................................................ 38

4.1.1 Testbed 1 ................................................................................................................................................................................. 39

4.1.2 Testbed 2 ................................................................................................................................................................................. 39

1 Executive summary

Federal Office for Information Security 5

4.2 Measurements ........................................................................................................................................................................... 39

4.2.1 Baseline .................................................................................................................................................................................... 40

4.2.2 A TCP-only DNS service .................................................................................................................................................. 40

4.2.3 TCP using TLSv1.3 .............................................................................................................................................................. 41

4.2.4 DNS using opportunistic TCP ....................................................................................................................................... 41

4.2.5 DNS using UDP for small responses only ............................................................................................................... 43

4.2.6 DNS discarding fragmented packets ......................................................................................................................... 45

4.2.7 DNS discarding small fragments only ...................................................................................................................... 47

4.2.8 DNS ignoring the additional section ......................................................................................................................... 48

4.2.9 DNS using transaction signatures ............................................................................................................................... 48

4.3 Comparison of measures against IP fragmentation ................................................................................................ 49

5 Recommended action ....................................................................................................................................................................... 51

5.1 Recommendation to operators of DNS server software ....................................................................................... 51

5.1.1 Use the default ethernet MTU in DNS server networks ................................................................................... 51

5.1.2 Restrict the DNS response size over UDP ............................................................................................................... 51

5.1.3 Support DNS-over-TCP ................................................................................................................................................... 51

5.1.4 Evaluate the security risks of LTS operating systems ........................................................................................ 52

5.2 Recommendations to DNS resolver operators .......................................................................................................... 52

5.2.1 Drop fragmented DNS responses ................................................................................................................................ 52

5.2.2 Monitor DNS traffic ........................................................................................................................................................... 53

5.3 Recommendations to operators of authoritative DNS servers .......................................................................... 53

5.3.1 DNSSEC signed zones ....................................................................................................................................................... 53

5.3.2 Avoid large DNS resource record sets ....................................................................................................................... 53

5.3.3 Minimize ANY responses ................................................................................................................................................ 54

5.3.4 Enable minimal responses .............................................................................................................................................. 54

6 Appendix ................................................................................................................................................................................................. 55

6.1 Popular operating systems .................................................................................................................................................. 55

6.2 RSA vs. EC algorithms in OpenINTEL data .................................................................................................................. 55

6.3 Hardware ..................................................................................................................................................................................... 55

6.4 Configuration examples for DNS resolver and authoritative DNS server .................................................... 56

6.4.1 BIND ......................................................................................................................................................................................... 56

6.4.2 Knot DNS ................................................................................................................................................................................ 56

6.4.3 Knot Resolver ....................................................................................................................................................................... 56

6.4.4 PowerDNS Authoritative ................................................................................................................................................ 56

6.4.5 PowerDNS Recursor .......................................................................................................................................................... 56

6.4.6 Unbound ................................................................................................................................................................................. 56

6.4.7 NSD............................................................................................................................................................................................ 56

6.4.8 Windows DNS Server ....................................................................................................................................................... 57

Authors and Acknowledgement

6 Federal Office for Information Security

6.5 Fragmentation measurement ........................................................................

.................................................................... 57

6.6 DNS zones in testbed 2 per server ........................................................................

............................................................ 57

6.7 Configurations ........................................................................

.. 58

6.7.1 Knot resolver........................................................................

. 58

6.7.2 PowerDNS recursor ........................................................................

................................................................................... 58

6.7.3 BIND ........................................................................

................. 59

6.7.4 Unbound ........................................................................

......... 60

6.7.5 nftables blocking fragments ........................................................................

.................................................................. 65

6.7.6 nftables blocking small fragments ........................................................................

..................................................... 66

6.7.7 nftables blocking TCP ........................................................................

............................................................................... 66

6.7.8 DNSDIST TLS 1.3 check using OpenSSL ........................................................................

.......................................... 66

6.8 Glossary ........................................................................

................ 70

7 Bibliography ........................................................................

.................. 72

1 Executive summary

Federal Office for Information Security 7

1 Executive summary

The Domain Name System (DNS) is a core protocol of the Internet. It not only provides a mapping from a

name to an IP-address for all Internet activities, but is also used to store configuration and authentication

data for modern Internet applications. Because of its central and critical role in the Internet, the DNS also

constitutes a popular target for attacks. The DNS can either be targeted itself or be an initial step of an attack to undermine other security measures.

There are several attack methods aimed at the DNS. Most of them are well understood and mitigations are

already deployed. One relatively new attack method abuses IP Fragmentation (see section 2.2) to circumvent

some of the mitigations and security features currently built into DNS software. Previous research has shown that it is possible to use fragmented DNS response messages to insert false or manipulated data into a DNS resolver's cache. This process is called cache poisoning. Given that DNS

resolution is usually the first step of regular Internet communication, manipulating a resolver's cache has

the potential to redirect the Internet communication of its clients to systems under the control of the

attacker.

DNS fragmentation attacks require certain preconditions in order to be successful. While it is known that

cache poisoning through DNS fragmentation is technically possible, prior to this study it was unclear

whether or not the necessary preconditions occur frequently in the Internet. Therefore, it was equally

unclear whether this attack vector poses a real and relevant threat. Additionally, while mitigations have

been previously discussed, their effectiveness and their performance impacts have not been studied in

detail. The research presented in this study tested the preconditions from two points of view: From the perspective of the authoritative DNS Server: The study probed millions of authoritative DNS servers deployed in the Internet to determine whether these servers respond with relatively large DNS messages that are prone to fragmentation. The domains from which we received fragmented responses were weighted against the Tranco list, containing the Internet's most popular

1 million domains. This measurement (details in

sections 3.2 and 3.3) found that while naturally occurring fragmentation in the Internet is infrequent, it is not completely irrelevant - especially as it also affects highly popular domains. From the perspective of the DNS resolver: The DNS traffic of a large ISP in Germany was monitored for a period of 24 hours, in order to measure how many fragmented DNS responses are seen in real

Internet traffic. As analyzed in

section 3.1, we can confirm that DNS fragmentation actually occurs in productive environments.

Since fragmentation attacks mostly target DNS traffic sent over the stateless UDP protocol, one proposed

mitigation strategy is to switch regul ar DNS resolution from UDP to TCP. To evaluate the potential of this

mitigation method, the study looked into the number of authoritative DNS servers deployed in the Internet

that support DNS over TCP. While DNS over TCP has been mandated by the Internet Protocol Standards for

more than 10 years (see RFC 5966 (Bellis, 2010) and 7766 (Dickinson, et al., 2016)) our measurements show that a significant number of DNS servers still do not support TCP (see section 3.4 for details). As a by-product of this study, the measurements mentioned above found that a significant number of

authoritative DNS servers in the Internet run on comparatively old Linux operating systems. While these

"long term support" Linux systems are still officiall y maintained by their respective vendors and therefore receive security patches, certain default settings included in contemporary Linux kernels - some of which would prevent successful DNS fragmentation attacks (see section

3.5.3) - are not present. The analysis found

that running long -term support "enterprise" Linux systems may increase the risk of security issues, even if these systems are fully patched and maintained.

Authors and Acknowledgement

8 Federal Office for Information Security

Knowing that DNS fragmentation attacks are a real threat on the Internet, the study looked into other

mitigation strategies. Because these strategies might have a negative side effect on the operation of the DNS

or the performance of DNS name resolution, they were tested in detail in a laboratory environment that

mimics the structure of the real DNS, including Root-DNS, top-level domains, and second-level domains.

Following is a summary of the mitigation strategies evaluated in this study and assessments thereof: Running a resolver that solely offers DNS over TCP (see section 4.4) has a high impact on DNS performance (> 50% performance loss), and a small but still significant number of authoritative DNS servers in the Internet do not support TCP. Having the resolver running DNS over TLS v1.3 resulted in similar performance drops as using TCP. While it would prevent DNS fragmentation attacks and a wide range of other DNS vulnerabilities, DNS over TLS between the DNS resolver and the authoritative DNS server is still in the process of being standardized in the IETF. There are currently only few DNS server implementations available that support this. For more information, see section 4.5. We envision that DNS over QUIC (QUIC is a new transport protocol based on UDP) could be a more feasible option in the future. To circumvent the issue of authoritative DNS servers that do not support TCP communication, we created an experimental version of the Unbound Resolver that implemented "opportunistic TCP". In this case, the DNS resolver uses TCP whenever possible, but is able to fall back to UDP if TCP is not available. As documented in section 4.6, this mitigation resulted in a high performance loss (>

70%) compared to regular DNS over UDP.

In section 4.7, we report on the testing of the feasibility of using the EDNS message size signaling mechanism to prevent DNS fragmentation by forcing the protocol to use TCP on larger messages that would otherwise risk fragmentation. This mitigation worked very reliably and its performance was comparable to traditional DNS, in some cases with even a slight performance increase. Additionally, this mitigation method is well understood, already supported by major DNS server products, and can be enabled unilaterally. DNS is a very robust protocol, and DNS server software can often reliably work around message losses. As discussed in section 4.8, we tested whether it would be possible to discard all fragmented DNS messages at the firewall level without breaking a majority of DNS resolutions. The test showed that this is indeed possible, and only minor performance losses (less than 10%) were observed. The measurements in section 3 show that while there is naturally occurring (i.e. non attack) fragmentation in the Internet, these DNS messages are only fragmented if they exceed a certain size, while fragmentation attacks prompt smaller DNS messages to be fragmented as well. To apply this observation, we evaluated the possibility of only discardi ng fragmented DNS messages that fall under a certain threshold for naturally occurring fragmentation (see section 4.9). We found that while this is possible, doing so at the firewall level is complex and has no extra benefits compared to dropping all fragmented DNS messages.

DNS fragmentation attacks rely on placing the malicious content into the additional section of DNS response messages, as the additional section is the last part of a DNS response and is therefore more

likely be part of a 2nd fragment. In section 4.10, the study explains why it is not possible to simply ignore parts of the additional section as a possible mitigation against DNS fragmentation attacks. DNS Transaction Signatures (TSIG) have been used in DNS for more than 20 years to protect DNS dynamic up dates and zone transfers. In principle, this function can also be used to secure communication between the DNS resolver and the authoritative server. Section 4.11 shows that TSIG can indeed be used to secure communication and prevent DNS fragmentation attacks, with none or minimal performance impact. However, this kind of TSIG communication is currently not supported by all DNS server implementations and would require configuration changes on both sides of the communication, which will most likely slow down its deployment significantly. In addition, some aspects of this use case need to be further evaluated.

1 Executive summary

Federal Office for Information Security 9

Based on the measurements and tests, we recommend a combination of two efficient actions to mitigate

DNS fragmentation attacks:

Prevent DNS fragmentation by lowering the advertised EDNS maximum message size to 1,232 bytes. This recommendation and the corresponding result of the study was preventively reported to the DNS software community, which supported the decision in October 2020 (on DNS Flag Day

2020), when major vendors of DNS server software chose

1,232 bytes as a new default EDNS

message size for all DNS server software released from that date onwards.

Section 5 provides

information for both operators of DNS resolvers and authoritative DNS servers on how to implement this configuration change in their systems. Block/discard all fragmented DNS messages at the firewall level. With the above change of the EDNS message size, no natural fragmentation should reach the DNS resolver. Therefore, any fragmented DNS messages received are very likely to be malicious in nature and should be blocked at the (host -)firewall. In addition to these two main recommendations, section

5 lists additional configuration changes and best

practices to prevent DNS fragmentation and to lower the risk of successful DNS fragmentation attacks.

However, while changing the configuration mitigates the effect of cache poisoning, it does not eliminate the

cause. In order to resolve the issue of DNS cache poisoning - and many other attacks on DNS infrastructure as well - DNSSEC-signing and validating need to become ubiquitous.

Authors and Acknowledgement

10

Federal Office for Information Security

2 Issue Statement

DNS cache poisoning by means of IP fragmentation

quotesdbs_dbs21.pdfusesText_27
[PDF] linux command tutorial

[PDF] linux dns sinkhole

[PDF] linux notes for bca

[PDF] linux notes pdf

[PDF] linux operating system pdf notes

[PDF] linux rust

[PDF] linux scanner drivers

[PDF] linux tshark tutorial

[PDF] linux written in rust

[PDF] lionsgate films management

[PDF] lipid ncert

[PDF] lipolysis

[PDF] lipschitz condition differential equation

[PDF] lipschitz condition solved examples

[PDF] liquid density experiment