SNMP

What is SNMP?

Simple Network Management Protocol (SNMP) is a protocol used for network management. Over the years, SNMP has often been misunderstood by network administrators, leading to misconfigurations that can result in significant information leaks.

SNMP is based on UDP, a simple, stateless protocol, and is therefore susceptible to IP spoofing and replay attacks. Additionally, the commonly used SNMP protocols 1, 2, and 2c offer no traffic encryption, meaning that SNMP information and credentials can be easily intercepted over a local network. Traditional SNMP protocols also have weak authentication schemes and are commonly left configured with default public and private community strings.


Key Points

Ports

  • SNMP: UDP 161

SNMP Versions

  • SNMPv1, v2, v2c: No encryption, weak authentication

  • SNMPv3: Provides authentication and encryption

    • Older implementations: DES-56 (weak, easily brute-forced)

    • Recent implementations: AES-256

Security Concerns

  • Default community strings (public/private)

  • No encryption in v1/v2/v2c

  • Information leakage through MIB tree

  • Can reveal configuration files on enterprise routing hardware


SNMP MIB Tree

The SNMP Management Information Base (MIB) is a database containing information usually related to network management. The database is organized like a tree, with branches that represent different organizations or network functions. The leaves of the tree (or final endpoints) correspond to specific variable values that can then be accessed and probed by an external user.

Windows SNMP MIB Values

OID
Description

1.3.6.1.2.1.25.1.6.0

System Processes

1.3.6.1.2.1.25.4.2.1.2

Running Programs

1.3.6.1.2.1.25.4.2.1.4

Processes Path

1.3.6.1.2.1.25.2.3.1.4

Storage Units

1.3.6.1.2.1.25.6.3.1.2

Software Name

1.3.6.1.4.1.77.1.2.25

User Accounts

1.3.6.1.2.1.6.13.1.3

TCP Local Ports


SNMP Enumeration

Using Nmap

  • Find hosts with SNMP

Using 'onesixtyone'

Brute force community strings against a list of IP addresses

  • Prepare community strings and IP list

  • Run the scan

Using 'snmpwalk'

Query SNMP values using the read-only community string

  • Default (Enumerate entire MIB tree)

With options

  • Enumerate Windows users

  • Enumerate running processes

  • Enumerate installed software

  • Enumerate open TCP port

Last updated

Was this helpful?