Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

SNMP | 161

Simple Network Management Protocol is a protocol used to monitor and manage devices on IP networks (routers, switches, servers, printers, etc.)

SNMPv1 and SNMPv2c are insecure due to plaintext community strings, so use strong, non-default strings and restrict access to trusted IPs, especially in production, while SNMPv3 offers secure authentication and encryption but is more complex to configure; always limit sensitive data exposure through configs (e.g., /etc/snmp/snmpd.conf on Linux) and firewall rules (UDP 161/162), noting that Windows requires manual SNMP service installation, and Linux logs are in /var/log/snmpd.log

01. Set Up SNMP Service

  • Windows

## ------------------| Install
Add-WindowsCapability -Online -Name "SNMP.Client~~~~0.0.1.0"     ## Windows 10/11 (Run as Administrator)
Install-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -Verbose    ## Windows Server 2016/2019/2022 (Run as Administrator)

## ------------------| Configure SNMP Service
### Configure via Registry
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" /v public /t REG_DWORD /d 4
### Configure via GUI
##### 1. Open Services (services.msc), find "SNMP Service", and set to Automatic
##### 2. Right-click SNMP Service > Properties > Security Tab
#####     - Add Community String (e.g., "public", Read-Only)
#####     - Set "Accept SNMP packets from these hosts" (e.g., SNMP Manager IP)
### Allow SNMP through Firewall
netsh advfirewall firewall add rule name="Allow SNMP" dir=in action=allow protocol=UDP localport=161
Restart-Service -Name SNMP        ### Restart SNMP Service
Get-Service -Name SNMP            ### Verify SNMP Service
  • Linux

02. Enumerations

  • Nmap

  • Community Strings Brute-force

  • Basic Enum

  • SNMP OIDs (Object Identifiers)

Last updated