Reserved IP Address Space Reminder
Last Updated: 2012-05-16 14:25:29 UTC
by Johannes Ullrich (Version: 1)
As we are running out of IPv4 address space, many networks, instead of embracing IPv6, stretch existing IPv4 space via multiple levels of NAT. NAT then uses "reserved" IP address space. However, there are more address ranges reserved then listed in RFC1918, and not all of them should be used in internal networks. Here is a (probably incomplete) list of address ranges that are reserved, and which once are usable inside your network behind a NAT gateway.
| Address Range | RFC | Suitable for Internal Network |
|---|---|---|
| 0.0.0.0/8 | RFC1122 | no ("any" address) |
| 10.0.0.0/8 | RFC1918 | yes |
| 100.64.0.0/10 | RFC6598 | yes (with caution: If you are a "carrier") |
| 127.0.0.0/8 | RFC1122 | no (localhost) |
| 169.254.0.0/16 | RFC3927 | yes (with caution: zero configuration) |
| 172.16.0.0/12 | RFC1918 | yes |
| 192.0.0.0/24 | RFC5736 | no (not used now, may be used later) |
| 192.0.2.0/24 | RFC5737 | yes (with caution: for use in examples) |
| 192.88.99.0/24 | RFC3068 | no (6-to-4 anycast) |
| 192.168.0.0/16 | RFC1918 | yes |
| 198.18.0.0/15 | RFC2544 | yes (with caution: for use in benchmark tests) |
| 198.51.100.0/24 | RFC5737 | yes (with caution: test-net used in examples) |
| 203.0.113.0/24 | RFC5737 | yes (with caution: test-net used in examples) |
| 224.0.0.0/4 | RFC3171 | no (Multicast) |
Most interesting in this context is RFC6598 (100.64.0.0/10), which was recently assigned to provide ISPs with a range for NAT that is not going to conflict with their customers NAT networks. It has been a more and more common problem that NAT'ed networks once connected with each other via for example a VPN tunnel, have conflicting assignments.
Which networks did I forget? I will update the table for a couple days as comments come in.
------
Johannes B. Ullrich, Ph.D.
SANS Technology Institute
Twitter
Got Packets? Odd duplicate DNS replies from 10.x IP Addresses
Last Updated: 2012-05-16 11:48:23 UTC
by Johannes Ullrich (Version: 1)
This is a clarification to Dan's diary from yesterday. We are interested to hear, if anybody else is seeing DNS replies from RFC1918 non-routable IP addresses, in particular from 10.0.0.0/8. So far, we only have one report, and we are trying to figure out if this is something wide spread, or something unique to this user.
This reader first noticed the problem when the firewall reported more dropped packets from 10.x addresses. Two example queries that caused the problem are A queries for 25280.ftp.download.akadns.net and adfarm.mplx.akadns.net. The reader receives two responses: One "normal" response from the IP address the query was sent to, and a second response from the 10.x address. As a result, the problem would go unnoticed even if the 10.x response is dropped. Both responses provide the same answer, so this may not be an attack, but more of a misconfiguration.
As a side note, initially the DNS protocol specifically allowed for replies to arrive from an IP address different then the one the query was sent to:
"Some name servers send their responses from different addresses than the one used to receive the query. That is, a resolver cannot rely that a response will come from the same address which it sent the corresponding query to. This name server bug is typically encountered in UNIX systems." (RFC1035)
However, later in RFC2181, this requirement was removed:
"Most, if not all, DNS clients, expect the address from which a reply is received to be the same address as that to which the query eliciting the reply was sent. This is true for servers acting as clients for the purposes of recursive query resolution, as well as simple resolver clients. The address, along with the identifier (ID) in the reply is used for disambiguating replies, and filtering spurious responses. This may, or may not, have been intended when the DNS was designed, but is now a fact of life." (RFC2181)
But we are NOT looking for responses that are coming from the wrong source, but duplicate responses. Once from the correct and once from the incorrect address.
Here an example "stray" packet submitted by the reader (slightly modified for privacy reasons and to better fit the screen)
Internet Protocol Version 4, Src: 10.17.x.y, Dst: ---removed---
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00
Total Length: 84
Identification: 0x2a7e (10878)
Flags: 0x00
Fragment offset: 0
Time to live: 59
Protocol: UDP (17)
Header checksum: correct
User Datagram Protocol, Src Port: domain (53), Dst Port: antidotemgrsvr (2247)
Domain Name System (response)
Transaction ID: 0xb326
Flags: 0x8400 (Standard query response, No error)
1... .... .... .... = Response: Message is a response
.000 0... .... .... = Opcode: Standard query (0)
.... .1.. .... .... = Authoritative: Server is an authority for domain
.... ..0. .... .... = Truncated: Message is not truncated
.... ...0 .... .... = Recursion desired: Don't do query recursively
.... .... 0... .... = Recursion available: Server can't do recursive queries
.... .... .0.. .... = Z: reserved (0)
.... .... ..0. .... = Answer not authenticated
.... .... ...0 .... = Non-authenticated data: Unacceptable
.... .... .... 0000 = Reply code: No error (0)
Questions: 1
Answer RRs: 1
Authority RRs: 0
Additional RRs: 0
Queries
ads.adsonar.akadns.net: type A, class IN
Name: ads.adsonar.akadns.net
Type: A (Host address)
Class: IN (0x0001)
Answers
ads.adsonar.akadns.net: type A, class IN, addr 207.200.74.25
Name: ads.adsonar.akadns.net
Type: A (Host address)
Class: IN (0x0001)
Time to live: 5 minutes
Data length: 4
Addr: 207.200.74.25 (207.200.74.25)
http://www.faqs.org/rfcs/rfc1035.html
http://www.faqs.org/rfcs/rfc2181.html
------
Johannes B. Ullrich, Ph.D.
SANS Technology Institute
Twitter
Odd DNS replies from 10 nets and RFC1323 impacting firewalls
Last Updated: 2012-05-16 01:21:08 UTC
by Dan Goldberg (Version: 6)
Reader Bob wrote in reporting seeing increasingly frequent incoming DNS replies on UDP 53, with valid DNS answers, but coming from source addresses in the 10.x.x.x/8 range. The responses appear to be from the Internet Roots to DNS servers that are querying the root.
Anyone else see this kind of behavior?
Over the past week another couple of readers have written in reporting issues accessing the ISC web page. The SANS NOC reports that RFC-1323 timestamps were getting scrubbed by our firewall to prevent information disclosure, but the checksum wasn't being updated. The packet was subsequently dropped by the end device.
This appears to be impacting users using Bluecoat web proxies. We will have more to post on this topic throughout the day.
RFC1323 describes TCP extensions used to improve performance over high delay networks and high speed networks
These include Scaled Window Options, Round Trip Time Measurement (RTTM), and protection against Wrapped Sequence Numbers (PAWS)
Scaled window options are implemented by bit shifting the 16bit window field into a 32 bit field by adding an option indicating how many placeholders to shift (or multiply by) to get the real window size. Recall the window size is how many bytes a node can buffer before it needs the transmitter to slow down.
TCPDump displays this option as WS=6 for a factor of 6 in the TCP options
Wireshark displays this option as for example: “Window Scale: 7 (Multiply by 128)”
Round Trip Time Measurement (RTTM), or TCP option 8 contains a Timestamp value or TSval set by the sender with its sending time, a 32 bit value, and Timestamp Echo Reply (TSecr) which is only valid if the accompanying ACK TCP flag is set. This 32 bit value echos a time stamp value set by the other or remote host in a TCP session. These values are tracked over time to estimate and adapt to changing traffic conditions.
PAWS provide a simple mechanism to reject old duplicate segments that might corrupt an open TCP connection. It uses the same timestamps in RTTM, The basic idea is that a segment can be discarded as an old duplicate if it is received with a timestamp less than some timestamp recently received on this connection.
Here is what Bluecoat has to say on the topic: https://kb.bluecoat.com/index?page=content&id=FAQ1006
PAWS is looking for the timestamp to be advancing and is used to keep as much data in transit as possible between communicating hosts.
The risk to data transport in this case is if two hosts or their intermediaries can’t negotiate a common method of communicating with or without these options. This can happen with firewalls, as in our case, or incompatible endpoints. It is interesting to note that Windows implemented these options in Windows 2000, but did not enable them by default until Windows 2008.
Dan
SANS Internet Storm Center Handler
Update:
----------------------------------------------------------
Some References I used to look into this today:
The RFC: http://www.ietf.org/rfc/rfc1323.txt
http://www.networksorcery.com/enp/protocol/tcp/option008.htm
http://packetlife.net/blog/2010/aug/4/tcp-windows-and-window-scaling/
http://www.ecr6.ohio-state.edu/window-scaling.html
technet.microsoft.com/en-us/library/bb726965.aspx
technet.microsoft.com/en-us/library/bb878127.aspx
This is by no means an exhaustive article on this topic, it is just a beginning, I will look to other handlers to fill in the gaps as well as look into it more as time goes on.
Another discussion that is pertinent is IP options versus TCP options. Staying in IPV4 land for this discussion
As the names state IP options and padding are in the Internet Protocol header of a packet, they are the last 32 bits in the Internet protocol (v4) header and TCP options are contained within the TCP header.
Using the following page as a reference: http://www.networksorcery.com/enp/protocol/ip.htm#Options. IP options deliver a handful of IP features that in general are not used. Most IPv4 headers begin with version (4 in this case) and the IHL the header length in 32 bit words or 5 as the minimum and default. If options are set then that number varies depending on the options set. For the most part these options are not used, IP options include features like source routing which could permit undesirable results. Each option is described in detail on the reference page above.
TCP options are more central to the operation of the protocol the IP options are. IP options add optional features, where as TCP options make the protocol work. A list of TCP options is available here: http://www.networksorcery.com/enp/protocol/tcp.htm#Options Option 8 contains the windows scaling discussed above. Other options include Selective Acknowledgement (opts 4 and 5) and Option 3 Window Scale Factor (discussed above and in RFC1323. These options extend and enhance the TCP protocol operation.
In conclusion, both TCP and IP offer different options which can enhance the protocols. Understanding them can impact operability and availability of a network.
If you have more information or corrections regarding our diary, please share.
Diary Archive
| Date | Author | Title |
|---|---|---|
| 2012-05-16 | Johannes Ullrich | Got Packets? Odd duplicate DNS replies from 10.x IP Addresses |
| 2012-05-16 | Johannes Ullrich | Reserved IP Address Space Reminder |
| 2012-05-15 | Dan Goldberg | Odd DNS replies from 10 nets and RFC1323 impacting firewalls |
| 2012-05-14 | Chris Mohan | Laptops at Security Conferences |
| 2012-05-14 | Mark Hofman | Got packets? Interested in TCP/8909, TCP/6666, TCP/9415, TCP/27977 and UDP/7 |
| 2012-05-13 | Joel Esler | Exploit Kits are a mess |
| 2012-05-12 | Tony Carothers | Adobe Update to Vulnerabilities |
| 2012-05-11 | Adam Swanger | ISC Feature of the Week: Link List |
| 2012-05-10 | Kevin Shortt | Safari 5.1.7 - an interesting feature |
| 2012-05-09 | Dan Goldberg | The day after patch Tuesday; sometimes called Wednesday |
| Search Diaries: | |

Complete Archive

