
CVE-2021-3441 CVE Check ist ein Python-Skript zur Suche nach Indikatoren für eine Kompromittierung von Zielen bezüglich CVE-2021-3441.
Ein Python-Bedrohungsanalyse-Tool zur Automatisierung der IoC-Erkennung für CVE-2021-3441. Durchsuchen Sie einfach Ziele nach Anzeichen einer Kompromittierung.
________________
_/_______________/|
/___________/___//|| CVE-2021-3441 Check
|=== |----| ||
| | �| || Author: Tyler Butler
|___________| �| || @tbutler0x90
| ||/.�---.|| | ||
|-||/_____\||-. | |�
|_||==HP===||_|__|/
CVE-2021-3441 CVE Check ist ein Python-Tool zur Durchsuchung von Zielen nach Indikatoren einer Kompromittierung (IoC) für diese CVE. Das Skript ruft die Produktversionen aus dem HTTP-Antwortheader des Ziels ab. Falls die Produktversion anfällig ist und ein Modell für die Version erstellt wurde, fordert das Skript die Ressource an, die einen Exploit-Payload enthalten könnte. Sobald die HTML-Entity, die einen Exploit enthalten könnte, geladen ist, wird nach häufigen XSS-Zeichen gesucht. Das Programm benachrichtigt den Benutzer über die Konsole, wenn Exploit-Payloads gefunden werden, und kann die Ergebnisse in einer Ausgabedatei protokollieren.

python3 hp-cve-check.py -i [target ip] -O ./test/output.txt
➜ hp-cve-check git:(master) ✗ python3 hp-cve-check.py -i 192.168.223.1 -O output.txt
________________
_/_______________/|
/___________/___//|| HP CVE Check
|=== |----| ||
| | �| || Author: Tyler Butler
|___________| �| || @tbutler0x90
| ||/.�---.|| | ||
|-||/_____\||-. | |�
|_||==HP===||_|__|/
{!} Starting hp-cve-check
{!} -------- {INFO} Product Version is Supported
{!} -------- {INFO} IoC ID: A1 Path: /DevMgmt/ProductConfigDyn.xml Tag: dd:deviceLocation
{!} Scanning target: 192.168.223.1 for CVE
{!} -------- {INFO} Requesting http://192.168.223.1/DevMgmt/ProductConfigDyn.xml
{!} -------- {INFO}: OK Response, Status Code: 200
{!} -------- {INFO}: Found Something in DeviceLocation Field
{!} -------- {INFO}: Checking for Suspicious characters
{!} -------- {WARNING}: Found Indicator of Compromise
{!} -------- {WARNING}: Field Setting :<script>alert('XSS 2');</script>
{!} -------- {INFO} IoC ID: A2 Path: /DevMgmt/NetAppsDyn.xml Tag: dd:ApplicationServiceName
{!} Scanning target: 192.168.223.1 for CVE
{!} -------- {INFO} Requesting http://192.168.223.1/DevMgmt/NetAppsDyn.xml
{!} -------- {INFO}: OK Response, Status Code: 200
{!} -------- {INFO}: Found Something in DeviceLocation Field
{!} -------- {INFO}: Checking for Suspicious characters
{!} -------- {OK}: No IoCs Detected
{!} -------- {OK}: Payload: test
{!} Ending hp-cve-check ....
python3 hp-cve-check.py -i [target list] -o [output file]
| Option | Beschreibung | Verwendung |
|---|---|---|
| -i | Ziel-IP | -i 192.168.223.1 |
| -I | Zieldatei |
Wenn IoCs gefunden werden, werden sie in einem durchsuchbaren Format in der Ausgabedatei protokolliert: [target ip]:[payload]. Wenn keine Payload-Objekte gefunden werden, wird None verwendet.
➜ hp-cve-check git:(master) ✗ cat ./test/output.txt
192.168.223.1:<script>alert('XSS 2');</script>
192.168.223.1:None
Da Indikatoren einer Kompromittierung je nach Produktversion in unterschiedlichen Ressourcen gefunden werden, werden Module verwendet, um versionsspezifische Konfigurationsoptionen zu speichern. Die Module werden im Ordner modules im YAML-Format gespeichert. Für jede unterstützte Version wird eine Modul-YML-Datei erstellt, die die folgenden Optionen enthält:
hp-officejet-4630.yml-Modul
---
product: 'HP Officejet 4630'
path: '/DevMgmt/ProductConfigDyn.xml'
tag: 'dd:deviceLocation'
paths:
- A1: '/DevMgmt/ProductConfigDyn.xml'
A2: '/DevMgmt/NetAppsDyn.xml'
tags:
- A1: 'dd:deviceLocation'
A2: 'dd:ApplicationServiceName'
Paths und tags werden basierend auf der im Schwachstellenbericht beschriebenen IoC-Erkennungstabelle aufgeschlüsselt, siehe unten.

HP CVE Check ist in die Pakete core und util unterteilt.
HP CVE Check Pakete
➜ hp-cve-check git:(master) ✗ tree
├── lib
│ ├── core
│ │ ├── constants.py
│ │ ├── iocCheck.py
│ │ ├── module_parser.py
│ │ └── requests.py
│ └── utils
│ ├── printer.py
│ └── help.py
├── modules
│ └── hp-officejet-4630.yml
-i targets.txt |
| -O | Ausgabedatei | -O output.txt |