Likes Likes:  0
Resultaten 1 tot 4 van de 4
Geen
  1. #1
    IPv4 fragmentation  --> The Rose Attack
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    IPv4 fragmentation --> The Rose Attack

    Greetings and Salutations:

    While this discussion pertains to IPv4, IPv6 also allows fragmentation and I
    suspect IPv6 will also be affected by this attack.

    I have created what I believe is a unique fragmented attack ("Rose Attack")
    that I would like to inform the community about. It seems to affect most IP
    devices. Since cell phones, IPSec & satellite use fragmented packets this
    attack is pertinent to the Internet of today.

    The attack is simple. Two parts of a fragmented packet are sent to the
    machine being attacked. The first fragment (payload 32 bytes long) is the
    initial offset zero fragment of a SYN packet. The final (second) fragment
    of the SYN packet is also 32 bytes in size, but is set to an offset of 64800
    bytes into the datagram.

    During my testing, I alternated this two fragment pattern rotating between
    ICMP, TCP, UDP, ICMP, etc. All test fragments used the same source IP
    address and fragment ID.

    Since this attack does not require a response from the target system,
    the source IP address can be spoofed, thus hiding the attacker's true
    location. Also note the source and destination ports do not matter as the
    packet is never validated at the layer four level, it never gets past layer
    three. The devices accept the packets no matter what port is used.

    Of the machines I have had access to, this attack has caused any number of
    the following problems:
    1) Causes the CPU to spike, thus exhausting processor resources.
    2) Legitimate fragmented packets are dropped intermittently (unfragmented
    packets get through fine)
    3) Legitimate fragmented packets are no longer accepted by the machine under
    attack (unfragmented packets get through fine) until the fragmentation time
    exceeded timers expire.
    4) Devices like Cisco routers can have Buffer overflow, i.e. packets are
    dropped at high packet rates if there aren't enough buffers allocated.

    The following devices were tested and showed some or all of the above
    symptoms:
    1) Microsoft Windows 2000
    2) Mandrake Linux 9.2
    2) Cisco 2621XM
    3) PIX Firewall
    4) Mac OS/X V10.2.8 (FreeBSD 5?)

    The following vendors have been notified of this condition prior to the
    release of this announcement:
    1) Microsoft
    2) Cisco (2621XM only)
    3) Linux

    This can also be used in active fingerprinting as some OS's return a
    "Fragmentation Reassembly Time exceeded", some do not, some return the first
    fragments as assembly time exceeded, some return later packets.

    For the original discussion (excerpt from my larger SANS GCFW paper
    http://www.giac.org/practical/GCFW/W...ollis_GCFW.pdf ) please see:
    http://gandalf.home.digital.net/Rose.rtf

    I have "cleaned up" the procedure since the original discussion. For the
    test procedure to test this attack using Windows computers and suggestions
    on how to mitigate this attack please see:
    http://gandalf.home.digital.net/TestProc.txt

    For the support files please see:
    http://gandalf.home.digital.net/nemITUrnd.xls
    http://gandalf.home.digital.net/Picmpdata.txt
    http://gandalf.home.digital.net/Ptcpdata.txt
    http://gandalf.home.digital.net/Pudpdata.txt

    You will need WinPCap (of course)
    WinPcap_3_0.exe

    http://www.packetfactory.net/projects/nemesis/
    nemesis-1.4beta3.zip on website

    NetWox
    http://www.laurentconstantin.com/en/netw/netwox/
    I used:
    netwox-5.11.0-bin_windows.tgz

    The suggested software solution to this attack is to:
    1) Allocate X*64k buffers upon NIC card initialization. Assuming X=200
    buffers this would equate to approximately 12 Mb
    2) Flush fragmented buffers in a FIFO fashion.
    3) Do not reassemble buffers until all have been received, then use the CPU
    to reassemble the buffers.

    I would like to thank Chris Brenton for his help / input on this attack.

    Your comments on this attack are appreciated.

    Ken

    ---------------------------------------------------------------
    Do not meddle in the affairs of wizards for they are subtle and
    quick to anger.
    Ken Hollis - Gandalf The White - gandalf@digital.net - O- TINLC
    WWW Page - http://digital.net/~gandalf/
    Trace E-Mail forgery - http://digital.net/~gandalf/spamfaq.html
    Trolls crossposts - http://digital.net/~gandalf/trollfaq.html



  2. #2
    Chris Brenton
    IPv4 fragmentation  --> The Rose Attack
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: IPv4 fragmentation --> The Rose Attack

    On Tue, 2004-03-30 at 23:18, gandalf@digital.net wrote:
    >
    > Since cell phones, IPSec & satellite use fragmented packets this
    > attack is pertinent to the Internet of today.


    I'm willing to guess that many sites are seeing a lot more fragmented
    traffic then they realize. A quick test would be:

    tcpdump -nn -v 'ip[6]&32!=0'

    under Linux/UNIX or

    windump -nn -v "ip[6]&32!=0"

    under Windows. If you see normal fragmentation to an internal server
    (say a VPN gateway), then this device could be affected.

    > Also note the source and destination ports do not matter as the
    > packet is never validated at the layer four level, it never gets past layer
    > three. The devices accept the packets no matter what port is used.


    This should be in big red letters. Any accessible host is potentially
    vulnerable to this attack, regardless of whether any listening ports are
    open. Also note that most hosts _will not_ log that this attack took
    place. You can get hit and the only clue is interrupted connectivity.

    HTH,
    Chris



  3. #3
    stanislav shalunov
    IPv4 fragmentation  --> The Rose Attack
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: IPv4 fragmentation --> The Rose Attack

    "Crist J. Clark" <cristjc@comcast.net> writes:

    > IPv6 does have end-station fragmentation, and therefore, it DOES have
    > reassebly, see Section 4.5 of RFC2460. I do not see why an IPv6
    > implementation would not also potentially be affected.


    You're correct. IPv6 is affected as well.

    > This is YANFA, Yet Another IP Fragmentation Attack. Teardrop, Ping O'
    > Death, NewTear, Boink, yada-yada. Some have exploited bugs in
    > reassembly code (over lapping frags, >65535-byte packets, etc.) and
    > others, like this, are flat out resource exhaustion DoSes.


    What you list above is, to an extent, different from this attack.
    While with teardrop et al. a specific bug is exploited and it is quite
    clear how to fix the bug so that the attack no longer works, this
    attack stems from the very requirement to reassemble packets. For
    IPv6, one is to keep fragments for 60 seconds. For IPv4, there's no
    specific timeout, but 15 to 255 seconds are mentioned.

    In other words, regardless of IP version, this technique allows an
    attacker to lock tens of kilobytes of kernel memory for tens of
    seconds by sending two small packets.

    This is an order to two orders of magnitude less powerful than
    TCP-based attacks that allow an attacker to lock tens of kilobytes of
    kernel memory for tens of minutes by sending two small packets.

    With TCP-based attacks, a DSL user can use up all memory of a server [1].

    With this, more than T1 worth of capacity is required to keep a
    server's memory locked up.

    > The IP stack needs to be sane about how many datagrams it will try to
    > reassemble at once.


    Using a direct memory limit would seem a preferable strategy (combined
    with using data structures that don't need to allocate 64kB just to
    hold two tiny fragments).

    [1] Assume 128B for two packets, 128kb/s uplink, 64kB TCP window size
    on the server, and 500-second timeout; then we have 125 hits per
    second, taking out 64kB each for 500s. That's 4GB of kernel
    memory on the server.

    --
    Stanislav Shalunov http://www.internet2.edu/~shalunov/

  4. #4
    Paul Starzetz
    IPv4 fragmentation  --&gt; The Rose Attack
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: IPv4 fragmentation --> The Rose Attack


    gandalf@digital.net wrote:

    >The attack is simple. Two parts of a fragmented packet are sent to the
    >machine being attacked. The first fragment (payload 32 bytes long) is the
    >initial offset zero fragment of a SYN packet. The final (second) fragment
    >of the SYN packet is also 32 bytes in size, but is set to an offset of 64800
    >bytes into the datagram.


    There is a similar fragmentation attack which works pretty nice for Linux.
    From the source code of ip_fragment.c follows that the worst case is if
    you send small fragments of a datagram beginning from 0 to lets say 60000
    in pieces of 8 bytes each. This will cause the defragmentation code to
    build a linear list of socket buffers. If you now continue to send the last
    fragment, the kernel will cycle over that list over and over, for every
    packet and finally kfree the last fragment and replace it by the new one.

    That causes a really nice load... It killed at least a 2.4.25 running on
    an Athlon 850.


    --
    Paul Starzetz
    iSEC Security Research
    http://isec.pl/



Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics