Odd DNS replies from 10 nets and RFC1323 impacting firewalls

Published: 2012-05-15
Last Updated: 2012-05-16 01:21:08 UTC
by Dan Goldberg (Version: 6)
7 comment(s)

 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.

Keywords:
7 comment(s)

Comments

"It is interesting to note that Windows implemented these options in Windows 2000, but did not enable them by default until Windows 2008."

It seems a sensible treatment of the new feature, which was a relatively new standard in 2000, and as ISC apparently found, can unfortunately cause connectivity issues, due to old, broken firewalls. Let admins experiment for a few years, and report issues in new protocol features.

Made sense to wait until a later release before turning it on by default, at a time, when few organizations had networks of high enough speed to benefit from the feature.

But hey, in 2008... 15 years later.
No implementation really has a good excuse at this point to not have correctly implemented or at least inter operate with newer features required by the standard.

These replies are usually a duplicated response, the first coming from the legit authority name server's public address, and then immediately (as in next packet) followed by the same answer but this time, from a private ranged address.

Notably, they are all from a large dns hoster, oddly, the second and third octets of the public and the private addresses match up. Example, the public ip response comes from XX.17.144.XXX and the privately sourced address is 10.17.144.30 (the last octet and first don't appear to be related).

A little too uncanny?
BTW, additional info, ISP claims to not be doing anything to DNS packets--could it be my firewall (Juniper SSG series) lousing things up?
Two questions:
(1) why in the world would anybody accept 10-net traffic from the Internet in the first place? But, as this assumes a well-managed firewall,
(2) why isn't 10-net traffic being filtered by the ISP at their boundaries?
We came across this problem several months back with our Bluecoat proxies and spoke to your NOC about it. We were forced to implement the fix mentioned in the Bluecoat KB. Do you know if SANS is planing on modifying their firewall to allow the timestamps? I ask because the setting on the Bluecoat is global...
BTW -- what is the security benefit to scrubbing the RFC-1323 timestamps? It seems to me that without it, a lot of TCP traffic could break.
The SANS firewall will no longer scrub timestamps. The security benefit (if any) is minimal. There is some benefit outbound as the timestamp may indicate the time of last reboot. But it is better just turned off at the source vs. having the firewall mess with the packets.
In RE: 10.x source DNS replies:
Definitely not accepting the packets. Rather, I was alerted to the presence via an intrusion/spoof alarm. As for ISPs not blocking private range sourced packets--in my experience, with a full service internet connection, I expect that the ISP is not doing any filtering--in almost all cases where I've had an ISP doing some 'for your better interest' filtering, something else is impacted eventually. Routes are typically destination based, and with a valid destination, an L3 router would usually pass them. We do use some policy based routing within some of our internal networks, where source address is inspected, but I'd imagine not many providers do? Given, though, with a private or unrouted source address, the return packets would never get back if an ack or otherwise was required--as a threat condition, I'd guess that unless the destination target was a connectionless transaction, that they'd never survive. This does pose an interesting possibility for DNS poisoning though, especially if a NATing firewall wasn't in use.

Diary Archives