Hi,
da wir zuletzt in Kommunikationssysteme kurz die Fragmentierung von IPv4 erwähnt haben, und wir dabei auch mögliche Denial of Service Attacks (DoS) aufgedeckt haben, wollte ich das auch mal in der Praxis ausprobieren. Dafür habe ich ein bisschen gesucht und folgendes gefunden.
The first attack is fairly simple. Send the first few bytes of a fragmented packet at offset 0 (More Fragments Bit = 1) and then send a few bytes at the end of a 64k sized packet (More Fragments Bit = 0). The placement of the last fragment does not have to be at 64k, this is just an attempt to use more memory.
Note that if you send with a random source address then the only way to track down the attack is to trace it hop by hop (router by router) back to the source.
Source port does not matter because the packet has not "moved up the stack" yet, so the stack does not validate that the destination port is even valid. In some cases all legitimate fragmented packets are denied or impacted (UDP, TCP and ICMP) if you attack a machine in this manner.
When you send enough of these tiny fragments the buffer in the receiving machine fills waiting for the rest of the fragments to arrive. Legitimate fragmented packets cannot enter the queue because it is already filled, waiting for the fragments that will never arrive.
Some implementations of the IP stack drop "old" fragmented packets that have not completed thus thwarting (to a greater or lesser degree) this attack.
Danach bin ich frisch ans Werk, habe mir die rose.c besorgt, vorher noch die netwib, mit folgenden Abhängigkeiten kompiliert:
Auszug aus http://www.laurentconstantin.com/en/netw/:
Prerequise for Unix :
- libpcap (http://www.tcpdump.org/ or a package from your system)
- libnet (http://www.packetfactory.net/libnet/, ftp://ftp.mirrors.wiretapped.net/ or a package from your system)
- Tcl/Tk >= 8.0 (http://www.tcl.tk/software/tcltk/ or a package from your system)
Zusätzlich habe ich noch die Pakete kernel-source und linux-kernel-headers installiert.
Danach hab ich munter drauf los gelegt und all meine Systeme damit "beschossen". 🙂
Dabei habe ich festgestellt, dass mit dem Rose Attack (siehe Wireshark Screenshots) bei meiner Open SuSE 10.3 Kiste (Kernel 2.6.9-023) und dem Apple MacBook mit Mac OS X Snow Leopard nichts passiert ist. Diese sind, wie im Artikel erwähnt, dagegen immun.
Dann hab ich es mal auf meinen Router losgelassen, einem D-Link DIR-315. Et Voilá: Dieser ging auch prompt in die Knie, wie man im Screenshot anhand eines Pings sehen kann. Somit konnten keine Anfragen mehr von ihm bearbeitet werden. Auf einem Windows XP mit SP3 und aktuellstem Patchstand habe ich allerdings keinen so guten Erfolg gehabt. Ich konnte lediglich die CPU-Auslastung mit einem der New Dawn Attacken ein bisschen in die Höhe treiben, aber auch nicht allzu sehr.
Understanding IP fragmentation:
Schreib einen Kommentar