Simple FTP Client Fuzzer - Metasploit


This page contains detailed information about how to use the auxiliary/fuzzers/ftp/client_ftp metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Simple FTP Client Fuzzer
Module: auxiliary/fuzzers/ftp/client_ftp
Source code: modules/auxiliary/fuzzers/ftp/client_ftp.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module will serve an FTP server and perform FTP client interaction fuzzing

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


msf > use auxiliary/fuzzers/ftp/client_ftp
msf auxiliary(client_ftp) > show targets
    ... a list of targets ...
msf auxiliary(client_ftp) > set TARGET target-id
msf auxiliary(client_ftp) > show options
    ... show and set options ...
msf auxiliary(client_ftp) > exploit

Go back to menu.

Msfconsole Usage


Here is how the fuzzers/ftp/client_ftp auxiliary module looks in the msfconsole:

msf6 > use auxiliary/fuzzers/ftp/client_ftp

msf6 auxiliary(fuzzers/ftp/client_ftp) > show info

       Name: Simple FTP Client Fuzzer
     Module: auxiliary/fuzzers/ftp/client_ftp
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  corelanc0d3r <[email protected]>

Check supported:
  No

Basic options:
  Name       Current Setting        Required  Description
  ----       ---------------        --------  -----------
  CYCLIC     true                   yes       Use Cyclic pattern instead of A's (fuzzing payload).
  ENDSIZE    200000                 yes       Max Fuzzing string size.
  ERROR      false                  yes       Reply with error codes only
  EXTRALINE  true                   yes       Add extra CRLF's in response to LIST
  FUZZCMDS   LIST,NLST,LS,RETR      yes       Comma separated list of commands to fuzz (Uppercase).
  RESET      true                   yes       Reset fuzzing values after client disconnects with QUIT cmd.
  SRVHOST    0.0.0.0                yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
  SRVPORT    21                     yes       The local port to listen on.
  SSL        false                  no        Negotiate SSL for incoming connections
  SSLCert                           no        Path to a custom SSL certificate (default is randomly generated)
  STARTSIZE  1000                   yes       Fuzzing string startsize.
  STEPSIZE   1000                   yes       Increment fuzzing string each attempt.
  WELCOME    Evil FTP Server Ready  yes       FTP Server welcome message.

Description:
  This module will serve an FTP server and perform FTP client 
  interaction fuzzing

References:
  http://www.corelan.be:8800/index.php/2010/10/12/death-of-an-ftp-client/

Module Options


This is a complete list of options available in the fuzzers/ftp/client_ftp auxiliary module:

msf6 auxiliary(fuzzers/ftp/client_ftp) > show options

Module options (auxiliary/fuzzers/ftp/client_ftp):

   Name       Current Setting        Required  Description
   ----       ---------------        --------  -----------
   CYCLIC     true                   yes       Use Cyclic pattern instead of A's (fuzzing payload).
   ENDSIZE    200000                 yes       Max Fuzzing string size.
   ERROR      false                  yes       Reply with error codes only
   EXTRALINE  true                   yes       Add extra CRLF's in response to LIST
   FUZZCMDS   LIST,NLST,LS,RETR      yes       Comma separated list of commands to fuzz (Uppercase).
   RESET      true                   yes       Reset fuzzing values after client disconnects with QUIT cmd.
   SRVHOST    0.0.0.0                yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT    21                     yes       The local port to listen on.
   SSL        false                  no        Negotiate SSL for incoming connections
   SSLCert                           no        Path to a custom SSL certificate (default is randomly generated)
   STARTSIZE  1000                   yes       Fuzzing string startsize.
   STEPSIZE   1000                   yes       Increment fuzzing string each attempt.
   WELCOME    Evil FTP Server Ready  yes       FTP Server welcome message.

Advanced Options


Here is a complete list of advanced options supported by the fuzzers/ftp/client_ftp auxiliary module:

msf6 auxiliary(fuzzers/ftp/client_ftp) > show advanced

Module advanced options (auxiliary/fuzzers/ftp/client_ftp):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   ListenerComm                     no        The specific communication channel to use for this service
   SSLCipher                        no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression  false            no        Enable SSL/TLS-level compression
   VERBOSE         false            no        Enable detailed status messages
   WORKSPACE                        no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the fuzzers/ftp/client_ftp module can do:

msf6 auxiliary(fuzzers/ftp/client_ftp) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the fuzzers/ftp/client_ftp auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(fuzzers/ftp/client_ftp) > show evasion

Module evasion options:

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   TCP::max_send_size  0                no        Maximum tcp segment size.  (0 = disable)
   TCP::send_delay     0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

ERROR


Here is a relevant code snippet related to the "ERROR" error message:

34:	      OptInt.new('ENDSIZE', [ true, "Max Fuzzing string size.",200000]),
35:	      OptInt.new('STEPSIZE', [ true, "Increment fuzzing string each attempt.",1000]),
36:	      OptBool.new('RESET', [ true, "Reset fuzzing values after client disconnects with QUIT cmd.",true]),
37:	      OptString.new('WELCOME', [ true, "FTP Server welcome message.","Evil FTP Server Ready"]),
38:	      OptBool.new('CYCLIC', [ true, "Use Cyclic pattern instead of A's (fuzzing payload).",true]),
39:	      OptBool.new('ERROR', [ true, "Reply with error codes only",false]),
40:	      OptBool.new('EXTRALINE', [ true, "Add extra CRLF's in response to LIST",true])
41:	      ])
42:	  end
43:	
44:	

Failed to establish data connection: <E.CLASS> <E>


Here is a relevant code snippet related to the "Failed to establish data connection: <E.CLASS> <E>" error message:

122:	        return @state[c][:passive_sock].accept
123:	      end
124:	    end
125:	    print_status(" - Data connection active")
126:	    rescue ::Exception => e
127:	      print_error("Failed to establish data connection: #{e.class} #{e}")
128:	    end
129:	    nil
130:	  end
131:	
132:	  # FTP Client-to-Server Command handlers

ERROR


Here is a relevant code snippet related to the "ERROR" error message:

216:	      @state[c][:daddr] = daddr
217:	      @state[c][:dport] = dport
218:	      pasv  = (daddr.split('.') + [dport].pack('n').unpack('CC')).join(',')
219:	      dofuzz = fuzz_this_cmd("PASV")
220:	      code = 227
221:	      if datastore['ERROR']
222:	        code = 557
223:	      end
224:	      if (dofuzz==1)
225:	        print_status(" * Fuzzing response for PASV, payload length #{@fuzzdata.length}")
226:	        send_response(c,arg,"PASV",code," Entering Passive Mode (#{@fuzzdata},1,1,1,1,1)\r\n")

ERROR


Here is a relevant code snippet related to the "ERROR" error message:

238:	        c.put("425 Can't build data connection\r\n")
239:	        return
240:	      end
241:	      print_status(" - Data connection set up")
242:	      code = 150
243:	      if datastore['ERROR']
244:	        code = 550
245:	      end
246:	      c.put("#{code} Here comes the directory listing.\r\n")
247:	      code = 226
248:	      if datastore['ERROR']

ERROR


Here is a relevant code snippet related to the "ERROR" error message:

243:	      if datastore['ERROR']
244:	        code = 550
245:	      end
246:	      c.put("#{code} Here comes the directory listing.\r\n")
247:	      code = 226
248:	      if datastore['ERROR']
249:	        code = 550
250:	      end
251:	      c.put("#{code} Directory send ok.\r\n")
252:	      strfile = "passwords.txt"
253:	      strfolder = "Secret files"

ERROR


Here is a relevant code snippet related to the "ERROR" error message:

385:	    dofuzz = fuzz_this_cmd(cmd)
386:	    ## Fuzz this command ?  (excluding PASV, which is handled in the command handler)
387:	    if (dofuzz==1) && (cmd.upcase != "PASV")
388:	      paylen = @fuzzdata.length
389:	      print_status("* Fuzzing response for #{cmd.upcase}, payload length #{paylen}")
390:	      if datastore['ERROR']
391:	        code = "550 "
392:	      end
393:	      if cmd=="FEAT"
394:	        @fuzzdata = "211-Features:\r\n "+@fuzzdata+"\r\n211 End"
395:	      end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • corelanc0d3r <peter.ve[at]corelan.be>

Version


This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.