138 Chapter 6 ■ Enumeration of Services
SNMPv2 This version introduced new management functions as well as security features
that were not included in the initial version. By design this version of the protocol is back-
wards compatible with SNMPv1.
SNMPv3 This is the latest version of the protocol; it places increased emphasis on the
area of security. The security of SNMPv3 is focused on two areas:
Authentication is used to ensure that traps are read by only the intended recipient.
Privacy encrypts the payload of the SNMP message to ensure that it cannot be
read by unauthorized users.
SNMP is an application layer protocol that functions using UDP. The protocol works
across platforms, meaning it can be accessed on most modern operating systems including
Windows, Linux, and Unix. The main requirement for SNMP is that the network is run-
ning the TCP/IP protocol.
SNMP enumeration for the ethical hacker consists of leveraging the weaknesses in the
protocol to reveal user accounts and devices on a target running the protocol. To under-
stand how this is possible, let’s delve into some components of the SNMP system. In the
SNMP system two components are running: the SNMP agent and the SNMP management
station. The agent is located on the device to be managed or monitored, whereas the man-
agement station communicates with the agent itself.
Most modern enterprise-level infrastructure equipment such as routers
and switches contain an SNMP agent built into the system.
The system works through the use of the agent and the management station like so:
- The SNMP management station sends a request to the agent.
- The agent receives the request and sends back a reply.
The messages sent back and forth function by setting or reading variables on a device.
Additionally the agents use traps to let the management station know if anything has
occurred, such as failure or reboot, that needs to be addressed.
Management Information Base
Management Information Base (MIB) is a database that contains descriptions of the net-
work objects that can be managed through SNMP. MIB is the collection of hierarchically
organized information. It provides a standard representation of the SNMP agent’s informa-
tion and storage. MIB elements are recognized using object identifiers. The object identifier
(OID) is the numeric name given to the object and begins with the root of the MIB tree.
It can uniquely identify the object present in the MIB hierarchy.
MIB-managed objects include scalar objects that define a single object instance and
tabular objects that define groups of related object instances. The object identifiers include
the object’s type, such as counter, string, or address; access level such as read or read/write;
size restrictions; and range information. MIB is used as a codebook by the SNMP manager
for converting the OID numbers into a human-readable display.