Achieving Persistent HTML Injection via SNMP on Embedded Devices
23 Oct. 2008
In our earlier "ZyXEL Gateways Vulnerability Research" paper, we introduced a new technique: SNMP injection a.k.a. persistent HTML injection via SNMP. Such a technique allowed us to cause a persistent HTML injection condition on the web management console of several ZyXEL Prestige router models.
Provided that an attacker has guessed or cracked the write SNMP community string of a device, he/she would be able to inject malicious code into the administrative web interface by changing the values of OIDs (SNMP MIB objects) that are printed on HTML pages.
The purpose behind injecting malicious code into the web console via SNMP is to fully compromise the device once the page containing the payload is viewed by the administrator.
When we came up with the SNMP injection technique, we suspected that such an attack is possible on a large number of embedded devices in use in the market, as mentioned on some interviews where our research was featured. Although the SNMP write community string must be guessed or cracked for this attack to work, it is worth mentioning that some devices come with SNMP read/write access enabled by default using common community strings such as 'public', 'private', 'write' and 'cable-docsis'. Some examples include ZyXEL Prestige router models used in residential and SOHO networks, Innomedia VoIP gateways, some Cisco routers and phone gateways and other corporate products such as the Proxim Tsunami devices.
Also, the use of customized but weak SNMP write community strings, and other weaknesses within the devices SNMP stack implementation should be taken into account when evaluating the feasibility of this attack.
In order to confirm that this attack affects most SNMP-enabled embedded devices regardless of model or vendor, we surveyed random embedded devices that were available in our computer security lab. Overall, we surveyed network devices from the following vendors: