Faking the TCP handshake
lgms.nl
lgms.nl
The phrack article describes a lot more sophisticated attack.
Mitnick used it to hack Shimomura.
http://wiki.cas.mcmaster.ca/index.php/The_Mitnick_attack
More recent but still 9 years old: http://phrack.com/issues/64/13.html#article
Their method doesn't even attempt to keep the connection going.
Anyone with network experience would see the bruteforcing method as elementary and common knowledge really, it's nothing new.
In short, amateur hour.
Also, I think RPF filtering is a little less common than you're implying that it is.
People are always advocating egress filtering because "if only everybody would do it ...", but it's a classic tragedy of the commons. Egress filtering doesn't meaningfully help the network doing it and it may cause ugly problems with asymmetric routes and the like, so the number of networks that don't do it is large enough to be meaningful. And if you get close enough to the core of the internet it's basically impossible anyway because there is no practical way to keep track of which address ranges a particular interface should legitimately be sending traffic from when the list encompasses half the address ranges on the internet and can change at any time.
The upshot being it's not at all difficult for an attacker to get hold of a connection that doesn't do egress filtering, and that isn't ever going to change.
http://lcamtuf.coredump.cx/newtcp/
What I don't understand is why the use of Taken's series are still not a standard for the analysis of the randomness...
It resulted in this CVE http://www.cert.org/historical/advisories/CA-2001-09.cfm
And almost all the industry either switching to linux or as the licence authorized it they could have used BSD TCP stack since then, I guess.
Here is an horrible implementation of Taken's visualization.
Also see:
I remember when 32 bits seemed huuuge, and now … not so much.
It's dumb is what it is.
Steady on there. The author has clearly done a lot of work on this and while your points are valid, that this method of attack isn't new nor practical, he has still learned a very genuine potential vector for attack. Thus it deserves a mature discussion since there will certainly be others who might learn from the author's research.
I'm all for constructive criticisms, but calling his article "dumb" is just unnecessary language. It doesn't contribute anything and yet could discourage authors from publishing future work.
If your defenses are predicated on the assumption that you aren't going to encounter bad stuff due to filtering at the source, you are in for a bad time.
TCP Sequence Prediction
Systems with poor TCP initial sequence number generation are vulnerable to
blind TCP spoofing attacks. In other words, you can make a full connection to
those systems and send (but not receive) data while spoofing a different
IP address. The target's logs will show the spoofed IP, and you can take
advantage of any trust relationship between them. This attack was all the
rage in the mid-nineties when people commonly used rlogin to allow logins
to their account without any password from trusted IP addresses.
Kevin Mitnick is alleged to have used this attack to break into Tsutomu Shimomura's
computers in December 1994.
The good news is that hardly anyone uses rlogin anymore, and many operating
systems have been fixed to use unpredictable initial sequence numbers
as proposed by RFC 1948. For these reasons, this line is only printed in
verbose mode. Sadly, many vendors still ship vulnerable operating systems
and devices. Even the fixed ones often vary in implementation, which
leaves them valuable for OS detection purposes.
[..]
Further details about sequence tests are provided in the section called
“TCP ISN greatest common divisor (GCD)” [1].
https://nmap.org/book/osdetect-usage.html [1] https://nmap.org/book/osdetect-methods.html#osdetect-gcdA fun look at sequence number PNRGs of various (old) OSes: http://lcamtuf.coredump.cx/newtcp/
"Asking around, people assume the TCP handshake verifies the IP addresses on both sides."
Not true - in firewall and security circles this was long ago observed and addressed in many different ways - it is now standard in at least the major Enterprise Firewall Vendors.
Still though; the analysis is good, and clearly determined through work, observation, and sound logic. I would work alongside a person like this anytime.
If the author can find a venue to assert his findings he/she should, but I wouldn't expend too much time on it.
Hmm, what kind of measures are taken against this, then? Because aside from ingress filtering for RFC1918 addresses and the like, I don't see how you could prevent this attack effectively. You could make it more difficult by rejecting wildly incorrect acknowledgement numbers, but I don't see how to really prevent it.
> Still though; the analysis is good, and clearly determined through work, observation, and sound logic. I would work alongside a person like this anytime.
Thank you! :)
When the attacker submitted sequence numbers that were not correct for the connection, it would send a TCP reset to both the client and the server; forcing the attacker to begin the attack sequence again with the first SYN. If it recognized a replay (sequence numbers used twice) like would happen here too, it would also reset the session. There are others as well such as packet data enforcement (if the packet data portions did not match up to a valid session) and session proxying too.
Lastly, it would lock out that attacker as a DDOS based on the traffic patterns (TCP sliding windows have been exceeded, or too much data in one direction and nothing returned).
The idea during design was that there are insecurities the TCP protocol inherently permits (like this one), how can we limit those. The answer basically is that if a session displays 'errant but technically permitted by RFC' behaviors, the firewall should force a reset on the connection.
If your conclusion at this point is can't this block valid traffic, the answer is yes it can, and these features are often turned off or limited for that reason.
Be aware that I have not pieced this together completely - it would take more detailed research and time to provide valid evidence - this is just off the top of my head over few minutes.
HTH...
> However, guessing the right ISN from the entire 32-bit space (4,294,967,296 possibilities) is not feasible due to the excessive amount of bandwidth and time required. That is why a good TCP sequence number generator implementation currently provides enough security to protect against spoofing attacks, at least for the present time and in typical conditions. But increasing bandwidth and processor speed will eventually make brute force guessing of 32-bit ISNs feasible for the average attacker.
See also http://www.jakoblell.com/blog/2013/08/13/quick-blind-tcp-con...
https://en.wikipedia.org/wiki/TCP_reset_attack
So I doubt this is a new finding.