66 platform = ['cisco_ios' ],
77 commands = dict (
88 show_version = 'show version' ,
9- check_ios = 'show running-config | include ios '
9+ check_iox = 'show running-config | include iox '
1010 ),
1111)
1212def rule_cve202220721 (configuration , commands , device , devices ):
@@ -17,18 +17,18 @@ def rule_cve202220721(configuration, commands, device, devices):
1717 operating system, execute arbitrary code, install applications without authentication, or conduct
1818 cross-site scripting (XSS) attacks.
1919 """
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
2222
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
2525
2626 # Assert that the device is not vulnerable
27- assert not ios_configured , (
27+ assert not iox_configured , (
2828 f"Device { device .name } is vulnerable to CVE-2022-20721. "
29- "The device has IOS application hosting configured, "
29+ "The device has IOx application hosting configured, "
3030 "which could allow an attacker to execute arbitrary commands, install unauthorized applications, "
3131 "or conduct XSS attacks. "
3232 "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"
3434 )
0 commit comments