7. Security Considerations
This section highlights security considerations relevant to the protocols and procedures defined in this memo. Practices that contribute to secure, effective operation of the mechanisms defined here are described first. Constraints on implementation behavior that are necessary to the security of the system are presented next. Finally, an informal account of the contribution of each mechanism of the protocols to the required goals is presented.
7.1. Recommended Practices
This section describes practices that contribute to the secure, effective operation of the mechanisms defined in this memo.
-
A management station should discard SNMP responses for which neither the request-id component nor the represented management information corresponds to any currently outstanding request.
Although it would be typical for a management station to do this as a matter of course, in the context of these security protocols it is significant owing to the possibility of message duplication (malicious or otherwise).
-
A management station should not interpret an agent's lack of response to an authenticated SNMP management communication as a conclusive indication of agent or network failure.
It is possible for authentication failure traps to be lost or suppressed as a result of authentication clock skew or inconsistent notions of shared secrets. In order either to facilitate administration of such SNMP parties or to provide for continued management in times of network stress, a management station implementation may provide for arbitrary, artificial advancement of the timestamp or selection of shared secrets on locally generated messages.
-
The lifetime value for a SNMP party should be chosen (by the local administration) to be as small as possible, given the accuracy of clock devices available, relevant round-trip communications delays, and the frequency with which a responsible management station will be able to verify all clock values.
A large lifetime increases the vulnerability to malicious delays of SNMP messages. The implementation of a management station may, when explicitly authorized, provide for dynamic adjustment of the lifetime in order to accommodate changing network conditions.
-
When sending state altering messages to a managed agent, a management station should delay sending successive messages to the managed agent until a positive acknowledgement is received for the previous message or until the previous message expires.
When using the noAuth protocol, no message ordering is imposed by the SNMP. Messages may be received in any order relative to their time of generation and each will be processed in the ordered received. In contrast, the security protocols guarantee that received messages are ordered insofar as each received message must have been sent subsequent to the sending of a previously received message.
When an authenticated message is sent to a managed agent, it will be valid for a period of time that does not exceed lifetime under normal circumstances. During the period of time this message is valid, if the management station sends another authenticated message to the managed agent that is received and processed prior to the first message, the first message will be considered unauthentic when it is received by the managed agent.
Indeed, a management station must cope with the loss and re-ordering of messages resulting from anomalies in the network as a matter of course. A management station implementation may choose to prevent the loss of messages resulting from re-ordering when using the security protocols defined in this memo by delaying sending successive messages.
-
The frequency with which the secrets of a SNMP party should be changed is indirectly related to the frequency of their use.
Protecting the secrets from disclosure is critical to the overall security of the protocols. Frequent use of a secret provides a continued source of data that may be useful to a cryptanalyst in exploiting known or perceived weaknesses in an algorithm. Frequent changes to the secret avoid this vulnerability.
Changing a secret after each use is is generally regarded as the most secure practice, but a significant amount of overhead may be associated with that approach.
Note, too, in a local environment the threat of disclosure may be insignificant, and as such the changing of secrets may be less frequent. However, when public data networks are the communication paths, more caution is prudent.
-
In order to foster the greatest degree of security, a management station implementation must support constrained, pairwise sharing of secrets among SNMP entities as its default mode of operation.
Owing to the use of symmetric cryptography in the protocols defined here, the secrets associated with a particular SNMP party must be known to all other SNMP parties with which that party may wish to communicate. As the number of locations at which secrets are known and used increases, the likelihood of their disclosure also increases, as does the potential impact of that disclosure. Moreover, if the set of SNMP protocol entities with knowledge of a particular secret numbers more than two, data origin cannot be reliably authenticated because it is impossible to determine with any assurance which entity of that set may be the originator of a particular SNMP message. Thus, the greatest degree of security is afforded by configurations in which the secrets for each SNMP party are known to at most two protocol entities.
7.2. Conformance
A SNMP protocol entity implementation that claims conformance to this memo must satisfy the following requirements:
-
It must implement the noAuth and noPriv protocols whose object identifiers are defined in [4]. noAuth This protocol signifies that messages generated by a party using it are not protected as to origin or integrity. It is required to ensure that a party's authentication clock is always accessible. noPriv This protocol signifies that messages received by a party using it are not protected from disclosure. It is required to ensure that a party's authentication clock is always accessible.
-
It must implement the Digest Authentication Protocol in conjunction with the algorithm defined in Section 2.4.1.
-
It must include in its local database at least one SNMP party with the following parameters set as follows:
-
partyAuthProtocol is set to noAuth and
-
partyPrivProtocol is set to noPriv.
This party must have a MIB view [2] specified that includes at least the authentication clock of all other parties. Alternatively, the authentication clocks of the other parties may be partitioned among several similarly configured parties according to a local implementation convention.
- For each SNMP party about which it maintains information in a local database, an implementation must satisfy the following requirements:
-
(a) It must not allow a party's parameters to be set to a value inconsistent with its expected syntax. In particular, Section 2.4 specifies constraints for the chosen mechanisms.
-
(b) It must, to the maximal extent possible, prohibit read-access to the private authentication key and private encryption key under all circumstances except as required to generate and/or validate SNMP messages with respect to that party. This prohibition includes prevention of read-access by the entity's human operators.
-
(c) It must allow the party's authentication clock to be publicly accessible. The correct operation of the Digest Authentication Protocol requires that it be possible to determine this value at all times in order to guarantee that skewed authentication clocks can be resynchronized.
-
(d) It must prohibit alterations to its record of the authentication clock for that party independently of alterations to its record of the private authentication key (unless the clock alteration is an advancement).
-
(e) It must never allow its record of the authentication clock for that party to be incremented beyond the maximal time value and so "roll-over" to zero.
-
(f) It must never increase its record of the lifetime for that party except as may be explicitly authorized (via imperative command or securely represented configuration information) by the responsible network administrator.
-
(g) In the event that the non-volatile, incorruptible representations of a party's parameters (in particular, either the private authentication key or private encryption key) are lost or destroyed, it must alter its record of these quantities to random values so subsequent interaction with that party requires manual redistribution of new secrets and other parameters.
- If it selects new value(s) for a party's secret(s), it must avoid bad or obvious choices for said secret(s). Choices to be avoided are boundary values (such as all-zeros) and predictable values (such as the same value as previously or selecting from a predetermined set).
7.3. Protocol Correctness
The correctness of these SNMP security protocols with respect to the stated goals depends on the following assumptions:
-
The chosen message digest algorithm satisfies its design criteria. In particular, it must be computationally infeasible to discover two messages that share the same digest value.
-
It is computationally infeasible to determine the secret used in calculating a digest on the concatenation of the secret and a message when both the digest and the message are known.
-
The chosen symmetric encryption algorithm satisfies its design criteria. In particular, it must be computationally infeasible to determine the cleartext message from the ciphertext message without knowledge of the key used in the transformation.
-
Local notions of a party's authentication clock while it is associated with a specific private key value are monotonically non-decreasing (i.e., they never run backwards) in the absence of administrative manipulations.
-
The secrets for a particular SNMP party are known only to authorized SNMP protocol entities.
-
Local notions of the authentication clock for a particular SNMP party are never altered such that the authentication clock's new value is less than the current value without also altering the private authentication key.
For each mechanism of the protocol, an informal account of its contribution to the required goals is presented below. Pseudocode fragments are provided where appropriate to exemplify possible implementations; they are intended to be self-explanatory.
7.3.1. Clock Monotonicity Mechanism
By pairing each sequence of a clock's values with a unique key, the protocols partially realize goals 3 and 4, and the conjunction of this property with assumption 6 above is sufficient for the claim that, with respect to a specific private key value, all local notions of a party's authentication clock are, in general, non-decreasing with time.
7.3.2. Data Integrity Mechanism
The protocols require computation of a message digest computed over the SNMP message prepended by the secret for the relevant party. By virtue of this mechanism and assumptions 1 and 2, the protocols realize goal 1.
Normally, the inclusion of the message digest value with the digested message would not be sufficient to guarantee data integrity, since the digest value can be modified in addition to the message while it is enroute. However, since not all of the digested message is included in the transmission to the destination, it is not possible to substitute both a message and a digest value while enroute to a destination.
Strictly speaking, the specified strategy for data integrity does not detect a SNMP message modification which appends extraneous material to the end of such messages. However, owing to the representation of SNMP messages as ASN.1 values, such modifications cannot -- consistent with goal 1 -- result in unauthorized management operations.
The data integrity mechanism specified in this memo protects only against unauthorized modification of individual SNMP messages. A more general data integrity service that affords protection against the threat of message stream modification is not realized by this mechanism, although limited protection against reordering, delay, and duplication of messages within a message stream are provided by other mechanisms of the protocol.
7.3.3. Data Origin Authentication Mechanism
The data integrity mechanism requires the use of a secret value known only to communicating parties. By virtue of this mechanism and assumptions 1 and 2, the protocols explicitly prevent unauthorized modification of messages. Data origin authentication is implicit if the message digest value can be verified. That is, the protocols realize goal 2.
7.3.4. Restricted Administration Mechanism
This memo requires that implementations preclude administrative alterations of the authentication clock for a particular party independently from its private authentication key (unless that clock alteration is an advancement). An example of an efficient implementation of this restriction is provided in a pseudocode fragment below. This pseudocode fragment meets the requirements of assumption 6.
Pseudocode Fragment. Observe that the requirement is not for simultaneous alteration but to preclude independent alteration. This latter requirement is fairly easily realized in a way that is consistent with the defined semantics of the SNMP Set operation.
Void partySetKey (party, newKeyValue)
{
if (party->clockAltered) {
party->clockAltered = FALSE;
party->keyAltered = FALSE;
party->keyInUse = newKeyValue;
party->clockInUse = party->clockCache;
}
else {
party->keyAltered = TRUE;
party->keyCache = newKeyValue;
}
}
Void partySetClock (party, newClockValue)
{
if (party->keyAltered) {
party->keyAltered = FALSE;
party->clockAltered = FALSE;
party->clockInUse = newClockValue;
party->keyInUse = party->keyCache;
}
else {
party->clockAltered = TRUE;
party->clockCache = newClockValue;
}
}
7.3.5. Ordered Delivery Mechanism
The definition of the Digest Authentication Protocol requires that, if the timestamp value on a received message does not exceed the timestamp of the most recent validated message locally delivered from the originating party, then that message is not delivered. Otherwise, the record of the timestamp for the most recent locally delivered validated message is updated.
if (msgIsValidated) {
if (timestampOfReceivedMsg >
party->timestampOfLastDeliveredMsg) {
party->timestampOfLastDeliveredMsg =
timestampOfReceivedMsg;
}
else {
msgIsValidated = FALSE;
}
}
Although not explicitly represented in the pseudocode above, in the Digest Authentication Protocol, the ordered delivery mechanism must ensure that, when the authentication timestamp of the received message is equal to the last-timestamp, received messages continue to be delivered as long as their nonce values are monotonically increasing. By virtue of this mechanism, the protocols realize goal 4.
7.3.6. Message Timeliness Mechanism
The definition of the SNMP security protocols requires that, if the authentication timestamp value on a received message -- augmented by an administratively chosen lifetime value -- is less than the local notion of the clock for the originating SNMP party, the message is not delivered.
if (timestampOfReceivedMsg +
party->administrativeLifetime <=
party->localNotionOfClock) {
msgIsValidated = FALSE;
}
By virtue of this mechanism, the protocols realize goal 3. In cases in which the local notions of a particular SNMP party clock are moderately well-synchronized, the timeliness mechanism effectively limits the age of validly delivered messages. Thus, if an attacker diverts all validated messages for replay much later, the delay introduced by this attack is limited to a period that is proportional to the skew among local notions of the party clock.
7.3.7. Selective Clock Acceleration Mechanism
The definition of the SNMP security protocols requires that, if the timestamp value on a received, validated message exceeds the local notion of the clock for the originating party, then that notion is adjusted forward to correspond to said timestamp value. This mechanism is neither strictly necessary nor sufficient to the security of the protocol; rather, it fosters the clock synchronization on which valid message delivery depends -- thereby enhancing the effectiveness of the protocol in a management context.
if (msgIsValidated) {
if (timestampOfReceivedMsg >
party->localNotionOfClock) {
party->localNotionOfClock =
timestampOfReceivedMsg;
}
}
The effect of this mechanism is to synchronize local notions of the party clock more closely in the case where a sender's notion is more advanced than a receiver's. In the opposite case, this mechanism has no effect on local notions of the party clock and either the received message is validly delivered or not according to other mechanisms of the protocol.
Operation of this mechanism does not, in general, improve the probability of validated delivery for messages generated by party participants whose local notion of the party clock is relatively less advanced. In this case, queries from a management station may not be validly delivered and the management station needs to react appropriately (e.g., by administratively resynchronizing local notions of the clock in conjunction with a key change). In contrast, the delivery of SNMP trap messages generated by an agent that suffers from a less advanced notion of a party clock is more problematic, for an agent may lack the capacity to recognize and react to security failures that prevent delivery of its messages. Thus, the inherently unreliable character of trap messages is likely to be compounded by attempts to provide for their validated delivery.
7.3.8. Confidentiality Mechanism
The protocols require the use of a symmetric encryption algorithm when the data confidentiality service is required. By virtue of this mechanism and assumption 3, the protocols realize goal 5.