SNMP Set Module - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/snmp/snmp_set metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: SNMP Set Module
Module: auxiliary/scanner/snmp/snmp_set
Source code: modules/auxiliary/scanner/snmp/snmp_set.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 161
List of CVEs: -
This module, similar to snmpset tool, uses the SNMP SET request to set information on a network entity. A OID (numeric notation) and a value are required. Target device must permit write access.
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/snmp/snmp_set
msf auxiliary(snmp_set) > show options
... show and set options ...
msf auxiliary(snmp_set) > set RHOSTS ip-range
msf auxiliary(snmp_set) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(snmp_set) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(snmp_set) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(snmp_set) > set RHOSTS file:/tmp/ip_list.txt
Required Options
RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
OID: The object identifier (numeric notation)
OIDVALUE: The value to set
Go back to menu.
Msfconsole Usage
Here is how the scanner/snmp/snmp_set auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/snmp/snmp_set
msf6 auxiliary(scanner/snmp/snmp_set) > show info
Name: SNMP Set Module
Module: auxiliary/scanner/snmp/snmp_set
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Matteo Cantoni <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
COMMUNITY public yes SNMP Community String
OID yes The object identifier (numeric notation)
OIDVALUE yes The value to set
RETRIES 1 yes SNMP Retries
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 161 yes The target port (UDP)
THREADS 1 yes The number of concurrent threads (max one per host)
TIMEOUT 1 yes SNMP Timeout
VERSION 1 yes SNMP Version <1/2c>
Description:
This module, similar to snmpset tool, uses the SNMP SET request to
set information on a network entity. A OID (numeric notation) and a
value are required. Target device must permit write access.
References:
http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol
http://www.net-snmp.org/docs/man/snmpset.html
http://www.oid-info.com/
Module Options
This is a complete list of options available in the scanner/snmp/snmp_set auxiliary module:
msf6 auxiliary(scanner/snmp/snmp_set) > show options
Module options (auxiliary/scanner/snmp/snmp_set):
Name Current Setting Required Description
---- --------------- -------- -----------
COMMUNITY public yes SNMP Community String
OID yes The object identifier (numeric notation)
OIDVALUE yes The value to set
RETRIES 1 yes SNMP Retries
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 161 yes The target port (UDP)
THREADS 1 yes The number of concurrent threads (max one per host)
TIMEOUT 1 yes SNMP Timeout
VERSION 1 yes SNMP Version <1/2c>
Advanced Options
Here is a complete list of advanced options supported by the scanner/snmp/snmp_set auxiliary module:
msf6 auxiliary(scanner/snmp/snmp_set) > show advanced
Module advanced options (auxiliary/scanner/snmp/snmp_set):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
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/snmp/snmp_set module can do:
msf6 auxiliary(scanner/snmp/snmp_set) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/snmp/snmp_set auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/snmp/snmp_set) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
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> - OID not writable or does not provide WRITE access with community '<COMM>'
Here is a relevant code snippet related to the "<IP> - OID not writable or does not provide WRITE access with community '<COMM>'" error message:
69: end
70:
71: print_status("Check new value : OID #{oid} => #{check}")
72:
73: else
74: print_status("#{ip} - OID not writable or does not provide WRITE access with community '#{comm}'")
75: end
76:
77: rescue ::SNMP::RequestTimeout
78: print_error("#{ip} - SNMP request timeout with community '#{comm}'.")
79: rescue ::Rex::ConnectionError
<IP> - SNMP request timeout with community '<COMM>'.
Here is a relevant code snippet related to the "<IP> - SNMP request timeout with community '<COMM>'." error message:
73: else
74: print_status("#{ip} - OID not writable or does not provide WRITE access with community '#{comm}'")
75: end
76:
77: rescue ::SNMP::RequestTimeout
78: print_error("#{ip} - SNMP request timeout with community '#{comm}'.")
79: rescue ::Rex::ConnectionError
80: print_error("#{ip} - 'Connection Refused'")
81: rescue SNMP::UnsupportedVersion
82: print_error("#{ip} - Unsupported SNMP version specified. Select from '1' or '2c'.")
83: rescue ::Interrupt
<IP> - 'Connection Refused'
Here is a relevant code snippet related to the "<IP> - 'Connection Refused'" error message:
75: end
76:
77: rescue ::SNMP::RequestTimeout
78: print_error("#{ip} - SNMP request timeout with community '#{comm}'.")
79: rescue ::Rex::ConnectionError
80: print_error("#{ip} - 'Connection Refused'")
81: rescue SNMP::UnsupportedVersion
82: print_error("#{ip} - Unsupported SNMP version specified. Select from '1' or '2c'.")
83: rescue ::Interrupt
84: raise $!
85: rescue ::Exception => e
<IP> - Unsupported SNMP version specified. Select from '1' or '2c'.
Here is a relevant code snippet related to the "<IP> - Unsupported SNMP version specified. Select from '1' or '2c'." error message:
77: rescue ::SNMP::RequestTimeout
78: print_error("#{ip} - SNMP request timeout with community '#{comm}'.")
79: rescue ::Rex::ConnectionError
80: print_error("#{ip} - 'Connection Refused'")
81: rescue SNMP::UnsupportedVersion
82: print_error("#{ip} - Unsupported SNMP version specified. Select from '1' or '2c'.")
83: rescue ::Interrupt
84: raise $!
85: rescue ::Exception => e
86: print_error("#{ip} Error: #{e.class} #{e} #{e.backtrace}")
87: ensure
<IP> Error: <E.CLASS> <E> <E.BACKTRACE>
Here is a relevant code snippet related to the "<IP> Error: <E.CLASS> <E> <E.BACKTRACE>" error message:
81: rescue SNMP::UnsupportedVersion
82: print_error("#{ip} - Unsupported SNMP version specified. Select from '1' or '2c'.")
83: rescue ::Interrupt
84: raise $!
85: rescue ::Exception => e
86: print_error("#{ip} Error: #{e.class} #{e} #{e.backtrace}")
87: ensure
88: disconnect_snmp
89: end
90: end
91: end
Go back to menu.
Related Pull Requests
- #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
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #2525 Merged Pull Request: Change module boilerplate
- #1228 Merged Pull Request: MSFTIDY cleanup #1 - auxiliary
- #1092 Merged Pull Request: Make error handling consistent in SNMP modules
References
- CVE: Not available
- http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol
- http://www.net-snmp.org/docs/man/snmpset.html
- http://www.oid-info.com/
See Also
Check also the following modules related to this module:
- auxiliary/scanner/snmp/snmp_enum
- auxiliary/scanner/snmp/snmp_enum_hp_laserjet
- auxiliary/scanner/snmp/snmp_enumshares
- auxiliary/scanner/snmp/snmp_enumusers
- auxiliary/scanner/snmp/snmp_login
- auxiliary/scanner/snmp/aix_version
- auxiliary/scanner/snmp/arris_dg950
- auxiliary/scanner/snmp/brocade_enumhash
- auxiliary/scanner/snmp/cisco_config_tftp
- auxiliary/scanner/snmp/cisco_upload_file
- auxiliary/scanner/snmp/cnpilot_r_snmp_loot
- auxiliary/scanner/snmp/epmp1000_snmp_loot
- auxiliary/scanner/snmp/netopia_enum
- auxiliary/scanner/snmp/sbg6580_enum
- auxiliary/scanner/snmp/ubee_ddw3611
- auxiliary/scanner/snmp/xerox_workcentre_enumusers
- exploit/linux/snmp/awind_snmp_exec
- exploit/linux/snmp/net_snmpd_rw_access
- exploit/linux/http/nagios_xi_snmptrap_authenticated_rce
- exploit/windows/http/hp_nnm_ovwebsnmpsrv_main
- exploit/windows/http/hp_nnm_ovwebsnmpsrv_ovutil
- exploit/windows/http/hp_nnm_ovwebsnmpsrv_uro
- exploit/windows/http/hp_nnm_snmp
- exploit/windows/http/hp_nnm_snmpviewer_actapp
- post/windows/gather/enum_snmp
- auxiliary/scanner/http/bmc_trackit_passwd_reset
- auxiliary/scanner/http/epmp1000_reset_pass
- auxiliary/scanner/http/zenworks_assetmanagement_fileaccess
- auxiliary/scanner/http/zenworks_assetmanagement_getconfig
- auxiliary/scanner/ntp/ntp_unsettrap_dos
Authors
Matteo Cantoni <goony[at]nothink.org>
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.