CVE-2017-6738 in cisco ios
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
The Simple Network Management Protocol (SNMP) subsystem of Cisco IOS and IOS XE Software contains multiple vulnerabilities that could allow an authenticated, remote attacker to remotely execute code on an affected system or cause an affected system to reload. An attacker could exploit these vulnerabilities by sending a crafted SNMP packet to an affected system via IPv4 or IPv6. Only traffic directed to an affected system can be used to exploit these vulnerabilities. The vulnerabilities are due to a buffer overflow condition in the SNMP subsystem of the affected software. The vulnerabilities affect all versions of SNMP - Versions 1, 2c, and 3. To exploit these vulnerabilities via SNMP Version 2c or earlier, the attacker must know the SNMP read-only community string for the affected system. To exploit these vulnerabilities via SNMP Version 3, the attacker must have user credentials for the affected system. A successful exploit could allow the attacker to execute arbitrary code and obtain full control of the affected system or cause the affected system to reload. Customers are advised to apply the workaround as contained in the Workarounds section below. Fixed software information is available via the Cisco IOS Software Checker. All devices that have enabled SNMP and have not explicitly excluded the affected MIBs or OIDs should be considered vulnerable. There are workarounds that address these vulnerabilities.
Affected software: cisco ios, cisco ios xe
Scores
- CVSS: 8.8 (high)
- EPSS: 10.85% chance of exploitation in the next 30 days
- CISA KEV: Known exploited, listed 2022-03-03
- Published: 2017-07-17
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Upgrade Cisco IOS / IOS XE for the 2017 SNMP RCE flaws (cisco-sa-20170629-snmp)
Patch or upgrade. Fixed IOS / IOS XE releases close the SNMP buffer overflows. Until you can upgrade, excluding the affected MIBs from every SNMP view and limiting SNMP to trusted management hosts removes the attack path.
Applies to: Cisco IOS and IOS XE releases listed as vulnerable in cisco-sa-20170629-snmp (see the Cisco Software Checker), with SNMP v1, v2c or v3 enabled and the affected MIBs not excluded
- Find every Cisco IOS / IOS XE device that has SNMP enabled: run 'show running-config | include snmp-server' and note each community and SNMPv3 group.
- Run 'show version' to get the release, then look it up in the Cisco IOS Software Checker (https://sec.cloudapps.cisco.com/security/center/softwarechecker.x) for advisory cisco-sa-20170629-snmp to find the first fixed release.
- Upgrade each device to that fixed release or a later one in a maintenance window. Check memory first and save the configuration before you start.
- If you cannot upgrade yet, create a view that leaves out the affected MIBs: 'snmp-server view NO_BAD_SNMP iso included', 'snmp-server view NO_BAD_SNMP internet included', 'snmp-server view NO_BAD_SNMP snmpUsmMIB excluded', 'snmp-server view NO_BAD_SNMP snmpVacmMIB excluded', 'snmp-server view NO_BAD_SNMP snmpCommunityMIB excluded', 'snmp-server view NO_BAD_SNMP ciscoMgmt.252 excluded'.
- Add the advisory-specific exclusions to the same view: transmission.94 (ADSL-LINE-MIB), mib-2.34.9 (TN3270E-RT-MIB), ciscoMgmt.35 (CISCO-BSTUN-MIB), ciscoMgmt.95 (ALPS-MIB), ciscoMgmt.130 (CISCO-ADSL-DMT-LINE-MIB), ciscoAuthFrameworkMIB, ciscoMgmt.219 (CISCO-VOICE-DNIS-MIB), ciscoMgmt.254 (CISCO-SLB-EXT-MIB), ciscoMabMIB and ciscoExperiment.997 (CISCO-VOICE-NUMBER-EXPANSION-MIB). Use one line for each: 'snmp-server view NO_BAD_SNMP <oid> excluded'.
- Apply the view to every community, for example 'snmp-server community <community> view NO_BAD_SNMP RO', and to every SNMPv3 group, for example 'snmp-server group <group> v3 auth read NO_BAD_SNMP write NO_BAD_SNMP'. Implement the whole exclude list: 'show snmp mib' does not list every MIB that is enabled.
- Allow SNMP only from your monitoring hosts with a standard ACL on each community (snmp-server community <community> view NO_BAD_SNMP RO <acl>). Replace default or easy-to-guess community strings, or move to SNMPv3.
- Run 'write memory' to save the configuration. If a device reloaded unexpectedly and wrote a crashinfo file, send the file to Cisco TAC to check for compromise.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.