SNMP
SNMP
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
Overview and History of the TCP/IP Internet Standard Management Framework and
Simple Network Management Protocol (SNMP)
An adage from the world of professional sports says that a baseball umpire is doing a good
job when you forget that he is there. In many ways, the same could be said of a network
administrator. The administrator is doing a good job when the network is running so
smoothly and efficiently that users forget that the administrator exists. Because as the
administrator knows all too well, the second there is a problem, the users will all remember
that he or she is there very quickly.
This means that a primary job of a network administrator is to keep tabs on the network and
ensure that it is operating normally. Information about the hardware and software on the
network is a key to performing this task properly. When networks were small, an
administrator could stay informed about the status of hardware and software using simple
means, such as physically walking over to a computer and using it, or using a low-level link
layer management protocol.
This is simply not possible with modern internetworks, which are large, geographically
diverse, and often consist of many different lower-layer technologies. Usually, the only thing
all the devices on the network have in common is an implementation of a particular
internetworking protocol suite, such as TCP/IP. This makes the internetwork itself a logical
way to facilitate the communication of network management information between devices
and a network administrator.
Many people recognized during the early days of the Internet that some sort of network
management technology would be needed for TCP/IP. Unfortunately, at first there was no
single standard—in the 1980s, several different technologies were developed by different
working groups. There were three main contestants: the High-level Entity Management
System (HEMS) / High-level Entity Management Protocol (HEMP) as defined by RFCs
1021 through 1024; the Simple Gateway Monitoring Protocol (SGMP), defined by RFC
1028; and the Common Management Information Protocol (CMIP), which is actually part of
the OSI protocol suite.
The Internet Engineering Task Force (IETF) recognized the importance of having a unifying
management standard for TCP/IP, and in 1988 published RFC 1052, IAB
Recommendations for the Development of Internet Network Management Standards. This
memo is not a standard, but more of a statement of intention and documentation of a
meeting held on this subject. The conclusion of RFC 1052 was that SGMP be used as the
basis of a new Internet standard to be called the Simple Network Management Protocol
(SNMP). This development was to be carried out by the SNMP Working Group.
At a lower level, SNMP does indeed refer specifically to the actual protocol that carries
network management information between devices. This is in fact what most people think
of when they talk about “SNMP”. However, as defined by the SNMP working group, the
TCP/IP network management solution as a whole consists of a number of different
elements arranged in an architecture.
This architecture originally had no specific name, but is now called the Internet Standard
Management Framework. Oddly, this higher-level framework is not abbreviated “ISMF” or
anything like that; it is also called “SNMP”, which means that context is important in
understanding that term.
Note: To avoid confusion, I will often use the phrases “SNMP Framework” and “SNMP
Protocol” to differentiate these two uses of the term “SNMP”.
The word “Simple” in “Simple Network Management Protocol” is another sore spot for me;
having researched and written about this technology, I now consider the presence of this
term in the name “SNMP” to be almost a taunt. Let's put it this way: if a brain surgeon tells
you that something is a “simple procedure”, you probably know to take that with a grain of
salt—well, the same applies here. Even in its first iteration it was only somewhat simple; the
most current version of SNMP is fairly complicated indeed, with many different standards
defining the SNMP Framework, the SNMP Protocol itself, and a number of supporting
elements.
So why is it called “simple”? Well, as they say, everything's relative; SNMP is “simple” when
compared to other protocols that are even more complex. Some of this can be seen by
looking at the basic goals of the Internet Standard Management Framework and the SNMP
protocol as a whole:
o SNMP defines a universal way that management information can be easily defined
for any object and then exchanged between that object and a device designed to
facilitate network management;
o The actual SNMP protocol is fairly simple, consisting of only a few easy-to-
understand protocol operations;
Key Concept: The Simple Network Management Protocol (SNMP) defines a set of
technologies that allows network administrators to remotely monitor and manage
TCP/IP network devices. The term “SNMP” refers both to a specific communication
protocol (sometimes called the SNMP Protocol) and an overall framework for Internet
management (the SNMP Framework).
The description above provides the history of how the first version of SNMP was
developed, leading to the publishing of the first Internet Standard Management Framework
in 1988; this is now called SNMP version 1 (SNMPv1). This initial version of SNMP
achieved widespread acceptance, and it is still probably the most common version of
SNMP.
Much of the history of SNMP since that time has been a rather confusing “standards
nightmare”. SNMPv1 had a number of weaknesses, particularly in the area of security. For
this reason, shortly after SNMPv1 was done, work began on a new version of SNMP.
Unfortunately, this effort became a quagmire, with many competing variations of SNMPv2
being created. After many years of confusion, none of the SNMPv2 variants achieved
significant success.
Recently, a third version of the SNMP Framework and Protocol has been published, which
adds new features and “reunites” SNMP back under a single universal protocol again. The
topics on SNMP versions and SNMP standards later in this section further explore the
history of SNMP since 1988; they can be considered a continuation of this topic, as they
help clarify the very confusing story behind SNMP versions over the last decade and a half.
This overview may have put more questions in your mind about the Internet Standard
Management Framework and SNMP than it answered. This is part of why I said this stuff
isn't really that simple. The next two topics in this section provide more information
about the Framework and its components, and what those components do, so you can
understand better what the Framework is all about.
4
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
Since its creation in 1988 as a short-term solution to manage elements in the growing
Internet and other attached networks, SNMP has achieved widespread acceptance. SNMP
was derived from its predecessor SGMP (Simple Gateway Management Protocol) and was
intended to be replaced by a solution based on the CMIS/CMIP (Common Management
Information Service/Protocol) architecture. This long-term solution, however, never received
the widespread acceptance of SNMP.
SNMP uses five basic messages (GET, GET-NEXT, GET-RESPONSE, SET, and TRAP) to
communicate between the manager and the agent. The GET and GET-NEXT messages
allow the manager to request information for a specific variable. The agent, upon receiving
a GET or GET-NEXT message, will issue a GET-RESPONSE message to the manager
with either the information requested or an error indication as to why the request cannot be
processed. A SET message allows the manager to request a change be made to the value
of a specific variable in the case of an alarm remote that will operate a relay. The agent will
then respond with a GET-RESPONSE message indicating the change has been made or
an error indication as to why the change cannot be made. The TRAP message allows the
agent to spontaneously inform the manager of an �important� event.
As you can see, most of the messages (GET, GET-NEXT, and SET) are only issued by the
SNMP manager. Because the TRAP message is the only message capable of being
initiated by an agent, it is the message used by DPS Remote Telemetry Units (RTUs) to
report alarms. This notifies the SNMP manager as soon as an alarm condition occurs,
instead of waiting for the SNMP manager to ask.
The small number of commands used is only one of the reasons SNMP is "simple." The
other simplifying factor is its reliance on an unsupervised or connectionless communication
link. This simplicity has led directly to its widespread use, specifically in the Internet
Network Management Framework. Within this framework, it is considered �robust�
because of the independence of the managers from the agents, e.g. if an agent fails, the
5
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
manager will continue to function, or vice versa. The unsupervised communication link
does however create some interesting issues for network alarm monitoring we will discuss
more thoroughly in a later issue of our tutorial.
top
Each SNMP element manages specific objects with each object having specific
characteristics. Each object /
characteristic has a unique object
identifier (OID) consisting of numbers
separated by decimal points (i.e.,
1.3.6.1.4.1.2682.1). These object
identifiers naturally form a tree as
shown below. The MIB associates
each OID with a readable label (i.e.,
dpsRTUAState) and various other
parameters related to the object. The
MIB then serves as a data dictionary or
code book that is used to assemble
and interpret SNMP messages.
When an element sends a TRAP packet, it can include OID and value information
(bindings) to clarify the event. DPS remote units send a comprehensive set of bindings with
each TRAP to maintain traditional telemetry event visibility. Well-designed SNMP managers
can use the bindings to correlate and manage the events. SNMP managers will also
generally display the readable labels to facilitate user understanding and decision-making.
top
This part of our tutorial on the Simple Network Management Protocol (SNMP) examines the
communication between managers and agents. Basic serial telemetry protocols, like TBOS,
are byte oriented with a single byte exchanged to communicate. Expanded serial telemetry
protocols, like TABS, are packet oriented with packets of bytes exchanged to communicate.
6
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
The packets contain header, data and checksum bytes. SNMP is also packet oriented with
the following SNMP v1 packets (Protocol Data Units or PDUs) used to communicate:
1. Get
2. GetNext
3. Set
4. Trap
The manager sends a Get or GetNext to read a variable or variables and the agent's
response contains the requested information if managed. The manager sends a Set to
change a variable or variables and the agent's response confirms the change if allowed.
The agent sends a Trap when a specific event occurs.
The image below shows the packet formats. Each variable binding contains an identifier, a
type and a value (if a Set or response). The agent checks each identifier against its MIB to
determine whether the object is managed and changeable (if processing a Set). The
manager uses its MIB to display the readable name of the variable and sometimes interpret
its value.
top
In this fourth article in our series, we continue to examine the Simple Network Management
Protocol (SNMP) focusing specifically on the layered communication model used to
exchange information. Our last article focused on the structure of SNMP messages,
however an SNMP message is not sent by itself. It is wrapped in the User Datagram
Protocol (UDP), which in turn is wrapped in the Internet Protocol (IP). These are commonly
referred to as layers and are based on a four-layer model developed by the Department of
Defense (you may recall the DoD origins of the
Internet). Understanding this layered
model makes it easier to
SNMP resides in what is called the Application layer, troubleshoot communication
UDP resides in the Transport layer and IP resides in problems. When there is a
the Internet layer (somewhat obvious). The fourth problem, you can simply trace it
down...
7
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
layer is the Network Interface layer where the assembled packet is actually interfaced to
some kind of transport media (i.e., twisted pair copper, RG58 co-axial or fiber). While this
multi-layer model may seem a bit confusing, it effectively isolates the tasks of
communication and ultimately assists in designing and implementing a network.
To illustrate the function of this layered model, let's look at a single SNMP GET request
from the agent's perspective. The SNMP manager wants to know what the Agent's System
Name is and prepares a GET message for the appropriate OID. It then passes the
message to the UDP layer. The UDP layer adds a data block that identifies the manager
port to which the response packet should be sent and the port on which it expects the
SNMP agent to be listening for messages. The packet thus formed is then passed to the IP
layer. Here a data block containing the IP and Media Access addresses of the manager and
the agent is added before the entire assembled packet gets passed to the Network
Interface layer. The Network Interface layer verifies media access and availability and
places the packet on the media for transport.
After working its way across bridges and through routers (the modern equivalent of over the
rivers and through the woods) based on the IP information, the packet finally arrives at the
agent. Here it passes through the same four layers in exactly the opposite order as it did at
the manager. First, it is pulled off the media by the Network Interface layer. After confirming
that the packet is intact and valid, the Network Interface layer simply passes it to the IP
layer. The IP layer verifies the Media Access and IP address and passes it on to the UDP
layer where the target port is checked for connected applications. If an application is
listening at the target port, the packet is passed to the Application layer. If the listening
application is the SNMP agent, the GET request is processed as we have discussed in
previous articles. The agent response then follows the identical path in reverse to reach the
manager.
SNMP Tutorial Part 5: Common Mistakes Made When Integrating SNMP and Non-
SNMP Systems ... and How You Can Avoid Them
top
SNMP is a standard protocol that has wide acceptance in the industry and is flexible
enough to describe almost anything. Because of these advantages, many network
managers have come to believe that SNMP should be used for all network monitoring
applications.
SNMP certainly has its place in an effective telecom network management solution, but this
doesn't mean that any off-the-shelf SNMP manager can provide adequate visibility and
control of your network.
The typical off-the-shelf SNMP manager is not designed for displaying and processing
telemetry data for effective network monitoring, especially for the kind of real-world
monitoring tasks network managers most need performed. These capabilities can be added
to an SNMP manager, but it usually requires substantial custom software development.
Before you buy … make sure you avoid these 7 common mistakes
There are seven common mistakes network managers typically make when integrating
SNMP and non-SNMP monitoring. Your SNMP implementation will be successfully only if
you can avoid them.
It is true that many, but not all, of these functions can be added to standard SNMP
managers, but implementing network alarm monitoring in a basic SNMP manager usually
involves a substantial amount of custom software module development. Even when pre-
built software modules are available, they usually require custom tweaking to perform
exactly as you want them to.
10
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
The need for extensive customization eliminates the advantage of using a simple open
standard, and it is difficult to justify significant development costs after purchasing an
already expensive SNMP manager. Why take the time, trouble, and expense to recreate
capabilities that are already present in a high-quality, SNMP-capable network alarm
management system?
Relying on an SNMP manager for critical network monitoring just doesn't take into account
the tons of legacy and non-SNMP equipment that is functioning perfectly fine out in
networks all over the world. The role of an SNMP manager is best used for inventorying
network devices and drilling down into equipment details after your network monitoring
system notifies you of a problem.
SNMP can be an effective tool, but it's only one item in your network alarm monitoring
toolkit, and it can be used more effectively when it is part of a total network monitoring
solution.
If you are looking to avoid these 7 mistakes, then the T/Mon network alarm monitoring
system is for you. It is specifically designed to avoid them. Network managers who rely on
T/Mon for their network alarm monitoring, notification, and control comment, “Looking at
one map and knowing it represents every piece of equipment you’re monitoring in the
field… that’s pretty good peace of mind."
Since it was developed in 1988, the Simple Network Managment Protocol has become the de facto
standard for internetwork managment. Because it is a simple solution, requiring little code to
implement, vendors can easily build SNMP agents to their products. SNMP is extensible, allowing
vendors to easily add network managment functions to their existing products. SNMP also separates
the managment architecture from the architecture of the hardware devices, which broadens the base
of multivendor support. Perhaps most important, unlike other so-called standards,SNMP is not a
mere paper specification, but an implementation that is widely available today.
Network managment system contains two primary elements: a manager and agents. The Manager is
the console through which the network administrator performs network managment functions.
Agents are the entities that interface to the actual device being managed. Bridges, Hubs, Routers or
network servers are examples of managed devices that contain managed objects. These managed
objects might be hardware, configuration parameters, performance statistics, and so on, that directly
relate to the current operation of the device in question. These objects are arranged in what is known
as a virtual information database ,called a managment information base, also called MIB. SNMP
allows managers and agents to communicate for the purpose of accessing these objects.
Some prominent vendors offer network managment platforms which implement the role of the
manager (listed in alphabetic order) :
In the Manager/Agent paradigm for network managment, managed network objects must be
logically accessible. Logical accessibility means that managment information must be stored
somewhere, and therefore, that the information must be retrievable and modifiable. SNMP actually
performs the retrieval and modification. The Structure of Managment Information (SMI) which is
given in RFC 1155, is based on the OSI SMI given in Draft proposal 2684.
The SMI organizes, names, and describes information so that logical access can occur. The SMI
states that each managed object must have a name, a syntax and an encoding. The name, an object
identifier(OID), uniquely identifies the object. The syntax defines the data type,such as an integer or
a string of octets. The encoding describes how the information associated with the managed objects
is serialized for transmission between machines.
The syntax used for SNMP is the Abstract Syntax Notation One, ASN.1. The encoding used for
SNMP is the Basic Encoding Rules, BER. The names used are object identifiers. later we will see
how the MIB uses these names.
ASN.1 is used to specify many RFCs (and not just the SMI), for example the Internet standard MIB
and SNMP. ASN.1 is used widely in OSI for specification purposes. ASN.1 used for defining SMI
and MIBs is a subset of the ASN language given by OSI. ASN.1 does specify in itself
Managment information bases (MIBs) are a collection of definitions, which define the properties of
the managed object within the device to be managed. Every managed device keeps a database of
values for each of the definitions written in the MIB. It is not the actual database itself - it is
implementation dependant. Definition of the MIB conforms to the SMI given in RFC 1155. Latest
Internet MIB is given in RFC 1213 sometimes called the MIB-II. Click here to see MIB architecture.
You can think of a MIB as an information warehouse
Naming an Object
Object identifiers
• For SNMP it is the Internet sub-tree for constructing OIDs for SNMP manageable agents
SNMP Protocol
SNMP is based on the manager/agent model.SNMP is referred to as "simple" because the agent
requires minimal software.Most of the processing power and the data storage resides on the
managment system, while a complementary subset of those functions resides in the managed system.
To achieve its goal of being simple,SNMP includes a limited set of managment commands and
responses. The managment system issues Get, GetNext and Set messages to retrieve single or
multiple object variables or to establish the value of a single variable. The managed agent sends a
Response message to complete the Get, GetNext or Set. The managed agent sends an event
notification, called a trap to the managment system to identify the occurrence of conditions such as
threshold that exceeds a predetermined value. In short there are only five primitive operations:
• Version Number
• Community Name - kind of a password
• One or more SNMP PDUs - assuming trivial authentication
17
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
Each SNMP PDU except trap has the following format:
Authentication
Authorisation
o Once community name is validated then agent or manager checks to see if sending
address is permitted or has the rights for the requested operation
o "View" or "Cut" of the objects together with permitted access rights is then derived
for that pair (community name, sending address)
Summary
SNMP assumes that the communication path is a connectionless communication subnetwork.In other
words, no prearranged communication path is established prior to the transmission of data.As a
result , SNMP makes no guarantees about the reliable delivery of the data.although in practice most
messages get through , and those that don't can be retransmitted. The primary protocols that SNMP
implements are the User Datagram Protocol (UDP) and the Internet Protocol (IP).SNMP also
requires Data Link Layer protocols such as Ethernet or TokenRing to implement the communication
channel from the managment to the managed agent.
SNMP's simplicity and connectionless communication also produce a degree of robustness. Neither
the manager nor the agent relies on the other for its operation.Thus, a manager may continue to
function even if a remote agent fails. When the agent resumes functioning , it can send a trap to the
manager, notifying it of its change in operational status. The connectionless nature of SNMP leaves
the recovery and error detection up to the NMS(Network Managment Station) and even up to the
agent. However keep in mind that SNMP is actually transport independent (although original design
was connectionless transport function, which corresponds to the UDP protocol) and can be
implemented on other transports as well:
UDP Transport
1. What is SNMP?
The Simple Network Management Protocol (SNMP) is the most popular protocol in use to
manage networked devices. SNMP was designed in the late 80's to facilitate the
exchange of management information between networked devices, operating at the
application layer of the ISO/OSI model. The SNMP protocol enables network and system
administrators to remotely monitor and configure devices on the network (devices such
as switches and routers). Software and firmware products designed for networks often
make use of the SNMP protocol. Support for SNMP is available on a multitude of
systems, including, but not limited to,
• Core Network Devices (Routers, Switches, Hubs, Bridges, and Wireless Network
Access Points)
• Operating systems (on nearly all architectures)
• Consumer Broadband Network Devices (Cable Modems and DSL Modems)
• Consumer Electronic Devices (Cameras and Image Scanners)
• Networked Office Equipment (Printers, Copiers, and FAX Machines)
23
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
• Network and Systems Management/Diagnostic Frameworks (Network Sniffers and
Network Analyzers)
• Uninterruptible Power Supplies (UPS)
• Networked Medical Equipment (Imaging Units and Oscilloscopes)
• Manufacturing and Processing Equipment
2. How is SNMP vulnerable?
The vulnerabilities affect both manager and agent software (see "What are managers
and agents?" for an explanation of these terms). Vulnerabilities in both managers and
agents include denial-of-service conditions, format string vulnerabilities, and buffer
overflows. Some of the vulnerabilities do not require the malicious packet to use the
proper community string (see "What is a community string and how is it used?").
Several of the more serious vulnerabilities allow the execution of arbitrary code by a
remote unauthenticated attacker. Refer to CERT advisory CA-2002-03
(http://www.cert.org/advisories/CA-2002-03.html) for a detailed description of the
vulnerabilities.
Because of the relatively large number of products that support SNMP, it is unlikely that
our list of affected products is comprehensive. Therefore, if you use products that
support SNMP, we encourage you to first refer to CERT advisory CA-2002-03
(http://www.cert.org/advisories/CA-2002-03.html) for a partial list of affected vendors
and products. If your vendor(s) are not listed you should contact them directly for more
information to ensure your system is protected.
A number of steps can be taken to improve the security of systems relying on SNMP:
Most home users are not directly affected by these vulnerabilities. However, home users
with more advanced configurations may be at risk. If you use one or more of the
following in your home system or network, additional steps might be necessary to
ensure protection:
Note that in many cases SNMP services are not enabled by default, so merely using one
or more of the products above does not mean that you are definitely vulnerable. Home
users with one or more of the above technologies in use on their home networks are
encouraged to refer to CERT advisory CA-2002-03 (http://www.cert.org/advisories/CA-
2002-03.html) for a partial list of affected vendors and products. If your vendors are not
listed you should contact them directly for more information to ensure your system is
protected.
SNMP is built around the concept of "managers" and "agents." Manager software
(commonly installed on a network management system) makes requests to agent
software running on a host or device to gather data on the operational status,
configuration, or performance statistics of that system (polling). Some agents allow
configuration parameters to be changed by managers, while others provide read-only
statistics and configuration information. Additionally, agents can generate ad hoc
messages to manager systems to inform them of unusual events (traps).
The current SNMPv1 standard is defined in the Internet Engineering Task Force (IETF)
STD0015 / RFC1157 (http://www.ietf.org/rfc/rfc1157.txt). There are also a number of
draft and proposed standards for SNMPv2 and SNMPv3. Refer to IETF STD0001 /
RFC3000 (http://www.ietf.org/rfc/rfc3000.txt) for the current status of the various
SNMP-related RFCs.
http://www.faqs.org/faqs/snmp-faq/part1/ and
http://www.faqs.org/faqs/snmp-faq/part2/
As of 9:25 EST (UTC-0500) February 12, 2002, we have received reports of scanning for
SNMP services related to these vulnerabilities and are working to verify. New incident
reports are being sent to the CERT/CC all the time, though, so you are encouraged to
refer to our Current Activity page (http://www.cert.org/current/current_activity.html) for
the latest information on incident trends.
14. I have detected scanning of my network or systems for SNMP. Should I report
that to the CERT/CC?
If you have detected scanning for SNMP services on your network, you should first
determine whether this scanning has led to a compromise or not. You may wish to refer
to our Intruder Detection Checklist
(http://www.cert.org/tech_tips/intruder_detection_checklist.html) for additional tips on
determining whether a compromise has occurred.
Once you are certain that no compromise has occurred and the impact was limited to
scanning only, you are encouraged to report this activity to the CERT/CC using our
Incident Reporting Form, available at http://www.cert.org/reporting/incident_form.txt.
Reporting scanning activity to the CERT/CC will help us better assist you, and allow us to
relate ongoing intruder activities. This also provides us a better overview of trends in
attack profiles and provides input for other CERT documents such as advisories and
summaries. We prefer that Incident Reporting Forms be sent to us via email to
[email protected].
As of 9:25 EST (UTC-0500) February 12, 2002, we have received reports of exploitation
of SNMP services related to these vulnerabilities and are working to verify them. New
incident reports are being sent to the CERT/CC all the time, though, so you are
26
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
encouraged to refer to our Current Activity page
(http://www.cert.org/current/current_activity.html) for the latest information on incident
trends.
If you suspect that your system may have been compromised, you may wish to refer to
our Intruder Detection Checklist
(http://www.cert.org/tech_tips/intruder_detection_checklist.html). Once you have
confirmed that a compromise has occurred, please refer to our Steps for Recovering
from a UNIX or NT System Compromise
(http://www.cert.org/tech_tips/root_compromise.html)
Please send the completed form to [email protected] with VU#617947 in the subject line.
18. Our company manufactures a product that uses SNMP, and we think it might be
vulnerable, but we are not sure. How can we get more information on these
vulnerabilities?
The CERT/CC encourages any vendors whose products are affected (whether vulnerable
or not) by these or any other security vulnerabilities to contact us so that we can
establish a working relationship on this and any future issues that may arise. If you are
authorized to represent your organization on this issue, please contact the CERT/CC via
our hotline at +1 412-268-7090. CERT/CC personnel answer 8:00 a.m.- 5:00 p.m.
EST(GMT-5) / EDT(GMT-4) on working days; they are on call for emergencies during
other hours and on weekends and holidays.
19. Our company manufactures a product that uses SNMP, and we know it to be
affected by these vulnerabilities, but we are not listed in any of your vendor
statements. How can we get added to your list of vendors?
27
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
The CERT/CC encourages any vendors whose products are affected (whether vulnerable
or not) by these or any other security vulnerabilities to contact us so that we can
establish a working relationship on this and any future issues that may arise. If you are
authorized to represent your organization on this issue, please contact the CERT/CC via
our hotline at +1 412-268-7090. CERT/CC personnel answer 8:00 a.m.- 5:00 p.m.
EST(GMT-5) / EDT(GMT-4) on working days; they are on call for emergencies during
other hours and on weekends and holidays.
20. Our company manufactures a product that uses SNMP, but we know it is not
affected by these vulnerabilities. Nonetheless, we are being swamped with
calls to our help desk about this issue. We are not currently listed in any of
your vendor statements, but we'd like to be. How can we get added to your list
of vendors?
The CERT/CC encourages any vendors whose products are affected (whether vulnerable
or not) by these or any other security vulnerabilities to contact us so that we can
establish a working relationship on this and any future issues that may arise. If you are
authorized to represent your organization on this issue, please contact the CERT/CC via
our hotline at +1 412-268-7090. CERT/CC personnel answer 8:00 a.m.- 5:00 p.m.
EST(GMT-5) / EDT(GMT-4) on working days; they are on call for emergencies during
other hours and on weekends and holidays.
The Oulu University Secure Programming Group (OUSPG) is an academic research group
located at Oulu University in Finland. The purpose of this research group is to test
software for vulnerabilities.
History has shown that the techniques used by the OUSPG have discovered a large
number of previously undetected problems in the products and protocols they have
tested. Earlier this year, the OUSPG produced a comprehensive test suite for evaluating
implementations of the Lightweight Directory Access Protocol (LDAP). This test suite was
developed with the strategy of abusing the protocol in unsupported and unexpected
ways, and it was very effective in uncovering a wide variety of vulnerabilities across
several products. This approach can reveal vulnerabilities that would not manifest
themselves under normal conditions.
So in brief:
- SNMPv2c updated the protocol operations
but left the administrative framework unchanged.
- SNMPv3 updated the administrative framework
but left the protocol operations unchanged.
Can I use SNMPv1 requests with an SNMPv2 MIB (or vice versa)?
29
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
------------------------------------------------------------
Yes.
http://www.simpleweb.org/
http://www.snmplink.org/
http://www.mibdepot.com/
ftp://rtfm.mit.edu/pub/usenet/comp.protocols.snmp/
Most of the tools (apart from 'snmptable') will work quite happily
without any MIB files at all - although the results won't be displayed
in quite the same way.
The same holds true for the agent - see the AGENT section for details.
There are two steps required to add a new MIB file to the tools.
Firstly, copy the MIB file into the appropiate location:
cp MY-MIB.txt /usr/local/share/snmp/mibs
(which makes it available to everyone on the system)
or
mkdir $HOME/.snmp
mkdir $HOME/.snmp/mibs
cp MY-MIB.txt $HOME/.snmp/mibs
(which makes it available to you only)
Note that the location of the shared MIB directory may be different
from that given here - particularly if you're working with a vendor
supplied distribution. See where the MIBs are currently installed,
and copy the new MIB to the same place.
export MIBS=+MY-MIB
(load it for this session only)
or
This will add the new MIB to the list of MIBs loaded by default.
Omitting the '+' will *replace* the list of MIBs to be loaded by
the specified (colon-separated) list - together with any MIBs that
they explicitly rely on.
Note that the value for this variable is the name of the MIB
module, *not* the name of the MIB file. These are typically the
same (apart from the .txt suffix), but if in doubt, check the contents
of the file. The value to use is the token immediately before the
word DEFINITIONS at the start of the file.
If you prefer to have the tools load all available MIBs (which
may slow them down), then set the MIBS environmental variable
(or the snmp.conf token "mibs") to the special value "ALL".
If this doesn't display a hex dump of the raw outgoing packet, then
it's the client side which is dropping the request. Hopefully you
should see some form of error message, to help identify what's wrong.
If this displays one or more outgoing dumps (but nothing coming back),
then the request is failing at the agent end. See the next entry for
more details.
If you see dumps of both the outgoing request, and a response, but
no results are displayed, then either there may be a problem with
decoding the response (in which case you should see an error message),
or the agent may simply not support the requested information (and the
32
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
response is being discarded as irrelevant).
Assuming that the agent is actually sending the request (see the
previous entry), there are two main likely causes for the agent not
to respond. Either it doesn't receive the request (e.g. it's being
blocked by a firewall or packet filtering), or it receives it, but
is unwilling (or unable) to process it.
If the remote system is running the Net-SNMP agent, then the easiest
way to check what's going wrong is to shut down the agent, and re-start
it using the options:
-f -Le -d
This will display raw dumps of packets seen (or sent) by the agent,
just as the '-d' flag did for the client side in the previous entry.
Restart the agent with these flags, and send the same query as before.
If the agent doesn't display anything in response to this request, then
it's probably some form of firewall settings, which are preventing the
agent from ever seeing the request.
If the agent displays a dump of the incoming request, but nothing going
out, then the most likely cause is access control settings. See the
relevant entries in the AGENT section for details.
The same basic causes could also affect other vendors' SNMP agents.
Please consult the relevant documentation for how to investigate and
address such problems.
The easiest way to test this is to try a GETNEXT request that ought
to return the entry of interest.
e.g.
snmpgetnext -v1 -c public localhost UCD-SNMP-MIB::versionTag
instead of
snmpget -v1 -c public localhost UCD-SNMP-MIB::versionTag.0
See the entries on access control in the AGENT section for how to
configure the Net-SNMP agent, or consult the agent's own documentation.
To walk the whole tree, and see *all* the information that the
agent supports, specify a starting point of '.iso' or '.1'.
To walk a specific enterprise subtree, specify the root of this tree
as the starting point - e.g:
To tell the difference between these two, try leaving the agent
undisturbed for a while, and then probe it using a single 'snmpget'
request, specifying a longer timeout (e.g. '-t 120'). If it now
responds, then something was probably sending requests (including
duplicate retries) faster than the agent could process them, and it
was building up a backlog. Try adjusting the timeout period and retry
frequency of these client requests, or look at improving the efficiency
of the implementation of the relevant MIB objects.
Firstly, make sure that you're asking for the object by the right name.
Object descriptors are case-sensitive, so asking for 'sysuptime' will
not be recognised, but 'sysUpTime' will.
35
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
Alternatively, the object may be defined in a MIB that hasn't been
loaded. Try loading in all the MIB files:
Note that this uses the name of the *module*, not the name of the file.
See the second entry in this section for the distinction. However,
if 'snmpwalk' displays the object by name, this is unlikely to be the
cause, and you should look closely at the exact object name you are using.
Assuming that you do have access to this object, the most likely
cause is forgetting the "instance subidentifier".
If you try walking the 'system' group, you should notice that all
of the results have a number after the MIB object name. This is
the "instance subidentifier" of that particular MIB instance.
For values from the sysORTable, this basically provides an index into
the table, and should be very familiar. But the other values in the
system group also have an instance number displayed. For non-table
objects ("scalars"), this instance subidentifier will always be '0',
and it *must* be included when making a GET request.
Why do I sometimes get "End of MIB" when walking a tree, and sometimes not?
--------------------------------------------------------------------------
This depends on which MIB modules are supported by the agent you are
querying and exactly what you're asking for.
Note that a tree is walked by repeatedly asking for "the next entry" until
all the values under that tree have been retrieved. However, the agent has
no idea that this is what's happening - all it sees is a request for "the
next entry after X".
If the object X happens to be the last entry in a sub-tree, the agent will
provide the next object supported (as requested) even though this will be
in a different subtree. It's up to the querying tool to recognise that
this last result lies outside the area of interest, and simply discard it.
But in either case, the actual information provided will be the same.
A fully secure request would also specify the privacy pass phrase:
If the AuthPassphrase and the PrivPassphrase are the same, then you
can use the single setting
defPassphrase "Open the Door and see me"
instead.
See the AGENT section for how to configure the agent for SNMPv3 access.
Of those objects that can in principle be changed, the agent may not
include the code necessary to support SET requests. (GET and GETNEXT
are much easier to handle - particularly for objects relating to the
internals of the underlying operating system).
Even if SET support has been implemented, the agent may not be configured
to allow write access to this object.
To change this, you will need to set up the agent's access control
configuration. See the AGENT section for more details.
Note that neither the community string "public" nor "private" can be
used to set variables in a typical default configuration.
Trying the same request using SNMPv2 or above is somewhat more informative:
rather than "this variable doesn't exist". It may be the case that it
doesn't exist at all. It may exist but you don't have access to it
(although someone else with different administrative credentials might do).
Or it may exist, but you simply can't perform that particular operation
(e.g. changing it).
Similarly, the SNMPv2 error 'notWritable' means "not writable in
this particular case" rather than "not writable under any circumstances".
If you are sure that the object is writable (and has been implemented
as such), then you probably need to look at the agent access control.
See the AGENT section for more details.
Assuming that the access control settings should allow this, another
possibility for the 'sysLocation' and 'sysContact' objects is that
you've got a configuration option in the 'snmpd.conf' file which
already sets the corresponding value there.
(This will also fail, since -1 isn't an acceptable value for this
particular object, but that's not the point here!)
Generating traps from within the agent is covered in the AGENT and
CODING sections.
snmptrapd -f -Lo
where 'page_me' and 'log_it' are the command to be run. (You probably
need to specify full pathnames, to ensure that the commands will be
41
Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP)
found. They're just short here for readability).
Note that the first entry uses the OID corresponding to the SNMPv1
'coldStart' trap. See the co-existence RFC (RFC 2576) for details
of mapping SNMPv1 traps to SNMPv2 OIDs.
My traphandler script doesn't work when run like this - why not?
---------------------------------------------------------------
The UCD software used a fixed size buffer of 1472 bytes to hold the
encoded packet, so all requests and responses had to fit within this.
The Net-SNMP releases handle packet buffers rather differently, and
are not subject to the same fixed restrictions.
There are a number of packages available that are designed for this
purpose. Two of the most widely used are MRTG (http://www.mrtg.org/)
and RRDtool (http://oss.oetiker.ch/rrdtool/). There are also several
frontends built on top of RRDtool, including Cacti (http://www.cacti.net/)
and Cricket (http://cricket.sourceforge.net/). There are details of
how to set up Cricket to monitor some of the UCD extensions at
http://www.afn.org/~jam/software/cricket/
Some of these (such as the MIB file location), might be best put in
a shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or
/etc/snmp/snmp.conf) to apply to all users of the system. Others
(particularly the SNMPv3 security settings), are more likely to refer
to a particular user, and should go in a personal snmp.conf file
(typically $HOME/.snmp/snmp.conf).
See 'snmpget -H' and/or the snmp.conf(5) man page for more details.
You can also use the "snmpconf" command to help you generate your
snmp.conf configuration file (just run it and answer its questions).