Beruflich Dokumente
Kultur Dokumente
Products & Services Support How to Buy Training & Events Partners Go
Overview
This w hite paper provides information on general best practices, netw ork protections, and attack identification techniques that operators and administrators can use for
implementations of the Domain Name System (DNS) protocol. Cisco Security
Intelligence Operations
What is DNS?
DNS is a globally distributed, scalable, hierarchical, and dynamic database that provides a mapping betw een hostnames, IP addresses (both IPv4 and IPv6), text records, mail Related Links
exchange information (MX records), name server information (NS records), and security key information defined in Resource Records (RRs). The information defined in RRs is Products and Services
grouped into zones and maintained locally on a DNS server so it can be retrieved globally through the distributed DNS architecture. DNS can use either the User Datagram Cisco Security Intelligence
Protocol (UDP) or Transmission Control Protocol (TCP) and historically uses a destination port of 53. When the DNS protocol uses UDP as the transport, it has the ability to deal Operations
w ith UDP retransmission and sequencing.
Security Services
DNS is composed of a hierarchical domain name space that contains a tree-like data structure of linked domain names (nodes). Domain name space uses Resource Records Security and VPN Products
(RRs) that may or may not exist to store information about the domain. The tree-like data structure for the domain name space starts at the root zone ".", w hich is the top most Cisco IntelliShield Alert Manager
level of the DNS hierarchy. Although it is not typically displayed in user applications, the DNS root is represented as a trailing dot in a fully qualified domain name (FQDN). For
example, the right-most dot in "www.cisco.com." represents the root zone. From the root zone, the DNS hierarchy is then split into sub-domain (branches) zones. Feedback
Each domain name is composed of one or more labels. Labels are separated w ith "." and may contain a maximum of 63 characters. A FQDN may contain a maximum of 255
characters, including the ".". Labels are constructed from right to left, w here the label at the far right is the top level domain (TLD) for the domain name. The follow ing example What prompted you to visit this page?
show s how to identify the TLD for a domain name: Existing netw ork problem
com is the TLD for w w w .cisco.com as it is the label furthest to the right. Best practice implementation
Research/certification training
Dom ain Nam e Space
The follow ing diagram illustrates a sample of the Domain Name System hierarchy starting from the root ".". Everything below the ".org" domain name space is in the org domain Referred by cow orker/colleague
and everything below ".cisco.com " domain name space is in the cisco.com domain. Referred by Cisco employee
Figure 1. Dom ain Nam e Space What additional topics should be
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
covered?
Submit
The DNS protocol specification and implementation w as originally defined in RFC 882 and RFC 883. These RFCs w ere made obsolete by RFC 1034 and RFC 1035 and have
been updated by multiple RFCs over the years.
Resolver: A DNS client that sends DNS messages to obtain information about the requested domain name space.
Recursion: The action taken w hen a DNS server is asked to query on behalf of a DNS resolver.
Authoritative Server: A DNS server that responds to query messages w ith information stored in RRs for a domain name space stored on the server.
Recursive Resolver: A DNS server that recursively queries for the information asked in the DNS query.
FQDN: A Fully Qualified Domain Name is the absolute name of a device w ithin the distributed DNS database.
RR: A Resource Record is a format used in DNS messages that is composed of the follow ing fields: NAME, TYPE, CLASS, TTL, RDLENGTH, and RDATA.
Zone: A database that contains information about the domain name space stored on an authoritative server.
If the DNS server is only configured as an authoritative server and it receives a DNS query message asking about information w hich the server is authoritative, it w ill cause
the server to inspect locally stored RR information and return the value of the record in the 'Answ er Section' of a DNS response message. If the requested information for
the DNS query message does not exist, the DNS server w ill respond w ith a NXDOMAIN (Non-Existent Domain) DNS response message or a DNS Referral Response
message.
If the DNS server is authoritative, not configured as a recursive resolver, and it receives a DNS query message asking about information w hich the server is not
authoritative, it w ill cause the server to issue a DNS response message containing RRs in the 'Authority Section' and the address mapping for the FQDN from that section
may be present in the 'Additional Section'. This informs the DNS resolver w here to send queries in order to obtain authoritative information for the question in the DNS query.
This is also know n as a DNS Referral Response message.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
If the DNS server is not authoritative but is configured as a recursive resolver and it receives a DNS query asking about information, it w ill cause the server to recursively
query (iterative queries) the DNS architecture for the authoritative DNS server of the information included in the DNS request. Once the recursive DNS resolver has obtained
this information, it w ill provide that information to the original DNS resolver using a DNS response message and the RR w ill be non-authoritative (since the recursive DNS
resolver is not authoritative for the requested information). The recursive DNS resolver may also have know ledge about the requested information stored in DNS cache. If
the requested information is present in the DNS cache, then the recursive DNS resolver w ill respond w ith that RR information.
Figure 2 illustrates the iterative process used by a DNS recursive resolver (DNS Recursor, server) to answ er the DNS query message (question) on behalf of the DNS resolver
(DNS Resolver, client) and provide a DNS query response message (answ er).
1. The DNS resolver sends a query message to the recursive resolver asking for the address of w w w .cisco.com.
2. The DNS recursor sends a query message to the root name servers looking for the .com domain name space.
3. The root name servers send a DNS referral response message to the DNS recursor informing it to ask the gTLD name servers for the .com domain name space.
4. The DNS recursor sends a query message to the gTLD name servers looking for the .cisco.com domain name space.
5. The gTLD name servers send a DNS referral response message to the DNS recursor informing it to ask the .cisco.com name servers, ns1.cisco.com or ns2.cisco.com,
about this domain name space.
6. The DNS recursor sends a query to ns1.cisco.com or ns2.cisco.com asking for w w w .cisco.com.
7. The .cisco.com name servers, ns1.cisco.com or ns2.cisco.com, send an authoritative DNS query response message to the DNS recursor w ith the A (address) RR
information for w w w .cisco.com.
8. The DNS recursor sends a DNS query response message to the DNS resolver w ith the A (address) RR information for w w w .cisco.com.
DNS Messages
All legitimate DNS messages sent or received are composed of multiple sections. These sections of the DNS message contain fields that determine how the message w ill be
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
All legitimate DNS messages sent or received are composed of multiple sections. These sections of the DNS message contain fields that determine how the message w ill be
processed by the device receiving the message. These sections also contain information about the question (query messages) a device is asking or answ ers (response
messages) a device may be providing. The sections present in a DNS message are Header, Question, Answ er, Authority, and Additional.
Note that there are situations w here sections of the DNS message may be empty. An example is a 'DNS Referral Response Message', in w hich the Answ er section is empty,
but the Authority and Additional sections are present and contain RR information.
For more information about the sections of a DNS message, their format, and the fields they contain, consult RFC 1035, Section 4., Messages.
Note: Recursion is enabled by default for Version 9.5 of the BIND softw are and prior. BIND also allow s operators to define view s that can use the follow ing configuration
methods for disabling recursion. View s are not discussed in this document.
Note: The example configurations for BIND w ill use version 9.5.
1. Disable Recursion
// Disable recursion for the DNS service
//
options {
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
options {
recursion no;
};
options {
// Output Truncated.
allow-recursion { recursive-permit; };
allow-query { recursive-permit; };
// Output Truncated.
blackhole { rfc5735-deny; };
};
Other configuration options for BIND are available for limiting how devices can obtain answ ers to recursive DNS messages. Operators can use the 'allow -recursion-on'
configuration option to select w hich addresses on the DNS server w ill accept recursive DNS queries. BIND also allow s operators the ability to select w hich addresses on the
DNS server w ill provide answ ers from the DNS cache using the 'allow -query-cache-on' configuration option. Operators may also configure BIND to only listen on specific
interfaces using the 'listen-on' or 'listen-on-v6' options configuration. For additional configuration options, consult the BIND 9.5 Administrator Reference Manual that can be used
to secure BIND.
Note: Team Cymru also provides a Secure BIND Template that operators can use as a guide for hardening their DNS servers.
Left-click on Start
Left-click on Control Panel
Double-click Administrative Tools
Double-click DNS
2. Within the console tree, right-click the DNS server that recursion w ill be disabled for and then select Properties.
3. Next, left-click the Advanced tab.
4. Within Server options, select the Disable recursion check box and then left-click on OK.
Left-click on Start
Left-click on Run
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
The Run dialog box will appear
Type cmd in the text box to the right of "Open:"
2. At the Com m and Prom pt, issue the follow ing command:
DnsCm d: This is the name of the tool used from the CLI to perform administrative tasks for the DNS Server service.
/Config: Specifies that the argument for the DnsCmd command applies to the configuration of the DNS Server service.
/NoRecursion: Specifies that an argument of 1 or 0 w ill follow to disable or enable recursion for the DNS Server service.
{1|0} This is the name of the tool used from the CLI to perform administrative tasks for the DNS Server service.
Using either of the previous configuration examples for the DNS Server service w ill disable recursion for all resolvers sending recursive DNS queries to the server. If recursion
is disabled, operators w ill not be able to use DNS forw arders on that server.
Microsoft provides additional information operators can use to harden the configuration of the DNS Server service. More information is available in the Securing the DNS Server
service or Security Information for DNS documentation.
Microsoft Window s also provides a feature called DNS Server Secure Cache Against Pollution that ignores the RRs in DNS response messages received from a non-
authoritative server. Note that this feature is enabled by default on Window s 2000 Service Pack 3 (SP3) and Window s Server 2003, and that using this feature w ill also
produce more queries sent from the DNS server.
Note: The transaction ID field for the DNS protocol is only 16 bits in length, so this value can range from 0 through 65535.
During the configuration of BIND for Unix and Linux based systems, it is recommended that operators use /dev/random w ith the --w ith-random dev=PATH argument to the
configure script. /dev/random is a special file used for generating random numbers, also know n as random number generator (RNG) or pseudorandom number generator
(PRNG). Other operating system implementations of /dev/random are different and operators should consult the vendors operating system documentation for details on its
implementation. /dev/random is recommended because it creates an entropy pool (a group of random bits stored in one place) for generating unpredictable random numbers.
Once the bits have been depleted from the entropy pool, a new pool w ill be created containing random bits. Using /dev/random w ill assist BIND in generating random DNS
transaction IDs.
[user@server ~/bind-9.5.0]$
Note: The source port field for the UDP protocol is only 16 bits in length, so this value can range from 0 through 65535.
The follow ing configurations can be applied to BIND so the DNS server w ill randomize the UDP source port for DNS messages. To use these configurations, apply them to the
options section in the 'named.conf' configuration file.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Configuration UDP Source Port Randomization
// The 'query-source' and 'query-source-v6' configurations
// option allows the operator to select the interface(s)
// and UDP source port value used for sending DNS queries.
// If a value of '*' is used for the source port, then a
// port will be used from pool of random unprivileged ports.
// Query port pools are used by default unless a port value
// is explicitly configured.
//
options {
query-source address * port *;
queryport-pool-ports <number>;
queryport-pool-updateinterval <number>;
};
Another multifaceted technique used by attackers is to rapidly change hostname to IP address mappings for both DNS A (address) RRs and DNS NS (name server) RRs,
creating a Double-Flux (DF) netw ork.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Additional information about Fast-Flux is available in Know Your Enemy: Fast-Flux Service Netw orks.
Another potentially malicious use of a short TTL is using a value of 0. This value informs the DNS resolver that the RR information received in the DNS query response message
should not be stored in the cache of the resolver.
Note: DNS SOA RRs are alw ays distributed to resolvers w ith a TTL value of 0.
Attackers can also use long TTL values for RRs so that DNS resolvers w ill cache the information received in the query response message for an extended period of time. This
technique can be used for storing malicious RR information in the cache of a resolver for an extended period of time. If the resolver is a recursive or open resolver, then it can
distribute the RRs for the malicious host to many resolver clients, thus allow ing use for malicious activities. This method differs from the Fast-Flux technique that uses a short
TTL value and operators are able to use traceback techniques to more easily identify malicious hosts distributing this information.
To prevent a DNS server from storing RR information in the cache of the resolver for the value of the TTL received in the DNS query response message, the follow ing options
configurations can be used for BIND.
options {
max-cache-ttl <number>;
};
options {
max-cache-size <number>;
};
Authoritative DNS servers should be used only for responding to queries for domain name space for w hich the server is administrative. Queries from anyone (queries
source from the Internet) may be allow ed for information w e know (authoritative RRs).
Recursive DNS servers should be used only for responding to queries from DNS resolvers inside its administrative domain. Queries from know n sources (clients inside your
administrative domain) may be allow ed for information w e do not know (for example, for domain name space outside our administrative domain).
Authoratative and recursive resolver functions should be segregated because authoritative DNS servers primarily distribute information about hosts accessible via the Internet
and they are also accessible via the Internet for distributing this information. By combining these resolver functions on a single DNS server and allow ing the server to be
accessible via the Internet, malicious users could employ the authoritative DNS server in amplification attacks or easily poison the DNS cache. A recursive DNS resolver must be
protected from the Internet and only trusted sources should be able to send DNS queries. One approach for controlling w hat DNS queries are permitted to exit the netw ork
under an operators control is to only allow DNS queries sourced from the internal recursive DNS resolvers.
Several security controls can be implemented to limit spoofing. These controls are described in the follow ing sections.
Unicast RPF operates in tw o modes: strict and loose. In strict mode, the Unicast RPF feature uses the local routing table to determine if the source address w ithin a packet is
reachable through the interface on w hich the packet w as received. If it is reachable, the packet is permitted; if it w as not, the packet is dropped. Strict mode Unicast RPF is best
deployed on netw ork boundaries w here traffic asymmetry is not prevalent.
Strict mode Unicast RPF is enabled on Cisco IOS devices using the interface configuration command ip verify unicast source reachable-via rx; the previous format of this
command w as ip verify unicast reverse-path. Strict mode Unicast RPF can be enabled on the Cisco PIX, ASA, and FWSM firew alls using the ip verify reverse-path
interface interface configuration com m and.
In loose mode Unicast RPF, if the source address of a packet is reachable through any interface on the Unicast RPF enabled device, the packet is permitted. If the source
address of the IP packet is not present in the routing table, the packet is dropped. Loose mode Unicast RPF can be enabled on Cisco IOS devices using the ip verify source
reachable-via any interface configuration command; loose mode Unicast RPF is not available on Cisco PIX, ASA or FWSM firew alls.
More information about Unicast RPF is available in the Applied Intelligence Understanding Unicast Reverse Path Forw arding w hite paper.
IP Source Guard
IP source guard is a Layer 2 security feature that builds upon Unicast RPF and DHCP snooping to filter spoofed traffic on individual sw itch ports. DHCP snooping, w hich is a
prerequisite of IP source guard, inspects DHCP traffic w ithin a VLAN to understand w hich IP addresses have been assigned to w hich netw ork devices on w hich physical
sw itch port. Once this information has been gathered and stored in the DHCP snooping bindings table, IP source guard is able to leverage it to filter IP packets received by a
netw ork device. If a packet is received w ith a source address that does not match the DHCP snooping bindings table, the packet is dropped.
The implementation of IP source guard w ithin the access layer of a netw ork can effectively eliminate the origination of spoofed IP traffic. How ever, because it requires DHCP to
remain manageable, it is not possible to deploy IP source guard on internal-to-external netw ork boundaries.
The follow ing example illustrates the configuration of IP source guard on interface FastEthernet 0/10 w hich has been assigned to VLAN 100:
!
! Enable DHCP snooping on VLAN 100
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
!
ip dhcp snooping
ip dhcp snooping vlan 100
!
! Enable IP source guard on FastEthernet 0/10
!
interface FastEthernet 0/10
switchport
switchport mode access
switchport access vlan 100
ip verify source
!
See Configuring DHCP Features and IP Source Guard for more information on IP source guard.
The example that follow s demonstrates how ACLs can be used in order to limit IP spoofing. The ACL is applied inbound on the desired interface. The ACEs that make up this
ACL are not comprehensive. If you configure these types of ACLs, seek an up-to-date reference that is conclusive.
!
ip access-list extended ACL-ANTISPOOF-IN
deny ip 10.0.0.0 0.255.255.255 any
deny ip 192.168.0.0 0.0.255.255 any
!
interface Ethernet 0/0
ip access-group ACL-ANTISPOOF-IN in
!
Refer to Configuring Commonly Used IP ACLs for more information on how to configure Access Control Lists.
The official list of unallocated Internet addresses is maintained by Team Cymru. Additional information about filtering unused addresses is available at the Bogon Reference
Page.
Detecting and Preventing DNS Attacks using Cisco Products and Features
The ASA, PIX, and FWSM firew all products, Cisco Intrusion Prevention System (IPS) and Cisco IOS NetFlow feature, provide capabilities to aid in identification and mitigation for
DNS related attacks. The follow ing subsections provide an overview of how each device or feature can be utilized.
Enabling DNS guard through either the command line DNS Guard function or DNS application inspection provides preventive controls against DNS cache poisoning attacks. This
feature is enabled by default and is available on Cisco ASA, Cisco PIX and Cisco FWSM Firew alls.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Transaction ID random ization
Some DNS implementations use a w eak randomization algorithm to generate DNS transaction IDs for DNS query messages. This makes these implementations prone to cache
poisoning and spoofing attacks. The id-random ization parameters submode command for policy-m ap type inspect dns can be used to randomize the DNS transaction ID
for a DNS query. This function w ill harden DNS implementations w ith w eak randomization algorithms.
This feature is available beginning w ith softw are release 7.2(1) for Cisco ASA and Cisco PIX Firew alls. This function is disabled by default on the ASA and PIX firew alls. This
feature is not supported on the FWSM firew alls.
This feature is available beginning w ith softw are release 7.2(1) for Cisco ASA and Cisco PIX 500 Firew alls. This function is not available on FWSM Firew alls. This function is
disabled by default.
This feature is available beginning w ith softw are release 7.2(1) for Cisco ASA and Cisco PIX Firew alls. This feature is available beginning w ith softw are release 3.1 for FWSM
Firew alls. This function is enabled by default w ith a limit of 512 bytes.
Note: Although use of this command does reduce the possibility of being a victim of a DNS Amplification Denial of Service attack, it is more likely to prevent the DNS server from
used as part of the source of a DNS Amplification attack.
Feature Overview
DNS Guard
Beginning w ith softw are release 7.0(5) for Cisco ASA 5500 Series and Cisco PIX 500 Series, and softw are release 4.0 for the FWSM the DNS guard function can be controlled
through the dns-guard global configuration or the dns-guard parameters submode command for policy-map type inspect dns. For Cisco ASA 5500 and Cisco PIX 500 Firew alls
that are running releases prior to 7.0(5) and for the FWSM Firew all releases prior to 4.0, the DNS guard function is alw ays enabled, and it cannot be configured through this
command. The configuration of this feature, w hen configurable, w ill be detailed later in the feature configuration section.
Caution: Application layer protocol inspection w ill decrease firew all performance. This feature should be tested in a lab environment before deployment in production
environments.
Feature Configuration
DNS Guard Configuration
To determine w hether the DNS guard function is enabled globally, look for the follow ing string in the firew all configuration for softw are releases 7.0(5) and later for Cisco ASA
5500 Series and Cisco PIX 500 Series appliances:
If the DNS guard function has been disabled globally, it can be re-enabled using the follow ing commands for softw are releases 7.0(5) and later for Cisco ASA 5500 Series and
Cisco PIX 500 Series appliances:
In softw are releases 7.2(1) and later for the Cisco ASA 5500 Series and Cisco PIX 500 Series appliances, administrators can enable DNS guard functionality through DNS
application inspection and the Modular Policy Framew ork (MPF). Configuration of DNS Guard through DNS application inspection and MPF w ill be demonstrated in the follow ing
DNS application inspection configuration section.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
DNS application inspection utilizes the Modular Policy Framew ork (MPF) for configuration. To configure application inspection, administrators may construct an inspection policy
through the configuration of inspect class maps and inspect policy maps, w hich are applied via a global or an interface service policy. The follow ing example demonstrates
configuration of this feature.
Additional information about DNS application inspection and the Modular Policy Framew ork is available in How DNS Application Inspection Works.
Additional information about application layer protocol inspection is available in Configuring Application Layer Protocol Inspection.
!
class-map inspection_default
match default-inspection-traffic
!
policy-map type inspect dns preset_dns_map
parameters
!
!-- Enable dns-guard to verify that DNS query and
!-- response transaction IDs match and only one DNS
!-- response is allowed through the firewall for
!-- each query.
!
dns-guard
!
!-- Enable id-randomization to generate unpredictable
!-- DNS transaction IDs in DNS messages and protect
!-- DNS servers and resolvers with poor randomization
!-- of DNS transaction IDs.
!
id-randomization
!
!-- Enable a maximum message length to help defeat DNS
!-- amplification attacks. Note: This is the default
!-- configuration and value based on RFC 1035.
!
message-length maximum 512
!
!-- Enable id-mismatch to count DNS transaction ID
!-- mismatches within a specified period of time
!-- and generate a syslog when the defined threshold
!-- has been reached.
!
id-mismatch count 10 duration 2 action log
exit
!
!-- Check for DNS query messages with the recursion
!-- desired (RD) flag set in the DNS header and drop
!-- those packets to avoid being used as a recursive
!-- resolver.
match header-flag RD
drop
!
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
-- CLI Output Truncated --
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
!
service-policy global_policy global
!
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 37841, drop 0, reset-drop 0
message-length maximum 512, drop 0
dns-guard, count 21691
protocol-enforcement, drop 0
nat-rewrite, count 0
id-randomization, count 21856
id-mismatch count 10 duration 2, log 2
firewall#
Interface outside:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 4923, drop 1544, reset-drop 0
message-length maximum 512, drop 39
dns-guard, count 2147
protocol-enforcement, drop 542
nat-rewrite, count 0
id-randomization, count 2220
id-mismatch count 10 duration 2, log 1
Interface inside:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 240, drop 0, reset-drop 0
message-length maximum 512, drop 0
dns-guard, count 88
protocol-enforcement, drop 0
nat-rewrite, count 0
id-randomization, count 116
id-mismatch count 10 duration 2, log 0
firewall#
Syslog Identification
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
In the follow ing example, the show logging | grep regex command extracts syslog messages from the logging buffer on the firew all. These messages provide additional
information about denied packets. It is possible to use different regular expressions w ith the grep keyw ord to search for specific data in the logged messages.
Firew all syslog message 410002 w ill be generated w hen the firew all detects a high rate of DNS responses w ith a mismatched DNS transaction ID. The threshold for this
function is set by the id-m ism atch parameters submode command for policy-map type inspect dns. Additional information about this syslog message is available in Cisco
Security Appliance System Log Message - 410002.
Firew all syslog message 106007 w ill be generated w hen the firew all detects that a DNS response message has already been received for a DNS query message and the
connection entry has been torn dow n by the DNS guard function. This syslog message indicates that the DNS response message received has been denied. Additional
information about this syslog message is available in Cisco Security Appliance System Log Message - 106007.
Additional information about regular expression syntax is available in Using the Command Line Interface.
For additional information about investigating incidents using syslog events, reference the Identifying Incidents Using Firew all and IOS Router Syslog Events Applied Intelligence
w hite paper.
Information about configuring syslog for the Cisco ASA 5500 Series Adaptive Security Appliance or the Cisco PIX 500 Series Security Appliance is available in Configuring
Logging on the Cisco Security Appliance. Information about configuring syslog on the FWSM for Cisco Catalyst 6500 Series sw itches and Cisco 7600 Series routers is available
in Configuring Monitoring and Logging on the Cisco FWSM.
In the preceding example, the DNS guard function has dropped 182 DNS response message packets due to an incorrect DNS transaction ID or a DNS response message w ith
the correct transaction ID has already been received.
For additional information about debugging accelerated security path (ASP) dropped packets or connections, reference the Cisco Security Appliance Command Reference for
show asp drop.
Cisco IPS
The Cisco IPS provides several signatures to detect application specific vulnerabilities such as buffer overflow vulnerabilities as w ell as informational DNS signatures that may
be indicative of reconnaissance or probing. In addition to these application specific signatures, anomaly-based signatures can provide coverage for vulnerabilities such as
amplification attacks or cache poisoning, w here the rate of DNS transactions are likely to vary significantly.
The follow ing table lists the DNS specific signatures provided on the Cisco IPS appliance w ith signature pack S343.
Table 1. DNS-Specific Signatures Provided on the Cisco IPS Appliance w ith Signature Pack S343
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
6057/0 Yes High 100 DNS SIG Buffer
Overflow
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
6065/0 Yes High 100 DNS Query Name
Loop DoS
The follow ing 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.
When NetFlow records are displayed on an IOS device or exported to an offline collection system used for traffic analysis or anomaly detection, the follow ing traffic profiles
can be used to classify potential DNS attacks.
DNS Spoofing Attack: A high rate of DNS traffic w ith 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 w ith a source port of 53 (attacker) destined to a DNS server on your netw ork (attack target).
DNS Am plification or Reflection Attack: A high rate of DNS response traffic, from multiple sources, w ith a source port of 53 (attackers) destined to your netw ork (attack
target). These are likely to use large DNS packets to increase their efficiency; how ever large packets are not a requirement.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Note: The source addresses of the DNS servers used in this attack scenario are typically DNS open resolvers.
DNS Am plification or Reflection Attack Source: A high rate of DNS traffic from your DNS server w ith a source port of 53 (attacker) destined to other netw orks (attack
targets). These are likely to use large DNS packets to increase their efficiency; how ever 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.
512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.015 .001 .206 .066 .073 .000 .000 .000 .000 .000 .000
In the preceding example, there are multiple flow s 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 w ith one legitimate DNS response message, how ever IP address 192.168.3.6 returned multiple DNS response
messages at the same time w ith 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 w as 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
flow s to baseline utilization for DNS traffic on UDP port 53 and also investigate the flow s to determine w hether they are potential malicious attempts to abuse flaw s in
implementations of the DNS protocol.
To view only the traffic flow s for DNS packets on UDP port 53 (hex value 0035), the command show ip cache flow | include SrcIf|_11_.*0035 w ill display the related
NetFlow records as show n here:
Table 3. Tools
DNSCAP - DNS traffic capture https://w w w .dns-oarc.net/tools/dnscap A DNS traffic capture utility that provides DNS-specific
utility functionality beyond that of tcpdump.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
DSC - DNS Stats Collector https://w w w .dns-oarc.net/tools/dsc A DNS tool that creates statistical information for DNS traffic.
fpdns - DNS fingerprinting tool https://w w w .dns-oarc.net/tools/fpdns A tool used to fingerprint DNS resolvers.
dnstop http://dns.measurement-factory.com/tools/dnstop/ A tool that builds statistics based on DNS traffic seen on the
netw ork.
dnsstat http://w w w .caida.org/tools/utilities/dnsstat/ A DNS-specific tool that builds statistics based on DNS traffic
seen on the netw ork.
dig http://w w w .isc.org A pow erful command line utility for debugging and troubleshooting
DNS.
nslookup http://w w w .isc.org and is included w ith many operating systems A command line DNS lookup utility included in many operating
systems.
dnsdump http://dns.measurement-factory.com/tools/dnsdump/ A tool that w ill monitor and display DNS messages seen on the
netw ork.
dnsmap http://code.google.com/p/dnsmap/ A tool that collections all available information for a sub-domain.
TXDNS http://w w w .txdns.net/ A multithreaded Win32 tool used primarily send many DNS queries
at a time for testing DNS servers.
Open Resolver Test from The http://dns.measurement-factory.com/cgi-bin/openresolvercheck.pl/ A w eb-based tool that w ill check DNS servers to determine if they
Measurement Factory support recursion from the Internet.
dnsenum http://code.google.com/p/dnsenum/ A tool that attempts to collect all possible information available for
a domain.
Table 4. Resources
Location Description
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
RFC 1034, DOMAIN NAMES - CONCEPTS AND FACILITIES http://tools.ietf.org/html/rfc1034
RFC 3833, Threat Analysis of the Domain Name System (DNS) http://tools.ietf.org/html/rfc3833
This document is provided on an "as is" basis and does not imply any kind of guarantee or w arranty, including the w arranties 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 ow n risk. Cisco reserves the right to change or update this document at any time.
Back to Top
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Information For News & Alerts Support About Cisco
Small Business New sroom Dow nloads Investor Relations
Midsize Business Blogs Documentation Corporate Social Responsibility
Service Provider Field Notices Environmental Sustainability
Communities
Executives Security Advisories Tomorrow Starts Here
Developer Netw ork
Home (Linksys) Career Opportunities
Technology Trends Learning Netw ork
Industries Cloud Support Community Programs
IPv6 Cisco Pow ered
Contacts Video Portal
Mobility Financing Options
Contact Cisco
Open Netw ork Environment
Find a Partner
Trustw orthy Systems
Contacts | Feedback | Help | Site Map | Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com