{"id":4989,"date":"2010-10-12T19:40:00","date_gmt":"2010-10-12T17:40:00","guid":{"rendered":"http:\/\/www.corelan.be:8800\/?p=4989"},"modified":"2010-10-12T19:40:00","modified_gmt":"2010-10-12T17:40:00","slug":"death-of-an-ftp-client","status":"publish","type":"post","link":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/","title":{"rendered":"Death of an ftp client \/ Birth of Metasploit modules"},"content":{"rendered":"<h3>Scope of work<\/h3>\n<p>Over the past few weeks, <a href=\"\/index.php\/security\/corelan-team-members\/\" target=\"_blank\" rel=\"noopener\">Corelan Team<\/a> has given its undivided attention to fuzzing ftp client applications.<\/p>\n<p>Using a custom built ftp client fuzzer, now part of the <a href=\"http:\/\/www.metasploit.com\" target=\"_blank\" rel=\"noopener\">Metasploit<\/a> framework (svn r10658 and up), the team has audited several ftp clients and applications that use an embedded client ftp component. One example of such an application is a tool that would synchronize \/ backup data from a computer to a remote ftp server.<\/p>\n<p>The 3 main audit\/attack vectors that were used during the &quot;project&quot; were<\/p>\n<ul>\n<li>send back overly long responses to ftp commands \/ requests sent by the ftp client to the server <\/li>\n<li>send back a file\/directory listing that contains overly long file\/folder names <\/li>\n<li>try to download a file that has an overly long filename. <\/li>\n<\/ul>\n<h3>The fuzzer<\/h3>\n<p>As mentioned earlier, in order to facilitate the initiative and fuzzing process, a custom ftp client fuzzer was implemented as a Metasploit module.&#160; Since this fuzzer was added to the Metasploit trunk, you can get a copy of the module by installing\/updating the svn (trunk) version of metasploit :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">cd \/pentest\/exploits\nsvn co https:\/\/metasploit.com\/svn\/framework3\/trunk\/<\/pre>\n<p>When the process completes, you\u2019ll have a copy of a svn version of Metasploit in \/pentest\/exploits\/trunk.<\/p>\n<p>I used the \/pentest\/exploits folder because that folder is where metasploit3 (and some other stuff) is located in <a href=\"http:\/\/www.backtrack-linux.org\/\" target=\"_blank\" rel=\"noopener\">BackTrack 4<\/a>.<\/p>\n<p>If all went well, you should find a file called \u201cclient_ftp.rb\u201d under \/pentest\/exploits\/trunk\/modules\/auxiliary\/fuzzers\/ftp.<\/p>\n<blockquote>\n<p>Note : you can keep your (svn) copy of Metasploit up to date using one of the following techniques :<\/p>\n<p>From the command line :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 480px; padding-right: 5px; height: 64px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">cd \/pentest\/exploits\nsvn co https:\/\/metasploit.com\/svn\/framework3\/trunk\/<\/pre>\n<p>\n    <br \/>From within msfconsole : <\/p>\n<p><\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 480px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">msfupdate<\/pre>\n<\/blockquote>\n<p>The fuzzer acts as an ftp server and is designed to send specific responses back to the connected ftp client.&#160; The module can handle PASV connections.<\/p>\n<p>This is how you can launch the fuzzer from inside a Metasploit console, and list the available options :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">root@bt:\/pentest\/exploits\/trunk# <strong><span style=\"color: #ff0000\">.\/msfconsole -n<\/span><\/strong>\n[-] ***\n[-] * WARNING: No database support: String User Disabled Database Support\n[-] ***\n\n                                  _\n                                 | |      o\n _  _  _    _ _|_  __,   ,    _  | |  __    _|_\n\/ |\/ |\/ |  |\/  |  \/  |  \/ \\_|\/ \\_|\/  \/  \\_|  |\n  |  |  |_\/|__\/|_\/\\_\/|_\/ \\\/ |__\/ |__\/\\__\/ |_\/|_\/\n                           \/|\n                           \\|\n\n       =[ metasploit v3.4.2-dev [core:3.4 api:1.0]\n+ -- --=[ 603 exploits - 302 auxiliary\n+ -- --=[ 225 payloads - 27 encoders - 8 nops\n       =[ svn r10370 updated today (2010.09.18)\n\nmsf &gt; <strong><span style=\"color: #ff0000\">use auxiliary\/fuzzers\/ftp\/client_ftp<\/span><\/strong>\nmsf auxiliary(client_ftp) &gt; <strong><span style=\"color: #ff0000\">show options<\/span><\/strong>\n\nModule options:\n\n   Name        Current Setting        Required  Description\n   ----        ---------------        --------  -----------\n   CYCLIC      true                   yes       Use Cyclic pattern instead of A's (fuzzing payload).\n   ENDSIZE     200000                 yes       Max Fuzzing string size.\n   ERROR       false                  yes       Reply with error codes only\n   EXTRALINE   true                   yes       Add extra CRLF's in response to LIST\n   FUZZCMDS    LIST,NLST,LS,RETR      yes       Comma separated list of commands to fuzz.\n   RESET       true                   yes       Reset fuzzing values after client disconnects with QUIT cmd.\n   SRVHOST     0.0.0.0                yes       The local host to listen on.\n   SRVPORT     21                     yes       The local port to listen on.\n   SSL         false                  no        Negotiate SSL for incoming connections\n   SSLVersion  SSL3                   no        Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1)\n   STARTSIZE   1000                   yes       Fuzzing string startsize.\n   STEPSIZE    1000                   yes       Increment fuzzing string each attempt.\n   WELCOME     Evil FTP Server Ready  yes       FTP Server welcome message.\n\nmsf auxiliary(client_ftp) &gt;<\/pre>\n<p><em><span style=\"font-size: xx-small\">(I used the -n option to load msfconsole without database support, which makes the console load a little faster)<\/span><\/em><\/p>\n<p>Let\u2019s take a look at the available options :<\/p>\n<ul>\n<li><strong>CYCLIC <\/strong>(<em>true<\/em>) :&#160; When set to true, this will tell the fuzzer to use a cyclic pattern as fuzz data.&#160; A cyclic pattern is often required to determining offsets because every 4 bytes in the string are unique. I figured \u201cwhy not use a cyclic pattern by default, instead of A\u2019s\u201d.&#160; When set to false, the fuzzer will use a series of \u201cA\u2019s\u201d as fuzz data. If you use a cyclic pattern and attach Immunity Debugger to the ftp client prior to fuzzing, you can use &quot;!<a href=\"http:\/\/web.archive.org\/web\/20131025202235\/http:\/\/redmine.corelan.be:8800\/projects\/pvefindaddr\" target=\"_blank\" rel=\"noopener\">pvefindaddr<\/a> suggest&quot; to find offsets and payload locations when the client crashes. <\/li>\n<li><strong>ENDSIZE <\/strong>(<em>200000<\/em>) :&#160; This is the maximum length of fuzz data to send back to the ftp client.&#160; When the maximum length is reached, the fuzzer will continue to work, but the fuzz data size will not increment anymore. <\/li>\n<li><strong>ERROR <\/strong>(<em>false<\/em>) :&#160; By default, the fuzzer *should* reply to the ftp client with return codes that make sense.&#160; If you set error to true, then the fuzzer will reply to the ftp client using error codes instead (5xx). <\/li>\n<li><strong>EXTRALINE <\/strong>(<em>true<\/em>) : In some cases, an ftp client can crash when the ftp server sends back a directory listing that contains a very long filename or folder name, followed by 2 carriage return\/line feeds. Setting the extraline option to &quot;false&quot; will tell the fuzzer to only use one carriage return\/line feed (because this might change\/influence\/break the behavior on some ftp clients) <\/li>\n<li><strong>FUZZCMDS <\/strong>(<em>LIST,NLST,LS,RETR<\/em>) : This is undoubtedly the most important setting of the fuzzer. This setting will allow you to define which response needs to be fuzzed. You can enter any of the supported commands in the fuzzer, or set to * to fuzz all commands. As you can see in the output above, you can define multiple commands by separating them with a comma. <\/li>\n<li><strong>RESET <\/strong>(<em>true<\/em>) : Each time a client sends a QUIT command, the fuzzer will reset the fuzz data length to the initial value, defined with STARTSIZE. If you don\u2019t want this to happen, then set RESET to false. <\/li>\n<li><strong>SRVHOST <\/strong>(<em>0.0.0.0<\/em>) : This is the IP address the fuzzer\/ftp server needs to bind to. 0.0.0.0 is your local machine. <\/li>\n<li><strong>SRVPORT <\/strong>(<em>21<\/em>) : This is the tcp port the fuzzer\/ftp server needs to listen on. Port 21 is the most commonly used port for FTP <\/li>\n<li><strong>STARTSIZE<\/strong> (<em>1000<\/em>) : This setting allows you to define the initial string length of the fuzzdata. <\/li>\n<li><strong>STEPSIZE <\/strong>(<em>1000<\/em>) : This setting defines the increments.&#160; Every time fuzz data is sent back to the ftp client, the length of the fuzz data is incremented with the value in stepsize. <\/li>\n<li><strong>WELCOME <\/strong>(<em>Evil FTP Server Ready<\/em>) : This is the FTP server banner.&#160; If you have defined the \u201cWELCOME\u201d command in the FUZZCMDS option, then the banner will obviously contain fuzz data. <\/li>\n<\/ul>\n<p>Starting the fuzzer, once all required settings have been defined, is very simple :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">msf auxiliary(client_ftp) &gt; <strong><span style=\"color: #ff0000\">run<\/span><\/strong>\n\n[*] Server started.<\/pre>\n<p>The server will now run in the background, and will continue to run until you cancel it.<\/p>\n<p>As soon as a client connects, some logging will be written to the Metasploit console, so you can trace back what happens and find out how long the fuzzdata payload was at the time the ftp client crashed :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">[*] Client connected : 192.168.0.188\n[*]  - Set up active data port 20\n[*] Sending response for 'WELCOME' command, arg\n[*] Sending response for 'USER' command, arg test\n[*] Sending response for 'PASS' command, arg test\n[*]  - Set up active data port 16011\n[*] Sending response for 'PORT' command, arg 192,168,0,188,62,139\n[*] Handling NLST command\n[*]  - Establishing active data connection\n[*]  - Data connection set up\n[*] * Fuzzing response for LIST, payload length 1000\n[*] (i) Setting next payload size to 2000\n[*]  - Sending directory list via data connection<\/pre>\n<p>If you want to change some of the settings, simply press CTRL+C, change the options, and issue &quot;run&quot; again.<\/p>\n<h3>The results<\/h3>\n<p>Using the Metasploit module, Corelan Team has discovered more than a dozen ftp client applications that were vulnerable.&#160; A lot of older applications appeared to be vulnerable to classic stack based buffer overflows \/ memory corruption, but also a number of more recent applications were found vulnerable too. In any case, we tested the most up-to-date versions of the ftp clients, available at the time of the tests (august\/september 2010).<\/p>\n<p>All tests were performed with clients running on XP SP3 English, with IE7, fully patched.<\/p>\n<p>In most cases, the discovered buffer overflows got triggered by the file \/ folder names that were returned to the client. Sending back a long filename either crashed the ftp client right away, or made the ftp client crash when attempting to open or download the file. In other cases, buffer overflows were triggered in the response to CWD or PWD commands.<\/p>\n<p>Based on the results of the project, it looks like a lot of developers assumed that files and\/or folders cannot be longer than 255 characters\u2026 While this is probably true for a real file system, it is not necessarily true when you have to parse and process a string that was sent back from an FTP server to the client.<\/p>\n<blockquote>\n<p>Please, dear developers, don\u2019t just assume. Treat all input as evil and sanitize\/check buffer lengths before processing input.<\/p>\n<\/blockquote>\n<p>An overview of the vulnerable applications that can be exploited (more or less reliably, unless stated otherwise) :<\/p>\n<table border=\"1\" bordercolor=\"#000000\" width=\"1398\" bgcolor=\"#ffffff\">\n<tbody>\n<tr>\n<td width=\"250\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">Application<\/font><\/span><\/strong><\/td>\n<td width=\"178\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">Version<\/font><\/span><\/strong><\/td>\n<td width=\"169\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">Bug found by<\/font><\/span><\/strong><\/td>\n<td width=\"298\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">Fixed in<\/font><\/span><\/strong><\/td>\n<td width=\"238\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">User intervention ? (*)<\/font><\/span><\/strong><\/td>\n<td width=\"263\"><strong><span style=\"text-decoration: underline\"><font style=\"background-color: #000000\" color=\"#ffff00\">Metasploit module<\/font><\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"296\"><a href=\"http:\/\/www.electrasoft.com\/32ftp.htm\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Electrasoft 32bit FTP<\/span><\/a><\/td>\n<td width=\"206\"><span style=\"font-size: x-small\">10.09.01<\/span><\/td>\n<td width=\"192\"><span style=\"font-size: x-small\">fancy<\/span><\/td>\n<td width=\"330\"><span style=\"color: #00ff00; font-size: x-small\"><strong>10.09.22 (<a href=\"http:\/\/www.electrasoft.com\/readmef.txt\" target=\"_blank\" rel=\"noopener\">sept 22 2010<\/a>)<\/strong><\/span><\/td>\n<td width=\"259\"><span style=\"font-size: x-small\">Yes \u2013 open \/ download file<\/span><\/td>\n<td width=\"282\"><span style=\"font-size: x-small\">32bitftp_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"313\"><span style=\"font-size: x-small\">LeapFTP<\/span><\/td>\n<td width=\"217\"><span style=\"font-size: x-small\">3.0.1.46<\/span><\/td>\n<td width=\"201\"><span style=\"font-size: x-small\">corelanc0d3r<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #00ff00; font-size: x-small\">3.1.x<\/span><\/strong><\/td>\n<td width=\"266\"><span style=\"font-size: x-small\">Yes \u2013 open \/ download file<\/span><\/td>\n<td width=\"288\"><span style=\"font-size: x-small\">leapftp_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"319\"><a href=\"http:\/\/www.psftp.de\/ftp_client.php\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">PSftp<\/span><\/a><\/td>\n<td width=\"221\"><span style=\"font-size: x-small\">1.8 b 789<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">fancy<\/span><\/td>\n<td width=\"343\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"269\"><span style=\"font-size: x-small\">Yes \u2013 drag file from server to client<\/span><\/td>\n<td width=\"291\"><span style=\"color: #ff0000; font-size: x-small\">no \u2013 not reliable (offset based on length of local temp folder)<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"320\"><a href=\"http:\/\/www.filestream.com\/concordftp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Filestream ConcordFTP<\/span><\/a><\/td>\n<td width=\"223\"><span style=\"font-size: x-small\">5.0 (b003071119)<\/span><\/td>\n<td width=\"206\"><span style=\"font-size: x-small\">nullthreat<\/span><\/td>\n<td width=\"342\"><strong><span style=\"color: #00ff00; font-size: x-small\">5.0.003 (oct 4)<\/span><\/strong><\/td>\n<td width=\"270\"><span style=\"font-size: x-small\">Yes \u2013 open \/ download file<\/span><\/td>\n<td width=\"293\"><span style=\"color: #ff0000; font-size: x-small\">no \u2013 not reliable<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"320\"><a href=\"http:\/\/www.fastream.com\/netfile.php\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Fastream Netfile FTP<\/span><\/a><\/td>\n<td width=\"224\"><span style=\"font-size: x-small\">6.0<\/span><\/td>\n<td width=\"206\"><span style=\"font-size: x-small\">corelanc0d3r<\/span><\/td>\n<td width=\"341\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">Yes \u2013 open \/ download file<\/span><\/td>\n<td width=\"294\"><span style=\"color: #ff0000; font-size: x-small\">no - 4byte arbitrary write<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"319\"><a href=\"http:\/\/www.waveflow.com\/shuttleftp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Waveflow Shuttle FTP<\/span><\/a><\/td>\n<td width=\"225\"><span style=\"font-size: x-small\">v3.7<\/span><\/td>\n<td width=\"206\"><span style=\"font-size: x-small\">nullthreat<\/span><\/td>\n<td width=\"341\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">Yes \u2013 drag file from server to client<\/span><\/td>\n<td width=\"295\"><span style=\"color: #ff0000; font-size: x-small\">no \u2013 null byte issue + offset based on length of target folder<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"319\"><span style=\"font-size: x-small\">Wilcom2 Ken FTP<\/span><\/td>\n<td width=\"226\"><span style=\"font-size: x-small\">v5.0<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">rick2600<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"color: #ff0000; font-size: x-small\">no \u2013 null byte issue<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/cis.hartnick.de\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">FTPPad<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">1.2.0<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">corelanc0d3r<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No, but might need 2 connects<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">ftppad_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.aasync.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Robert Vasvari AASync<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">2.2.1.0<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">corelanc0d3r<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #00ff00; font-size: x-small\">3.5.1.4<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">aasync_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.cursorarts.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">CursorArts Filewrangler<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">5.30<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">nullthreat<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">filewrangler_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.bluezonesoftware.com\/products\/secure-ftp\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">BlueZone Seagull FTP<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">3.3 build 409<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">corelanc0d3r<\/span><\/td>\n<td width=\"340\"><span style=\"color: #00ff00; font-size: x-small\"><strong>use BlueZone Secure FTP instead<\/strong><\/span><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">seagull_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.ftpshell.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">FTPShell<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">4.1 RC2<br \/>\n          <br \/>5.1<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">ekse <\/p>\n<p>corelanc0d3r<\/p>\n<p>        <\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\"><\/p>\n<p>ftpshell51_pwd_reply.rb<\/p>\n<p>        <\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.ftpgetter.com\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">FTPGetter Standard<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">3.55.0.5<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">ekse<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No (just wait for the task to kick in)<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">ftpgetter_pwd_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.ftpsynchronizer.com\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">FTP Synchronizer Pro<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">4.0.73.274<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">myne-us<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No (preview)<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">ftpsynch_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.gekkomanager.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Gekko Manager<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">0.77<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">nullthreat<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">gekkomgr_list_reply.rb<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"318\"><a href=\"http:\/\/www.odinshare.com\/secure-ftp-expert.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\">Odin Secure FTP Expert<\/span><\/a><\/td>\n<td width=\"227\"><span style=\"font-size: x-small\">4.1<\/span><\/td>\n<td width=\"205\"><span style=\"font-size: x-small\">rick2600<\/span><\/td>\n<td width=\"340\"><strong><span style=\"color: #ff0000; font-size: x-small\">not fixed \/ no reply<\/span><\/strong><\/td>\n<td width=\"271\"><span style=\"font-size: x-small\">No (but sometimes needs 2 connects)<\/span><\/td>\n<td width=\"296\"><span style=\"font-size: x-small\">odin_list_reply.rb<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em><span style=\"font-size: xx-small\"><\/span><\/em><\/p>\n<p><em><\/em><\/p>\n<p><em>(*) : User intervention other than simply connecting to the ftp server with default settings.<\/em><\/p>\n<p>Because Corelan Team uses the coordinated disclosure model, we have contacted developers (and sent reminders in many cases)\u2026 but unfortunately only a few of them actually responded and have fixed the issue that was reported to them. This means that if you are using one of the applications that has a \u201cnot fixed\u201d in the \u201cFixed in\u201d column, then you may want to consider installing a different FTP client, because you are currently left unprotected.&#160;&#160; It also means that, despite the fact that some specific bugs were fixed, the applications may still contain other bugs.<\/p>\n<p>Also, the fact that an application is listed as &quot;fixed&quot; doesn't mean that the application does not contain other bugs.<\/p>\n<p>Building reliable exploit modules for these applications was an interesting challenge. Some of the challenges included one or more of the following techniques :<\/p>\n<ul>\n<li>character set limitations <\/li>\n<li>inline encoding <\/li>\n<li>egg hunters <\/li>\n<li>I had to write a brand new <a href=\"\/index.php\/2010\/08\/22\/exploit-notes-win32-eggs-to-omelet\/\" target=\"_blank\" rel=\"noopener\">omelet egg hunter mixin<\/a> for Metasploit <\/li>\n<li>we had to develop and implement a checksum routine in both the omelet egg hunter and regular egg hunter (thank you <a href=\"https:\/\/web.archive.org\/web\/20130315000554\/http:\/\/www.ciphermonk.net\/?p=185\" target=\"_blank\" rel=\"noopener\">dijital1<\/a> for working on the checksum routine and <a href=\"https:\/\/twitter.com\/jduck1337\" target=\"_blank\" rel=\"noopener\">jduck<\/a> for porting the routine into the regular egg hunter mixin) <\/li>\n<li>deal with unicode conversion <\/li>\n<li>use <a href=\"\/index.php\/2010\/06\/16\/exploit-writing-tutorial-part-10-chaining-dep-with-rop-the-rubikstm-cube\/\" target=\"_blank\" rel=\"noopener\">rop style stack pivots<\/a> <\/li>\n<li>etc. <\/li>\n<\/ul>\n<p>If you ever have written Metasploit modules yourself, you will already know that this is sometimes more difficult than writing a custom exploit script that has hardcoded shellcode.&#160; Making modules portable\/reliable is definitely harder, but more rewarding at the same time.<\/p>\n<p>Anyways, exploit modules for the (reliable) exploitable vulnerable applications were merged into the Metasploit framework (svn\/trunk). Due to changes with the egghunter implementation in the svn release of Metasploit, and the addition of the Corelan Team omelet hunter mixin in Metasploit, these exploit modules will only work with the svn release (and future stable releases of Metasploit)<\/p>\n<p>All modules have been tested on XP SP3, using windows\/exec and windows\/meterpreter\/reverse_tcp payloads. In the event that manual intervention is required, we tried to make the filename look \u201cinteresting\u201d enough (and harmless at the same time) to convince the remote user to actually open\/download it.<\/p>\n<blockquote>\n<p>Most FTP clients appear to use threads to connect to the ftp server. That means that, in some cases, the ftp client doesn\u2019t even crash after the payload was sent\/executed, because only the corresponding thread gets killed. On top of that, some clients simply try to reconnect to the ftp server next time the application launches (=&gt; so it will get owned again if the evil server is still running).<\/p>\n<\/blockquote>\n<h3>Tips &amp; Tricks when using Metasploit to build exploits :<\/h3>\n<p>Metasploit is not only a great framework because of the available exploits and post-exploitation techniques, but it can be used to build exploits from scratch as well. In fact, building modules for Metasploit really forces you to think about reliability and portability of the exploit. You cannot just make a script work with one specific encoded payload, of a specific size.&#160; You now have to think about identifying bad chars, making sure any Metasploit payload will work and would fit into your buffer.&#160; So in that perspective, building Metasploit modules for your exploits makes a lot of sense because you will end up with a better and generic exploit.<\/p>\n<p>Building exploits often forces you to rely on script\/language specific functions that will help you troubleshooting why an exploit doesn't work.&#160; When writing exploits, most of the time, the exploit developer starts by trying to find payload offsets (offset to saved EIP, offset to a SEH record, offset to a register, and so on). While writing an exploit module, you also may need a way to display some verbose information onto screen, or dump the contents of the payload to screen or dump the shellcode to a file, etc.&#160; Maybe that is the reason why a lot of people write exploits in perl or python.<\/p>\n<p>But the truth is, all of this can be done within Metasploit itself, and it's not hard at all.<\/p>\n<p>What follows are some statements\/tips &amp; tricks that may come handy if you are building a brand new exploit within Metasploit.<\/p>\n<p>Some of the daunting tasks of writing exploits in a scripting language such as perl or python include setting up client-server or server-client communications.&#160; You will discover that Metasploit offers some great\/easy ways (mixins) to implement the communication layer so you can focus on your payload.<\/p>\n<p>I guess my message is : there's no need to reinvent the wheel. No matter what you're trying to do, I'm convinced that you can do it faster and better with Metasploit.<\/p>\n<h4>Metasploit template<\/h4>\n<p>First of all, you need a template, an empty Metasploit module file, so you can start inserting your payload.&#160; A basic template would look like this :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\"><span style=\"color: #008000\">##<\/span>\n<span style=\"color: #008000\"># $Id: $<\/span>\n<span style=\"color: #008000\">##<\/span>\n\n<span style=\"color: #008000\">##<\/span>\n<span style=\"color: #008000\"># This file is part of the Metasploit Framework and may be subject to<\/span>\n<span style=\"color: #008000\"># redistribution and commercial restrictions. Please see the Metasploit<\/span>\n<span style=\"color: #008000\"># Framework web site for more information on licensing and terms of use.<\/span>\n<span style=\"color: #008000\"># http:\/\/metasploit.com\/framework\/<\/span>\n<span style=\"color: #008000\">##<\/span>\n\n<span style=\"color: #0000ff\">class<\/span> Metasploit3 &lt; Msf::Exploit::Remote\n\n  <span style=\"color: #0000ff\">def<\/span> initialize(info = {})\n    <span style=\"color: #0000ff\">super<\/span>(update_info(info,\n      'Name'           =&gt; 'Name of the exploit',\n      'Description'    =&gt; %q{  write a few lines about the vulnerability\n                <span style=\"color: #0000ff\">and<\/span> about the exploit\n      },\n      'Author'   =&gt;\n        [\n          '&lt;your name goes here&gt;'\n        ],\n      'License'        =&gt; MSF_LICENSE,\n      'Version'        =&gt; &quot;<span style=\"color: #8b0000\">$Revision: $<\/span>&quot;,\n      'References'     =&gt;\n        [\n          [ 'URL', 'http:\/\/put.your.website\/here' ],\n        ],\n      'DefaultOptions' =&gt;\n        {\n          'EXITFUNC' =&gt; 'process',\n        },\n      'Payload'        =&gt;\n        {\n          'BadChars' =&gt; '\\x00',\n        },\n      'Platform'       =&gt; 'win',\n      'Targets'        =&gt;\n        [\n          [ 'Windows Universal', { 'Offset' =&gt; 1024, 'Ret' =&gt; 0x1234567 } ], <span style=\"color: #008000\">#ppr [ijl15.dll]<\/span>\n        ],\n      'Privileged'     =&gt; <span style=\"color: #0000ff\">false<\/span>,\n      'DisclosureDate' =&gt; 'Oct 2010',\n      'DefaultTarget'  =&gt; 0))\n\n    register_options(\n      [\n\n      ], <span style=\"color: #0000ff\">self<\/span>.<span style=\"color: #0000ff\">class<\/span>)\n  <span style=\"color: #0000ff\">end<\/span>\n\n  <span style=\"color: #0000ff\">def<\/span> exploit\n\n  <span style=\"color: #0000ff\">end<\/span>\n\n<span style=\"color: #0000ff\">end<\/span><\/pre>\n<p>Unless you are using a specific client-server \/tcp communication mixin, the &quot;exploit&quot; section is where your &quot;magic&quot; will happen.<\/p>\n<h4>Mixins<\/h4>\n<p>Metasploit comes with a series of mixins that can be included.&#160; If you are writing an exploit that will need to perform GET\/POST requests to a webserver, then you can use the HttpClient mixin.&#160; If you are building an exploit that will produce a file on the local filesystem then you can use the fileformat mixin, and so on.<\/p>\n<p>Instead of writing all &quot;logic\/engines&quot; into your Metasploit module, you can simply include the mixin and take advantage of the available methods.<\/p>\n<p><strong>If you are not sure about what mixin can\/should be used, then you can try to find an existing exploit module that uses the same attack vector as your exploit, and see which mixin has been used, and how it has been used.<\/strong><\/p>\n<blockquote>\n<p>You can include mixins by inserting an &quot;include&quot; statement at the top of the script, just below the &quot;class Metasploit3 &lt; Msf::Exploit::Remote&quot; line<\/p>\n<\/blockquote>\n<p>Some commonly used mixins include :<\/p>\n<table border=\"1\" bordercolor=\"#000000\" width=\"100%\" bgcolor=\"#ffffff\">\n<tbody>\n<tr>\n<td>Mixin name<\/td>\n<td width=\"257\">Include Syntax<\/td>\n<td width=\"367\">Purpose<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">FILEFORMAT<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::FILEFORMAT<\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">Write a file to the local filesystem. Commonly used for fileformat-based exploits. Path and filename variables are automatically added to the module options. All you need to do to write the file in your module is : <\/p>\n<p><em>file_create(your_payload)<\/em><\/p>\n<p>        <\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote::Tcp<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::Tcp<\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">Connect to a remote tcp server and send your payload. Target host and port are automatically added to the module options. All you need to do is put the following lines in your module :<br \/>\n          <br \/><\/span><em><span style=\"font-size: xx-small\">connect <\/p>\n<p>sock.put(your_payload)<\/p>\n<p>handler<\/p>\n<p>          <\/span><em><span style=\"font-size: xx-small\">disconnect<\/span><\/em><\/em><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote::HttpClient <\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::HttpClient <\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">Connect to a webserver, issue GET or POST commands. Can return the response into a variable. The modules\/exploits\/windows\/http folder contains many examples on how to use this mixin<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote:HttpServer::HTML<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::HttpServer::HTML<\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">Set up a simple webserver and return data when a client\/browser connects to you. Instead of using &quot;def exploit&quot;, you have to use &quot;def on_request_uri(cli, request)&quot; to capture the request and send the response back.&#160; You can find plenty of examples in the modules\/exploits\/windows\/browser folder<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote::TcpServer<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::TcpServer <\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">Set up a tcp server so you can allow clients to connect to you.&#160; Some examples can be found in the modules\/exploits\/windows\/ftp folder<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote::Ftp<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::Ftp<\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">This mixin allows you to connect to a remote ftp server in an easy way.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-size: xx-small\">Remote::SMTPDeliver<\/span><\/td>\n<td width=\"257\"><span style=\"font-size: xx-small\">include Msf::Exploit::Remote::SMTPDeliver<\/span><\/td>\n<td width=\"367\"><span style=\"font-size: xx-small\">This mixin provides you with an easy way to connect to a mail server and send emails.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When using a mixin, make sure to include the full namespace (Msf::Exploit\u2026)<\/p>\n<p>If you need more help about the mixins, you can also consult the Metasploit MSFCore API documentation.<\/p>\n<h4>Create a cyclic pattern inside a Metasploit module<\/h4>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">strPattern = Rex::Text.pattern_create(size_of_pattern)<\/pre>\n<h4>Writing payload to a file<\/h4>\n<p>If you want to compare the original shellcode with what is found in memory, for example using !pvefindaddr compare&#160; :<\/p>\n<p>First, include the fileformat mixin at the top of the module :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">include Msf::Exploit::FILEFORMAT<\/pre>\n<p>\n  <br \/>Next, write the payload to file : <\/p>\n<p><\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">file_create(payload.encoded)<\/pre>\n<p>When running the exploit, make sure to set the FILENAME and OUTPUTPATH options before running \u201cexploit\u201d. If you forgot to set these options, the payload will be written to a file called \u201cMSF\u201d.&#160;&#160; You can then transfer the file (using scp or so) to your windows system (the one that has the debugger attached to the application) and use it to run <a href=\"http:\/\/web.archive.org\/web\/20140819231739\/http:\/\/redmine.corelan.be:8800\/projects\/pvefindaddr\/wiki\/Pvefindaddr_usage\" target=\"_blank\" rel=\"noopener\">!pvefindaddr compare<\/a>.&#160; Remember that every time your run \u201cexploit\u201d, the payload gets encoded again, so make sure to use the payload file, created by the module, against the corresponding instance of the crashed application.<\/p>\n<p>Alternatively, if you don\u2019t want to abuse the FILEFORMAT mixin, you can just use plain ruby commands to write something (variable &quot;content&quot; in this example) to file :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\"><a style=\"color: #ff0000\" href=\"https:\/\/web.archive.org\/web\/20110905053022\/http:\/\/www.ruby-doc.org\/docs\/rdoc\/1.9\/classes\/File.html\">File<\/a>.<span style=\"color: #00008b\">open<\/span>(&quot;<span style=\"color: #8b0000\">outputfile.txt<\/span>&quot;, &quot;<span style=\"color: #8b0000\">wb<\/span>&quot;) { |fd| fd.write(content) }<\/pre>\n<h4>Creating a character conversion table<\/h4>\n<p>You can use the following basic iteration to create a variable that holds all bytes (00 to FF \u2013 filter out any bad chars if required). You can put this variable in your payload (so it would end up in memory), and use it as a basis to identify character transforms :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">charcnt=0\nchartable=&quot;<span style=\"color: #8b0000\">&#160;<\/span>&quot;\n<span style=\"color: #0000ff\">while<\/span> charcnt&lt; 256\n   chartable &lt;&lt; [charcnt &amp; 0xff].pack('C')\n   charcnt=charcnt+1\n<span style=\"color: #0000ff\">end<\/span><\/pre>\n<h4>Dumping payload to screen<\/h4>\n<p>You can write the payload (represented by variable \u2018buffer\u2019 in this example) to screen using the following statement :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">print_status((&quot;buffer: %u bytes:\\n&quot; % buffer.length) + Rex::Text.to_hex_dump(buffer))<\/pre>\n<p>(thanks fancy)<\/p>\n<p>You can use the print_status() function to display information to screen, while you are debugging a certain new module. You can also use the log file (see later) when debugging a new exploit module.<\/p>\n<h4>Using egg hunter in Metasploit (svn\/trunk)<\/h4>\n<p>In the svn\/trunk release of Metasploit, the egg hunter mixin was changed.<\/p>\n<p>The 2 major changes are :<\/p>\n<ul>\n<li>you can specify a custom tag (4 bytes) <\/li>\n<li>you can enable the checksum routine (which may come handy if the payload\/egg can be found in multiple locations in memory, and some of them were corrupted). We had to implement this checksum routine to be able to make some of the exploits work reliably. <\/li>\n<\/ul>\n<p>The new syntax to use an egg hunter in a Metasploit module is :<\/p>\n<p>First, include the egghunter mixin :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">include Msf::Exploit::Remote::Egghunter<\/pre>\n<p>\n  <br \/>Set the options <\/p>\n<p><\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">badchars=&quot;&quot;\neggoptions =\n{\n   :checksum =&gt; true,\n   :eggtag =&gt; &quot;W00T&quot;\n}<\/pre>\n<p><em>(in this example, the checksum routine is enabled, and we have set a custom tag \u201cW00T\u201d). The &quot;badchars&quot; variable is left empty because there is no badchar filter routine in the egg hunter generation routine. You can still encode the hunter after it was generated (see \u201cPerform inline payload encoding\u201d)<\/em><\/p>\n<p>Finally, call the egghunter generation routine<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">hunter,egg = generate_egghunter(payload.encoded,badchars,eggoptions)<\/pre>\n<p>The egghunter payload is contained in the \u201chunter\u201d variable, the tag + the actual payload needs to be referenced using the \u201cegg\u201d variable.<\/p>\n<h4>Using omelet egg hunter in Metasploit (svn\/trunk)<\/h4>\n<p>Similarly to the normal egg hunter, and as explained in <a href=\"\/index.php\/2010\/08\/22\/exploit-notes-win32-eggs-to-omelet\/\" target=\"_blank\" rel=\"noopener\">this article<\/a>, the omelet egg hunter can be used by first including the mixin into the module<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">include Msf::Exploit::Omelet<\/pre>\n<p>\n  <br \/>setting the options <\/p>\n<p><\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">badchars = &quot;&quot;\nomeletoptions =\n{\n  :eggsize =&gt; 123,\n  :eggtag =&gt; &quot;00w&quot;,\n  :searchforward =&gt; true,\n  :reset =&gt; false,\n  :checksum =&gt; true\n}<\/pre>\n<p><em>(you can see that the omelet hunter has more options than the normal egg hunter. You can find more info about these options in <\/em><a href=\"\/index.php\/2010\/08\/22\/exploit-notes-win32-eggs-to-omelet\/\" target=\"_blank\" rel=\"noopener\"><em>this<\/em><\/a><em> article)<\/em><\/p>\n<p>and finally calling the generation routine<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">omelet =  generate_omelet(payload.encoded,badchars,omeletoptions)<\/pre>\n<p>omelet[0] contains the omelet hunter, and omelet[1] contains an array with all eggs.<\/p>\n<p>You can access the eggs using a simple iteration :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">omelet[1].each do |thischunk|\n   #do something with the &quot;thischunk&quot; variable\nend<\/pre>\n<p>Get omelet[0] to run and it will locate all eggs, reassemble them, and execute the original payload.<\/p>\n<h4>Perform inline payload encoding in Metasploit :<\/h4>\n<p>If you need to re-encode (or just encode) payload inside the module, you can use the following statement :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">badchars=&quot;\\x00&quot;\nmy_payload = &quot;&quot; #put your payload in here\nencodedpayload = Msf::Util::EXE.encode_stub(framework, [ARCH_X86], my_payload, ::Msf::Module::PlatformList.win32, badchars)<\/pre>\n<p>This technique does not allow you to specify the encoder to use. It will, based on the badchars specified, attempt to encode the payload using various encoders, starting with shikata_ga_nai, fstenv_mov and then move on to the other encoders, until it satisfies the badchars.<\/p>\n<p>This may be required if you have to generate custom asm code inside your module (for whatever reason), and then encode it before using it.<\/p>\n<p>You can write inline asm code inside a module using the following technique :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">Metasm::Shellcode.assemble(Metasm::Ia32.new, &quot;instruction1 instruction2&quot;).encode_string<\/pre>\n<p>(instructions should be separated by spaces, semicolons or newline \\n)<\/p>\n<p>To keep things readable, you could also put the instructions in a variable first and then feed it to the assembler :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">customcode = &quot;push esp\\npop edi\\nmov esp,ebp&quot;\nbadchars=&quot;\\x00&quot;\nbuffer = Metasm::Shellcode.assemble(Metasm::Ia32.new, customcode).encode_string<\/pre>\n<h4>\\x90\\x90\\x90\\x90\\x90 NOPS<\/h4>\n<p>You can use a Metasploit function to create a set of NOPS :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">nops = make_nops(size)<\/pre>\n<h4>Monitor the log file<\/h4>\n<p>In order to catch syntax errors or other issues when building Metasploit modules, you can monitor the log file.&#160; In Backtrack, the log file is located at \/root\/.msf3\/logs\/framework.log (assuming that you are running Metasploit as root)<\/p>\n<p>If you want to increase (or decrease) the logging level, you can do this :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">.\/msfconsole\nmsf&gt; setg LogLevel 3\nmsf&gt;<\/pre>\n<p>This will set the LogLevel to 3 (all logging). If you set the logging to 0, then only default logging will be displayed in the log file.&#160; LogLevel 3 will produce a lot of logging, so make sure to watch the filesize.<\/p>\n<h4>Making changes to modules<\/h4>\n<p>Once you started building your module, you are most likely going to edit the module &amp; re-run it to see if it works.&#160; If you have made changes to the &quot;exploit&quot; section, then you can simply issue a &quot;reload&quot; \/ &quot;rexploit&quot; command in msfconsole to run the module again (taking the changes into account). If you made changes to the initialize section, then you may have to close the console and open it again.<\/p>\n<h4>Msfconsole settings and module auto-load<\/h4>\n<p>If you issue the \u201csave\u201d command, then the LogLevel value (and other datastore values) will be stored permanently (into \/root\/.msf3\/config).&#160; Keep in mind that this will also set the active exploit module and module parameters, if any, as the default parameters to use when opening the console.&#160;&#160; This may be helpful when you are working on a specific module and you want msfconsole to automatically load your module and pre-populate the settings\u2026&#160; But if you don\u2019t want this, edit the config file and remove the unwanted settings.<\/p>\n<p>Removing the ActiveModule from the [framework\/ui\/console] section will prevent that module from being loaded automatically when you start msfconsole.<\/p>\n<h4>Some other nice-to-know things about msfconsole (svn release)<\/h4>\n<h5>1. Payload auto selection<\/h5>\n<p>Did you know this : Try selecting an exploit, and run &quot;exploit&quot; without selecting the payload. It will automatically set up a reverse meterpreter.&#160; Saves you a bit of typing \ud83d\ude42<\/p>\n<h5>2. Advanced payload options :<\/h5>\n<p>Select an exploit, set a payload\u2026 and then run &quot;show advanced&quot;<\/p>\n<p>Example :<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #646464; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">msf &gt; use exploit\/windows\/ftp\/leapftp_list_reply\nmsf exploit(leapftp_list_reply) &gt; set payload windows\/meterpreter\/reverse_tcp\npayload =&gt; windows\/meterpreter\/reverse_tcp\nmsf exploit(leapftp_list_reply) &gt; show advanced\n\nModule advanced options:\n\n   Name           : ContextInformationFile\n   Current Setting:\n   Description    : The information file that contains context information\n\n   Name           : DisablePayloadHandler\n   Current Setting: <span style=\"color: #0000ff\">false<\/span>\n   Description    : Disable the handler code <span style=\"color: #0000ff\">for<\/span> the selected payload\n\n   Name           : EnableContextEncoding\n   Current Setting: <span style=\"color: #0000ff\">false<\/span>\n   Description    : Use transient context <span style=\"color: #0000ff\">when<\/span> encoding payloads\n\n   Name           : ListenerComm\n   Current Setting:\n   Description    : The specific communication channel to use <span style=\"color: #0000ff\">for<\/span> this service\n\n   Name           : WORKSPACE\n   Current Setting:\n   Description    : Specify the workspace <span style=\"color: #0000ff\">for<\/span> this <span style=\"color: #0000ff\">module<\/span>\n\nPayload advanced options (windows\/meterpreter\/reverse_tcp):\n\n   Name           : AutoLoadStdapi\n   Current Setting: <span style=\"color: #0000ff\">true<\/span>\n   Description    : Automatically <span style=\"color: #00008b\">load<\/span> the Stdapi extension\n\n   Name           : AutoRunScript\n   Current Setting:\n   Description    : A script to run automatically on session creation.\n\n   Name           : AutoSystemInfo\n   Current Setting: <span style=\"color: #0000ff\">true<\/span>\n   Description    : Automatically capture <span style=\"color: #00008b\">system<\/span> information on initialization.\n\n   Name           : InitialAutoRunScript\n   Current Setting:\n   Description    : An initial script to run on session creation (before\n      AutoRunScript)\n\n   Name           : ReverseConnectRetries\n   Current Setting: 5\n   Description    : The number of connection attempts to try before exiting the\n      process\n\n   Name           : ReverseListenerBindAddress\n   Current Setting:\n   Description    : The specific IP address to bind to on the local <span style=\"color: #00008b\">system<\/span>\n\n   Name           : ReverseListenerComm\n   Current Setting:\n   Description    : The specific communication channel to use <span style=\"color: #0000ff\">for<\/span> this listener\n\n   Name           : WORKSPACE\n   Current Setting:\n   Description    : Specify the workspace <span style=\"color: #0000ff\">for<\/span> this <span style=\"color: #0000ff\">module<\/span><\/pre>\n<h4>Contributing to Metasploit<\/h4>\n<p>http:\/\/www.metasploit.com\/redmine\/projects\/framework\/wiki\/ContributingToTheFramework<\/p>\n<p>Read&#160; the Metasploit guidelines to get familiar with some coding instructions and ways to contribute to the framework.<\/p>\n<p>Code styling :<\/p>\n<ul>\n<li>Hard tabs, not spaces (indent up to 4 tabs). If you have used spaces, you can use Kate to edit the file, select the contents and simply press the tab space to convert the spaces to tabs. Fast and easy. <\/li>\n<li>Make sure the end of line format is set to Unix <\/li>\n<li>Try to keep your lines under 100 columns (assuming four-space tabs) <\/li>\n<li>do; end instead of {} for a block <\/li>\n<li>Always use str[0,1] instead of str[0] (This avoids a known ruby 1.8\/1.9 incompatibility.) <\/li>\n<li>Use whitespace when using operators <\/li>\n<\/ul>\n<p>If you want to get your module added to Metasploit, make sure to include the following mandatory sections :<\/p>\n<p>Make sure the module starts with the following <strong><span style=\"text-decoration: underline\">license statement<\/span><\/strong> (and make sure it includes the $Id: $ tag)<\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\"><span style=\"color: #008000\">##<\/span>\n<span style=\"color: #008000\"># $Id: $<\/span>\n<span style=\"color: #008000\">##<\/span>\n\n<span style=\"color: #008000\">##<\/span>\n<span style=\"color: #008000\"># This file is part of the Metasploit Framework and may be subject to<\/span>\n<span style=\"color: #008000\"># redistribution and commercial restrictions. Please see the Metasploit<\/span>\n<span style=\"color: #008000\"># Framework web site for more information on licensing and terms of use.<\/span>\n<span style=\"color: #008000\"># http:\/\/metasploit.com\/framework\/<\/span>\n<span style=\"color: #008000\">##<\/span>\n<\/pre>\n<p>\n  <br \/>Also, in the initialize section, set the <strong><span style=\"text-decoration: underline\">version <\/span><\/strong>to $Revision: $ : <\/p>\n<p><\/p>\n<pre style=\"border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #808080; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px\">'Version'        =&gt; &quot;<span style=\"color: #8b0000\">$Revision: $<\/span>&quot;,<\/pre>\n<p>When your module is ready, tested, and found reliable, send it to <a href=\"mailto:msfdev@metasploit.com\">msfdev@metasploit.com<\/a> if you want to get it reviewed and added into the svn trunk.<\/p>\n<p>(don\u2019t forget to include a nice \u201cgreetz to corelanc0d3r \/ Corelan Team\u201d in your module \ud83d\ude42 )<\/p>\n<p>Some related links :<\/p>\n<ul>\n<li>http:\/\/www.metasploit.com\/redmine\/projects\/framework\/wiki\/ExploitModuleDev <\/li>\n<li>http:\/\/www.metasploit.com\/redmine\/projects\/framework\/wiki\/PortingExploits <\/li>\n<li>http:\/\/www.metasploit.com\/redmine\/projects\/framework\/wiki\/DeveloperGuide <\/li>\n<\/ul>\n<p>That\u2019s it for now.<\/p>\n<p>Happy sploiting...<\/p>\n<p>... and think twice next time you launch your ftp client.<\/p>\n<p>&#160;<\/p>\n<h3>Thanks to<\/h3>\n<ul>\n<li>Corelan Team - you guys rock ! <\/li>\n<li>jduck - for putting up with me \ud83d\ude42 <\/li>\n<\/ul>\n<p><!--Digiprove_Start--><span lang=\"en\" xml:lang=\"en\" style=\"vertical-align:middle; display:inline; padding:3px; line-height:normal;border:1px solid #e3e3e3;background-color:#000000;\" title=\"certified 12 October 2010 18:17:28 UTC by Digiprove certificate P54611\" ><a href=\"http:\/\/www.digiprove.com\/show_certificate.aspx?id=P54611;guid=yN5BmBwS-0GN-4IqKA3_5w\" target=\"_blank\" rel=\"copyright noopener\" style=\"border:0px; float:none; display:inline; text-decoration: none;background-color:#000000;\"><img decoding=\"async\" src=\"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png\" style=\"vertical-align:middle; display:inline; border:0px; margin:0px; float:none; background-color:transparent\" border=\"0\" width=\"12px\" height=\"12px\" alt=\"\"\/><span style=\"font-family: Tahoma, MS Sans Serif; font-size:9px; color:#FFFFFF; border:0px; float:none; display:inline; text-decoration:none; letter-spacing:normal\" onmouseover=\"this.style.color='#FFFF1C';\" onmouseout=\"this.style.color='#FFFFFF';\">&nbsp;&nbsp;Copyright secured by Digiprove&nbsp;&copy; 2010 Peter Van Eeckhoutte<\/span><\/a><!--F6FA5C0AA8F5EB0B003297D19EC57CAA8F3CCBE7CA1EB0B4ECF9C7CB1F19F0C1--><\/span><!--Digiprove_End--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the past few weeks, Corelan Team has given its undivided attention to fuzzing ftp client applications.<\/p>\n<p>Using a custom built ftp client fuzzer, now part of the Metasploit framework, the team has audited several ftp clients and applications that use an embedded client ftp component. One example of such an application is a tool that would synchronize \/ backup data from a computer to a remote ftp server.<\/p>\n<p>The 3 main audit\/attack vectors that were used during the \"project\" were<\/p>\n<p>send back overly long responses to ftp commands \/ requests sent by the ftp client to the server<br \/>\nsend back a file\/directory listing that contains overly long file\/folder names<br \/>\ntry to download a file that has an overly long filename.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[245,127],"tags":[3733,2786,2440,1991,1883,1875,1824,47],"class_list":["post-4989","post","type-post","status-publish","format-standard","hentry","category-exploits","category-security","tag-exploit-development-tutorial","tag-egghunter","tag-ftp","tag-fuzzing","tag-exploits","tag-payload","tag-metasploit","tag-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Death of an ftp client \/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Death of an ftp client \/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research\" \/>\n<meta property=\"og:description\" content=\"Over the past few weeks, Corelan Team has given its undivided attention to fuzzing ftp client applications. Using a custom built ftp client fuzzer, now part of the Metasploit framework, the team has audited several ftp clients and applications that use an embedded client ftp component. One example of such an application is a tool that would synchronize \/ backup data from a computer to a remote ftp server. The 3 main audit\/attack vectors that were used during the &quot;project&quot; were send back overly long responses to ftp commands \/ requests sent by the ftp client to the server send back a file\/directory listing that contains overly long file\/folder names try to download a file that has an overly long filename.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/\" \/>\n<meta property=\"og:site_name\" content=\"Corelan | Exploit Development &amp; Vulnerability Research\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/corelanconsulting\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-12T17:40:00+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png\" \/>\n<meta name=\"author\" content=\"corelanc0d3r\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@corelanc0d3r\" \/>\n<meta name=\"twitter:site\" content=\"@corelanc0d3r\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/\"},\"author\":{\"name\":\"corelanc0d3r\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/person\\\/3be5542b9b0a0787893db83a5ad68e8f\"},\"headline\":\"Death of an ftp client \\\/ Birth of Metasploit modules\",\"datePublished\":\"2010-10-12T17:40:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/\"},\"wordCount\":4092,\"publisher\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.digiprove.com\\\/images\\\/dp_seal_trans_16x16.png\",\"keywords\":[\"exploit development tutorial\",\"egghunter\",\"ftp\",\"fuzzing\",\"Exploits\",\"payload\",\"metasploit\",\"server\"],\"articleSection\":[\"Exploits\",\"Security\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/\",\"name\":\"Death of an ftp client \\\/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.digiprove.com\\\/images\\\/dp_seal_trans_16x16.png\",\"datePublished\":\"2010-10-12T17:40:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#primaryimage\",\"url\":\"http:\\\/\\\/www.digiprove.com\\\/images\\\/dp_seal_trans_16x16.png\",\"contentUrl\":\"http:\\\/\\\/www.digiprove.com\\\/images\\\/dp_seal_trans_16x16.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2010\\\/10\\\/12\\\/death-of-an-ftp-client\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.corelan.be\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Death of an ftp client \\\/ Birth of Metasploit modules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#website\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/\",\"name\":\"Corelan CyberSecurity Research\",\"description\":\"Corelan publishes in-depth tutorials on exploit development, Windows exploitation, vulnerability research, heap internals, reverse engineering and security tooling used by professionals worldwide.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.corelan.be\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\",\"name\":\"Corelan CyberSecurity Research\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/corelanlogo2_small-20.png\",\"contentUrl\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/corelanlogo2_small-20.png\",\"width\":200,\"height\":200,\"caption\":\"Corelan CyberSecurity Research\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/corelanconsulting\",\"https:\\\/\\\/x.com\\\/corelanc0d3r\",\"https:\\\/\\\/x.com\\\/corelanconsulting\",\"https:\\\/\\\/instagram.com\\\/corelanconsult\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/person\\\/3be5542b9b0a0787893db83a5ad68e8f\",\"name\":\"corelanc0d3r\",\"pronouns\":\"he\\\/him\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x\",\"caption\":\"corelanc0d3r\"},\"description\":\"Peter Van Eeckhoutte is the founder of Corelan and a globally recognized expert in exploit development and vulnerability research. With over two decades in IT security, he built Corelan into a respected platform for deep technical research, hands-on training, and knowledge sharing. Known for his influential exploit development tutorials, tools, and real-world training, Peter combines a strong research mindset with a passion for education\u2014helping security professionals understand not just how exploits work, but why.\",\"sameAs\":[\"https:\\\/\\\/www.corelan-training.com\",\"https:\\\/\\\/instagram.com\\\/corelanc0d3r\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/petervaneeckhoutte\\\/\",\"https:\\\/\\\/x.com\\\/corelanc0d3r\"],\"url\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/author\\\/admin0\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Death of an ftp client \/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/","og_locale":"en_US","og_type":"article","og_title":"Death of an ftp client \/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research","og_description":"Over the past few weeks, Corelan Team has given its undivided attention to fuzzing ftp client applications. Using a custom built ftp client fuzzer, now part of the Metasploit framework, the team has audited several ftp clients and applications that use an embedded client ftp component. One example of such an application is a tool that would synchronize \/ backup data from a computer to a remote ftp server. The 3 main audit\/attack vectors that were used during the \"project\" were send back overly long responses to ftp commands \/ requests sent by the ftp client to the server send back a file\/directory listing that contains overly long file\/folder names try to download a file that has an overly long filename.","og_url":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/","og_site_name":"Corelan | Exploit Development &amp; Vulnerability Research","article_publisher":"https:\/\/www.facebook.com\/corelanconsulting","article_published_time":"2010-10-12T17:40:00+00:00","og_image":[{"url":"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png","type":"","width":"","height":""}],"author":"corelanc0d3r","twitter_card":"summary_large_image","twitter_creator":"@corelanc0d3r","twitter_site":"@corelanc0d3r","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#article","isPartOf":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/"},"author":{"name":"corelanc0d3r","@id":"https:\/\/www.corelan.be\/#\/schema\/person\/3be5542b9b0a0787893db83a5ad68e8f"},"headline":"Death of an ftp client \/ Birth of Metasploit modules","datePublished":"2010-10-12T17:40:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/"},"wordCount":4092,"publisher":{"@id":"https:\/\/www.corelan.be\/#organization"},"image":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#primaryimage"},"thumbnailUrl":"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png","keywords":["exploit development tutorial","egghunter","ftp","fuzzing","Exploits","payload","metasploit","server"],"articleSection":["Exploits","Security"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/","url":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/","name":"Death of an ftp client \/ Birth of Metasploit modules - Corelan | Exploit Development &amp; Vulnerability Research","isPartOf":{"@id":"https:\/\/www.corelan.be\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#primaryimage"},"image":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#primaryimage"},"thumbnailUrl":"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png","datePublished":"2010-10-12T17:40:00+00:00","breadcrumb":{"@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#primaryimage","url":"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png","contentUrl":"http:\/\/www.digiprove.com\/images\/dp_seal_trans_16x16.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.corelan.be\/index.php\/2010\/10\/12\/death-of-an-ftp-client\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.corelan.be\/"},{"@type":"ListItem","position":2,"name":"Death of an ftp client \/ Birth of Metasploit modules"}]},{"@type":"WebSite","@id":"https:\/\/www.corelan.be\/#website","url":"https:\/\/www.corelan.be\/","name":"Corelan CyberSecurity Research","description":"Corelan publishes in-depth tutorials on exploit development, Windows exploitation, vulnerability research, heap internals, reverse engineering and security tooling used by professionals worldwide.","publisher":{"@id":"https:\/\/www.corelan.be\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.corelan.be\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.corelan.be\/#organization","name":"Corelan CyberSecurity Research","url":"https:\/\/www.corelan.be\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.corelan.be\/#\/schema\/logo\/image\/","url":"https:\/\/www.corelan.be\/wp-content\/uploads\/2026\/03\/corelanlogo2_small-20.png","contentUrl":"https:\/\/www.corelan.be\/wp-content\/uploads\/2026\/03\/corelanlogo2_small-20.png","width":200,"height":200,"caption":"Corelan CyberSecurity Research"},"image":{"@id":"https:\/\/www.corelan.be\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/corelanconsulting","https:\/\/x.com\/corelanc0d3r","https:\/\/x.com\/corelanconsulting","https:\/\/instagram.com\/corelanconsult"]},{"@type":"Person","@id":"https:\/\/www.corelan.be\/#\/schema\/person\/3be5542b9b0a0787893db83a5ad68e8f","name":"corelanc0d3r","pronouns":"he\/him","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x","url":"https:\/\/secure.gravatar.com\/avatar\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3783bed6acd72d7fa5bb2387d88acbb9a3403e7cada60b2037e1cbb74ad451f9?s=96&d=mm&r=x","caption":"corelanc0d3r"},"description":"Peter Van Eeckhoutte is the founder of Corelan and a globally recognized expert in exploit development and vulnerability research. With over two decades in IT security, he built Corelan into a respected platform for deep technical research, hands-on training, and knowledge sharing. Known for his influential exploit development tutorials, tools, and real-world training, Peter combines a strong research mindset with a passion for education\u2014helping security professionals understand not just how exploits work, but why.","sameAs":["https:\/\/www.corelan-training.com","https:\/\/instagram.com\/corelanc0d3r","https:\/\/www.linkedin.com\/in\/petervaneeckhoutte\/","https:\/\/x.com\/corelanc0d3r"],"url":"https:\/\/www.corelan.be\/index.php\/author\/admin0\/"}]}},"views":14434,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts\/4989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/comments?post=4989"}],"version-history":[{"count":0,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts\/4989\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/media?parent=4989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/categories?post=4989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/tags?post=4989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}