DNS Best Practices, Network Protections, and Attack Identification
The following IPS Signatures provide rate based or anomaly detection and are useful in identifying attacks that cause a change in the rate or profile of the DNS traffic (such as amplification or cache poisoning attacks). In many cases, these signatures may require baselining and tuning to accurately detect attacks. For example, administrators could choose to use an event action filter to monitor for traffic destined to only the DNS servers, or only port 53. Additionally, once signatures have been enabled, baselined or tuned, the signatures must be set to a high enough severity to cause incident response personnel to become involved. IPS Signature 4004/0 (Signature Name: DNS Flood Attack) can be specifically used to detect potential DNS Cache Poisoning, Reflection, or Amplification attacks. Table 2. Rate-based or Anomoly Detection Signatures
Cisco IOS NetFlow Administrators can configure Cisco IOS NetFlow on Cisco IOS routers and switches to aid in the identification of traffic flows that may be attempts to exploit these DNS implementation flaws. In general, the following traffic profiles will be associated with these types of attacks; however it is important to note, that depending on NetFlow monitoring location, Network or Port address translation (NAT or PAT) and other variables that these are not absolutes. Administrators should consider these as guidelines and evaluate these events in the context of their network to determine if these events represent malicious activities. The following guidelines assume no Port Address Translation (PAT). When NetFlow records are displayed on an IOS device or exported to an offline collection system used for traffic analysis or anomaly detection, the following traffic profiles can be used to classify potential DNS attacks. DNS Spoofing Attack: A high rate of DNS traffic with a source port of 53 (attacker) destined to an unprivileged port (above 1024) for a DNS resolver (attack target). DNS Cache Poisoning Attack: A high rate of DNS traffic with a source port of 53 (attacker) destined to a DNS server on your network (attack target). DNS Amplification or Reflection Attack: A high rate of DNS response traffic, from multiple sources, with a source port of 53 (attackers) destined to your network (attack target). These are likely to use large DNS packets to increase their efficiency; however large packets are not a requirement. Note: The source addresses of the DNS servers used in this attack scenario are typically DNS open resolvers. DNS Amplification or Reflection Attack Source: A high rate of DNS traffic from your DNS server with a source port of 53 (attacker) destined to other networks (attack targets). These are likely to use large DNS packets to increase their efficiency; however large packets are not a requirement. Note: This may indicate that your DNS server is configured as a DNS open resolver. Several configuration examples are available in the Prevent DNS Open Resolver Configurations above to prevent or restrict your server from responding to recursive DNS queries.
In the preceding example, there are multiple flows for DNS packets on UDP port 53 (hex value 0035). In this example, the IP address 192.168.150.70 originally sent a DNS query message (request) to the DNS server at IP address 192.168.5.5 using UDP destination port 53 (hex value 0x0035) and UDP source port 1027 (hex value 0403). The NetFlow records indicate that IP address 192.168.5.5 responded with one legitimate DNS response message, however IP address 192.168.3.6 returned multiple DNS response messages at the same time with incrementing UDP destination ports and a UDP source port value of 53 (hex value 0x0035). It is likely, given this example that the IP address 192.168.3.6 was attempting to return falsified RR information and poison the DNS cache of the server at IP address 192.168.150.70. Administrators should compare these flows to baseline utilization for DNS traffic on UDP port 53 and also investigate the flows to determine whether they are potential malicious attempts to abuse flaws in implementations of the DNS protocol. To view only the traffic flows for DNS packets on UDP port 53 (hex value 0035), the command show ip cache flow | include SrcIf|_11_.*0035 will display the related NetFlow records as shown here:
DNS Tools and ResourcesTables 3 and 4 list tools and resources that provide more information on DNS. Table 3. Tools
Table 4. Resources
This document is part of Cisco Security Research & Operations. This document is provided on an "as is" basis and does not imply any kind of guarantee or warranty, including the warranties of merchantability or fitness for a particular use. Your use of the information on the document or materials linked from the document is at your own risk. Cisco reserves the right to change or update this document at any time. |