基于 https://blog.talosintelligence.com/active-exploitation-of-cisco-ios-xe-software/ 的CVE-2023-20198检查脚本。包括更新后的Authorization头检查已知植入。
!! 升级以查找升级后的植入
脚本检查返回响应长度为200码,并检查长度是否小于32个字符。每个返回长度小于32字符的IP应检查是否被入侵。此脚本仅提供指示,不是入侵证据。
脚本还检查植入是否已升级,如Fox-IT发现:https://github.com/fox-it/cisco-ios-xe-implant-detection
运行:
python cve-2023-20198.py
并输入要扫描的子网。例如:
python CVE-2023-20198
Enter the subnet (CIDR notation): 10.0.0.0/22
IP: 10.0.0.94 - Error: no reply
IP: 10.0.0.94 - Error: no reply
IP: 10.0.0.96 - Status: 200
IP: 10.0.0.96 - Response is a potentially suspicious:
IPs with status code 200, suspicious length, should be checked:
['10.0.0.96']
IPs with status code 200, but no IOC:
[]