|
6 | 6 | platform=['cisco_ios'], |
7 | 7 | commands=dict( |
8 | 8 | show_version='show version', |
9 | | - check_ios='show running-config | include ios' |
| 9 | + check_iox='show running-config | include iox' |
10 | 10 | ), |
11 | 11 | ) |
12 | 12 | def rule_cve202220718(configuration, commands, device, devices): |
13 | 13 | """ |
14 | 14 | This rule checks for the CVE-2022-20718 vulnerability in Cisco IOS Software. |
15 | | - The vulnerability is due to insufficient protection in the Cisco IOS application hosting environment. |
| 15 | + The vulnerability is due to insufficient protection in the Cisco IOx application hosting environment. |
16 | 16 | Multiple vulnerabilities could allow an attacker to inject arbitrary commands into the underlying host |
17 | 17 | operating system, execute arbitrary code, install applications without authentication, or conduct |
18 | 18 | cross-site scripting (XSS) attacks. |
19 | 19 | """ |
20 | | - # Extract the output of the command to check IOS configuration |
21 | | - ios_output = commands.check_ios |
| 20 | + # Extract the output of the command to check IOx configuration |
| 21 | + iox_output = commands.check_iox |
22 | 22 |
|
23 | | - # Check if IOS is configured |
24 | | - ios_configured = 'ios' in ios_output |
| 23 | + # Check if IOx is configured |
| 24 | + iox_configured = 'iox' in iox_output |
25 | 25 |
|
26 | 26 | # Assert that the device is not vulnerable |
27 | | - assert not ios_configured, ( |
| 27 | + assert not iox_configured, ( |
28 | 28 | f"Device {device.name} is vulnerable to CVE-2022-20718. " |
29 | | - "The device has IOS application hosting configured, " |
| 29 | + "The device has IOx application hosting configured, " |
30 | 30 | "which could allow an attacker to execute arbitrary commands, install unauthorized applications, " |
31 | 31 | "or conduct XSS attacks. " |
32 | 32 | "For more information, see " |
33 | | - "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ios-yuXQ6hFj" |
| 33 | + "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iox-yuXQ6hFj" |
34 | 34 | ) |
0 commit comments