Slashdot Mirror


TCP Vulnerability Published

Bob Slidell writes "According to Yahoo!, there is a critical flaw in TCP that affects everyone and everything. The article is scant on details and long on fear, hopefully someone will post more details on this." The advisory has more information, and is long on details but only moderate on fear.

29 of 676 comments (clear)

  1. OpenBSD is safe? by Anonymous Coward · · Score: 5, Informative

    This just hit the misc@openbsd mail list:
    Date: Tue, 20 Apr 2004 12:57:12 -0600
    From: Theo de Raadt <deraadt@cvs.openbsd.org>
    [snip]

    In the OpenBSD case, this is something not to worry about. For what
    they discuss, OpenBSD handles this extremely well.

    We'll explain more in a week or so.
    It sounds (again) like proactive security auditting saves the day!
    1. Re:OpenBSD is safe? by Jeremiah+Cornelius · · Score: 5, Informative
      Yeah. The biggest problem here is the ease with which one could DoS the BGP-4 protocol.

      The Internet BGP tables are ricketey enough these days - they don't need every other route to "flap"!

      --
      "Flyin' in just a sweet place,
      Never been known to fail..."
    2. Re:OpenBSD is safe? by lcde · · Score: 4, Informative

      Theo Wrote:
      Let me be more clear.

      This entire thing is being "sold" as `cross-vendor problem'. Sure.
      Some vendors have a few small issues to solve in this area. Minor
      issues. For us, those issues are 1/50000 smaller than they are for
      other vendors. Post-3.5, we have fixes which make the problem even
      smaller.

      But one vendor -- Cisco -- has an *UTTERLY GIGANTIC HUGE* issue in
      this regard, and as you can see, they have not yet made an
      announcement see..

      You are being told "lots of people have a problem". By not seperating
      out the various problems combined in their notice, or the impact of
      those problems, you are not being told the whole truth.


      More Theo:
      OpenBSD (and I am sure other systems too) have for some time contained
      partial countermeasures against these things.

      OpenBSD has one other thing. The target port numbers have been random
      for quite some time. Instead of the Unix/Windows way of
      1024,1025,1026,... adding 1 to the port number each time a new local
      socket is established... we have been doing random for quite some
      time. That means a random selection between 1024 and 49151. This
      makes both these attacks 48,000 times harder; unless you already know
      the remote port number in question, you must now send 48,000 more
      packets to effect a change.

      At least one other free operating system incorporated our random port
      selection code today..

      We've made a few post-3.5 changes of our own, since we are
      uncomfortable with the ACK-storm potention of the solutions being
      proposed by the UK and Cisco people; in-the window SYN or RST's cause
      ACK replies which are rate limited.

      At least one other free operating system today incorporated the same
      changes......


      --
      :%s/teh/the/g
  2. OSVDB by plcurechax · · Score: 4, Informative

    http://www.osvdb.org/displayvuln.php?osvdb_id=4030

    TCP Reset Spoofing

    OSVDB ID: 4030
    Rating: TBD
    Disclosure Date: Apr 20, 2004

    Description:

    The TCP stack implementation of numerous vendors contains a flaw that may allow a remote denial of service. The issue is triggered when spoofed TCP Reset packets are received by the targeted TCP stack, and will result in loss of availability for the the attacked TCP services. ...

  3. Implementation issue by JohnGrahamCumming · · Score: 5, Informative
    Neither of the linked articles helps understand the issue but this one does,
    Furthermore, RFC-793 allows a TCP implementation to verify both sequence and acknowledgement numbers prior to accepting a RST control flag as valid. No TCP stack implemention tested currently implements checking of both sequence and acknowledgement. All tested TCP stacks currently verify only the sequence number. This allows connections to be reset with dramatically less effort than previously believed.
    Hence this is an implementation issue that can be patched in TCP stacks.

    Move along, little to see here.

    John.

  4. Re:Mostly Related to BGP? by Zondar · · Score: 4, Informative

    Yep, that's the issue. I submitted too, but :(.

    Anyway, the way I read it you basically run the TCP attack against a BGP peering router, causing it to drop one or more of it's peering relationships. Do that enough and you can cause the routes being advertised by that router (and also TO that router from the peering connections you're breaking) to be 'dampened' - a protective mechanism in BGP to prevent a flapping route from making all the peers recalculate their routes nonstop.

    It's kind of like one peer putting the other one's routes in "time-out" until he plays nice.

  5. Re:Good by frenetic3 · · Score: 5, Informative

    As frightening as this "vulnerability" sounds, this is nothing really new; other TCP weaknesses are syn floods (not quite the same thing, but somewhat similar -- in fact, this vulnerability might as well be called a "RST flood"), connection hijacking (by sniffing packets and sending spoofed packets with the correct sequence numbers), and so on. It's also an implementation issue that is largely caused by implementations having loose checking of TCP sequence and ack numbers, or accepting too large of a window of sequence numbers.

    I wouldn't say TCP is broken or that some other solution would be much better; it would be tough to design a transport protocol that is still simple (and doesnt use CPU burning hashing/encryption techniques) that wouldn't have these sorts of vulnerabilities (especially since it's so easy to spoof IP packets); calling this vulnerability severe is like screaming that highways are fundamentally unsafe because someone could point their car the wrong way and start smashing into oncoming traffic.

    -fren

    --
    "Where are we going, and why am I in this handbasket?"
  6. Impact moderate for users, serious for providers by forged · · Score: 5, Informative
    The exploit apparently allows an attacker to disconnect TCP sessions, so really home users won't have much to fear except perhaps to get more trouble connecting to their various sites than usual, and that is in case they would be under active attack.

    Service providers on the other hands, must protect their routers because the BGP protocol used to distribute Internet routes between them, massively uses TCP. And when routes go missing, it is hundreds if not thousands of routes to your favourite places that go unreacheable.

    The problem in the case of BGP is made worse by dampening, i.e. keeping the flapping routes out of the routing table for a certain amount of time (up to several hours). BGP routes dampening is not always configured. A determined attacker with this knowlege would be able to knock large portions of the Internet offline for hours.

  7. BGP vulnerable by Anonymous Coward · · Score: 5, Informative

    I happen to work for a large, nationwide backbone. We've known about this for about a week now. BGP, configured without an MD5 key (as is usually the case) is extremely vulnerable to this exploit. This is the reason for the top-secret effort in the past week to MD5 all peering sessions, both internal and external on most major networks worldwide. Without this, it's trivial to exploit, in fact we already have source code provided by the NCISS. Input a few IPs and BGP's TCP port number, and wham you take down a peering session. For those that don't understand what this means, prior to the security changes that have been implemented in the last week, the global internet was largely susceptible to this flaw in such a way that major portions could have been taken offline easily. A priority was put on this within the intra-NOC communications channels that exist that has never been seen before to lock this down before the public knew about it. We were embargoed by DHS to not release the information until tomorrow.

  8. Known issue by httptech · · Score: 5, Informative
    Apparently this has been known about for a while. Here's an excerpt from an IETF draft on BGP vulnerabilities from June 2003. Section 3.2.1.4 specifically mentions the attack described by Watson: From http://mirrors.sunsite.dk/drafts/draft-ietf-idr-bg p-vuln-00.txt

    3.2.1.4. TCP RST/FIN/FIN-ACK

    Event 18: If an attacker were able to spoof a RST, the BGP speaker would
    bring down the connection, release all associated BGP resources, delete
    all associated routes and run its decision process. If an attacker were
    able to spoof a FIN, then data could still be transmitted, but any
    attempt to receive would receive a notification that the connection is
    closing. In most cases, this results in the connection being placed in
    an Idle state, but if the connection is in the OpenSent state at the
    time, the connection returns to an Active state. Spoofing a RST in this
    situation requires an attacker to guess a sequence number that is in the
    proper half of the sending window, generally an easier task than
    guessing the exact sequence number so as to spoof a FIN. The use of [5]
    will counter this attack.
  9. RFC3360 by RAMMS+EIN · · Score: 4, Informative

    For more information about what TCP resets are and why they can be harmful, see RFC3360.

    --
    Please correct me if I got my facts wrong.
  10. Here is what to do... by GPLDAN · · Score: 5, Informative

    The article is being presented at CanSecWest, and is called "Slipping in the Window" by Paul A. Watson. I have two friends at CanSecWest, I've asked them to attend and report back what the feeling is.

    NANOG members are talking about it, and several regional Tier-1 players have already issued customer notifications.

    This exploit goes up against TCP connections that have been established for long periods of time. i.e. not web connections. The most prevalent would be BGP peer connections, which can be up for days on end easily. Without having read details, or the paper itself, by forging packets of BGP peers with adjusted window sizes, you can cause a router to reset (possibly hang, depending on IOS or JunoOS version, not sure about this) it's BGP peer connection. If you were doing eBGP and had your own AS, a directed attack against your gateway routers could force flapping, which would cause route dampening, and lead to denial of service.

    What you need to do, is contact your ISP if you are an enterprise network admin, and establish MD5 authentication on your BGP sessions. Check with Cisco or Juniper and find out if your code will drop non-MD5 BGP packets directed at it. An ACL won't do, the attacker would forge the src-ip of a known peer.

    This is a completely non-trivial attack to coordinate. You need to know the IP address of the BGP peer of a customer, or the route reflector, and then get the IP address right in an attempt to bypass ACLs and get the BGP session to hang. eBGP multihop means that IP could be any number of routers, and unless you have inside info, you don't know what it is.

    Potentially, looking glasses could be used to mount attacks at NAPs or other peering points, but again, I think the major players will be ready for it very shortly, and will spend most of today (if they are any good) coordinating with legal teams to slam the shit out of any forged sessions they see, and start cooperating to run traces with other providers.

    If I could editorialize one moment, none of this would be an issue if providers took better care to implement anti-spoofing techniques. Forged src-ip addresses are the bane of security. Most of these attacks don't care about 2-way communcations, they just want to reset connections. Spoofed src-ip lets them do that. Rant off.

  11. Re:He plans to show the exploit this Thursday! by Jaywalk · · Score: 4, Informative
    The article talks about how the government has been "fortifying" its networks against this, does that means they quickly rewrote the tcp protocol?
    Nothing so drastic. Go back to the article and reread it, especially the "Mitigation" section. You will find:
    • It mainly affects the Border Gateway Protocol (BGP) that occurs at a high level in the net. Few computers are involved.
    • The issue was first publicized about a month ago at CanSecWest, so those in the know have had a month to work on this.
    • The steps to mitigate the problem are a matter of tweaking settings (like window size) or setting up protocols (like encryption). This is not a matter of rewriting the entire protocol.
    The article is interesting in that it shows how the bits and pieces of the Internet fit together, but I won't be losing any sleep over this one.
    --
    ===== Murphy's Law is recursive. =====
  12. Re:It's Al Gore's fault... by hambonewilkins · · Score: 5, Informative
    Vinton Cerf: Good evening, or whatever time zone you are in, hi!! While we're waiting for questions, I'd like to clear up one little item - about the Vice President ... He really does deserve some credit for his early recognition of the importance of the Internet and the technology that makes it work. He was certainly among the first if not the first in Congress to realize how powerful the information revolution would be and both as Senator and Vice President he has been enormously helpful in supporting legislation and programs to help further develop the Internet - for example the Next Generation Internet program. I get to see a lot of this stuff because I am a member of the President's Information Technology Advisory Committee and we regularly review the R&D programs of the US Government and many have relevance to the evolving Internet.

    Real quote.

    --

    God Bless America. Why? Did it sneeze?
  13. What details, the info is already out by Anonymous Coward · · Score: 5, Informative

    The NISCC articles explains things clearly. Nobody needs any more information. Besides, this "new" attack was already known. People just didn't realize how easy it is.

  14. Link to US-CERT TA04-111A by Ascaroth · · Score: 5, Informative

    Here's a link to US-CERT's TA04-111A on this topic.

  15. Simple BGP solution has been around since 1998 by jroysdon · · Score: 5, Informative

    As they state, there is a simple solution: TCP MD5 Signature Option with BGP. Any ISP worth their salt will already be doing it. The rest will learn the hard way.

    This has been supported in Cisco IOS way back since ~1998 in IOS 11.2 .

    Read the BGP "Bible": Internet Routing Architectures or look at any best-practices guides which will state that TCP MD5 sigs should always be used with BGP.

    Or search CCO:

    router bgp 109
    neighbor 145.2.2.2 password v61ne0qkel33&

    It's just a single line that has to be added to both peer sides.

  16. NISCC slowing, here is the meat summary of article by JPriest · · Score: 5, Informative

    The issue described in this advisory is the practicability of resetting an established TCP connection by sending suitable TCP packets with the RST (Reset) or SYN (Synchronise) flags set.

    The packets need to have source and destination IP addresses that match the established connection as well as the same source and destination TCP ports.

    The fact that TCP sessions can be reset by sending suitable RST and SYN packets is a design feature of TCP according to RFC 793, but a reset attack is only possible at all because the source IP address and TCP port can be forged or "spoofed".

    Although denial of service using crafted TCP packets is a well known weakness of TCP, until recently it was believed that a successful denial of service attack was not achievable in practice. The reason for this is that the receiving TCP implementation checks the sequence number of the RST or SYN packet, which is a 32 bit number, giving a probability of 1/232 of guessing the sequence number correctly (assuming a random distribution).

    The discoverer of the practicability of the RST attack was Paul A. Watson, who describes his research in his paper "Slipping In The Window: TCP Reset Attacks", presented at the CanSecWest 2004 conference. He noticed that the probability of guessing an acceptable sequence number is much higher than 1/232 because the receiving TCP implementation will accept any sequence number in a certain range (or "window") of the expected sequence number. The window makes TCP reset attacks practicable.

    Any application protocol which relies on long term TCP connections and for which the source and destination IP addresses and TCP ports are known or can be easily guessed will be vulnerable to at least denial of service attacks

    --
    Saying Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
  17. Neither forgotten nor stupid by shostiru · · Score: 5, Informative
    The relevant parts of this vulnerability are 1) that RST attacks are much, much easier than formerly thought, making them possible for your average broadband sub, and 2) that BGP in particular is highly vulnerable, given the consequences of a terminated BGP session.

    A recently published I-D (here) claims 200 seconds is sufficient time for a broadband sub to successfully attack a TCP session, provided their ISP doesn't use egress filtering (and way too few do so).

    This is rather serious. Whether you personally aren't susceptible is irrelevant if your upstreams are.

    1. Re:Neither forgotten nor stupid by Floody · · Score: 4, Informative

      Of course, in a sanely designed backbone, ingress filtering should be in place to filter source ips from BGP peers that aren't specifically on the interface matching the peer (yes, there's multi-hop BGP, but ignoring that for the moment...).

      I do realize this likely isn't the case on many networks, but perhaps this will push such sanity (and very simple) filtering to become more widespread.

  18. Re:This is new?? by Geoff-with-a-G · · Score: 5, Informative

    Maybe I missed something in the advisory, but this sounds like a good old TCP reset attack...

    You did.

    The news here is that you no longer require the sniffer, because you don't have to know the exact sequence number. Now you just have to be kind of close. How close apparently varies in size amongst vendor implementations.


  19. Re:Good by silas_moeckel · · Score: 4, Informative

    LOL OK I happen to setup BGP router as part of my living so I might be able to shed some light on the subject. Standard security settings allready in place will stop this attack. OK Lets go for starters, BGP packets unless multihop should have a TTL of exactly 1 and come through a point to point interface. Basic anti-spoofing on each side will stop any packets that cleam to be from the other end of that interface from comming in any other interface same for any packets with the routers own address from comming in any interface. Thats basic router security. BGP does support preshared keys as well though I'm not sure if that will stop this attack as it's more to prevent session hijacking. I dont see a 'fix' for this comming out besides normal security settings.

    This exploit along with many others could be made significatly harder to do if more ISP would just turn on anti spoofing rules. I cant think of a router that dosent support at least manual anti spoofing setups. The only time antispoofing might be a problem would be people that are utilizing multiple connections and trying to agrigate them together for outgoing bandwith.

    --
    No sir I dont like it.
  20. Re:NISCC slowing, here is the meat summary of arti by HTH+NE1 · · Score: 4, Informative

    Note: that's 1/2^32 (substitute your own favorite exponential syntax), not one in two hundred thirty-two.

    --
    Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
  21. That took long enough by Anonymous Coward · · Score: 5, Informative

    This came up on the linux-kernel mailing list two years ago during a thread on TCP MD5 stuff to avoid this very problem. Why is it just now making a splash?

    This post from Alan Cox covers it nicely. Also see the rest of the thread.

  22. This is an attack on sequence number, not ports/IP by PureFiction · · Score: 4, Informative

    Guessing a port and IP is fairly easy. Guessing the sequence number is not. This is why making sure that TCP initial sequence numbers are random is important.

    This is old news.

    For the insanely paranoid use a hardware entropy generator (TRNG) for choosing ISN's.

    There are all sorts of attacks against network protocols when poor random number sources are used. This is but one example...

  23. Juniper NetScreen Security Advisory 58784 by jakedata · · Score: 4, Informative

    Title: Juniper NetScreen Advisory 58784
    Date: 21 April 2004
    Version: 1

    Impact:
    A design flaw in the RFC specification of TCP may allow a blind attacker to successfully close a TCP connection.

    Affected Products:
    Juniper NetScreen Firewalls (all versions)

    NISCC Reference: Vul/236929
    http://www.uniras.gov.uk/vuls/2004/236929/tcp.htm

    Max Risk: Medium

    Summary:
    A blind attacker with limited knowledge of a TCP connection may be able to successfully brute force the TCP Sequence number space and thereby cause a connection endpoint or firewall stateful filter to process a spoofed RST packet and close the connection.

    Details:
    The TCP Sequence number is one of the mechanisms that TCP uses to prevent a third party from inserting forged packets into the data-stream between two other hosts. While such an attack has always been known to be theoretically possible against TCP, it is was believed that the range of over four billion possible TCP Sequence numbers was large enough to prevent a successful attack. However, recently such an attack has been proven to be feasible in certain situations.

    Specifically, if two hosts are known to talk to each other on a regular basis and/or for long periods of time over known port(s) then it may be possible for an attacker to brute force the TCP Sequence number space and successfully inject a forged packet into the connection and possibly disrupt communications. Certain connections, such as BGP4, which are long lived between two devices are especially vulnerable.

    While all TCP connections are potentially vulnerable, NetScreen believes that NetScreen firewalls running BGP4 or with TCP Syn-Check enabled are likely to be vulnerable in practice. Other protocols such as SSH, HTTP and SMTP which usually have shorter connection times are less vulnerable.

    Recommended Actions:
    NetScreen firewall customers should do one or more of the following:
    1) Configure Anti-Spoof protection as appropriate.
    2) Use secure protocols such as ssh, HTTPS, BGP4 w/ MD5 Authentication
    and IPSec which are more resistant to attack.
    3) Limit management to dedicated and/or internal interfaces
    4) Upgrade to ScreenOS 5.0r6 which enhances the stateful firewall
    functionality to protect devices on the network.

    Patch Availability:
    ScreenOS version 5.0r6 is currently available for Juniper NetScreen firewalls.

    How to get ScreenOS:

    Customers with a valid product warranty or a support contract may download the software from the Juniper NetScreen CSO web portal:
    http://www.juniper.net/support/

    For all other customers, including those with expired support contracts, please call your regional Juniper NetScreen TAC center at one of the numbers listed in:
    http://www.juniper.net/support/nscn_support/t ao/co ntact.html

    Select option 2 from the telephone menu and be sure to select the correct product from the phone tree. Once connected with an engineer state that you are calling in regards to a Security Advisory and provide the title of this notice as evidence of your entitlement to the specified release.

    As with any new software installation, NetScreen customers planning to upgrade to any version of ScreenOS should carefully read the release notes and other relevant documentation before beginning any upgrade.

  24. Re:OpenBSD SMP by mi · · Score: 4, Informative
    Combine that with the fact that almost all of the programs used on a modern UNIX-like system arn't CPU bound and it's easy to see why SMP took a back seat to more "interesting" issues.

    Wrong. Very wrong. Are you anaware of this field called "banking"? What about "financial trading"? These firms have huge portfolios and run and re-run various models on them. At night, the systems have to run various "end-of-day" scripts and reports, which take CPU-hours to complete. Most of this things run on Unix...

    There is also on-the-fly image manipulation, and the scene-rendering done by fleets of Unix machines. The more CPUs each such Unix machine can fit, the better.

    Then come databases -- depending on the queries (with joins and orderings), DB-servers can be CPU bound and appreciate multiple processors when available.

    What about PVM? What was it -- and similar packages both free and commercial -- written for? What about this proverbial "beowulf clusters"? Of course, it is much better to have several CPUs inside the box, rather than in separate machines.

    However there is a developer being paid to work full time writing SMP support for OpenBSD. He expects to have a working implementation by 3.6 or 3.7.

    Until which time, the OpenBSD zealots will continue to deny the issue exists or is of any importance. I see...

    --
    In Soviet Washington the swamp drains you.
  25. Re:NISCC slowing, here is the meat summary of arti by janoc · · Score: 4, Informative

    Actually, this is just a variation on an old attack with sequence number guessing. Some OSes have a very poor generator for these numbers (even though the vulnerability is known for ages) and it is possible to exploit it. Probably the most famous attack of this sort was Mitnick's break-in into Shimomura's machine ten years ago.

    In practice, these attacks are quite tricky to perform, because they require good timing and quite a bit of skills, so they are quite rare. It is far easier to just exploit some common buffer overflow than this.

    The impact could be not only DOS (by resetting the connection), but you can do also packet injection with potential for total system compromise. However, if the protocol used is encrypted (in Shimomura's case it wasn't, if I am not mistaken, Mitnick attacked rsh or rlogin), then the DOS is probably the worst thing that could happen to you. The encryption will reject the bogus packets, if properly implemented.

    So, keep calm - this was here since at least 80-ties and there isn't much that you can do against it, except to use encryption. You can only hope, that your system vendor will decide to make their TCP stack less vulnerable (not likely to happen, since many systems still ship with the crappy sequence number generator!). Full fix is not possible anyway, unless you want to break the protocol.

    Regards, Jan
  26. RFC 2385 by apankrat · · Score: 4, Informative

    There is RFC 2385 titled Protection of BGP Sessions via the TCP MD5 Signature Option. In the first paragraph of its Introduction section it says -

    The primary motivation for this option is to allow BGP to protect itself against the introduction of spoofed TCP segments into the connection stream. Of particular concern are TCP resets.

    The date of publishing - August 1998, which makes it about 6 years old.

    However the proposed option was primarily meant as a quick BGP fixup, which should've got depricated as soon as IPsec got RFC'ed and deployed. It did went standard few months later, but IPsec implementations enjoyed full share of cross-vendor compatibility problems.

    With time Authenticated Header (AH) IPsec protocol didn't see much use or acceptance and IPsec slowly evolved (and keeps evolving) into confidentiality rather than authentication layer.

    Besides it's an IP security after all, while the RST spoofing is a TCP problem. And one can quite rightfully percieve authenticating TCP with IPsec as an overkill.

    Anyhow, long story short - it's a known and rather old problem with handful of existing and equally unattractive solutions. Perhaps this time around it will be addressed better due to the amount of the publicity it's aimed to get.

    --
    3.243F6A8885A308D313