Critical error in SNMPv3 implementations from a number of vendors
Multiple implementations of the SNMPv3 management protocol contain a vulnerability which can be used to circumvent the authentication process. In contrast to SNMPv2, in which the only access protection is plain text community strings, SNMPv3 uses Hash Message Authentication Codes (HMAC), for which, according to RFC3414, HMAC-MD5-96 or HMAC-SHA-96 can be used. As well as the normal hash, a secret key also flows into the HMAC.
According to a security advisory in the open source implementations Net-SNMP and UCD-SNMP, sending a one byte HMAC to the recipient is sufficient to successfully authenticate an SNMP request. The only obstacle is selecting the correct byte from the 256 possibilities – not much of a problem for an attacker. As a result devices can be reconfigured or data queried.
Net-SNMP versions 5.4.1, 5.3.2 and earlier, and 5.2.4 and earlier are affected. All versions of UCD-SNMP are vulnerable; likewise the eCos project which is based upon it. Updates are available for Net-SNMP, but are not yet available for UCD-SNMP and eCos.
Cisco has published a report on the problem and has indicated that the problem exists with both HMAC-MD5-96 and HMAC-SHA-96. IOS and CatOS as well as ACE and Nexus products are all affected. The SNMP server in these products is, however, by default deactivated. Cisco has released updates.
US-CERT also includes Juniper, Network Appliance, Red Hat, Sun and Ubuntu in its list of affected vendors. A number of the affected vendors have yet to release security advisories. For most of the remaining vendors in the US-CERT list, the status of the problem remains unknown. In particular, many router manufacturers are likely to be using NET-SNMP or UCD-SNMP in their embedded systems.
US-CERT recommends activating SNMPv3 encryption until a patch is available. This leaves the HMAC unencrypted, but encrypts the actual request. Without the correct key, however, the device will discard the SNMP packet, even with correct authentication.
- SNMPv3 improper HMAC validation allows authentication bypass, security advisory from US-CERT
- multiple SNMP implementations HMAC authentication spoofing, security advisory from oCERT
- SNMP Version 3 Authentication Vulnerabilities, security advisory from Cisco