
SMB-Schwachstellenscanner, der CVE-2019-1040 erkennt, indem er ungültige NTLM-Authentifizierungspakete sendet, was MIC Remove Relay-Angriffe zur Kompromittierung des Domänenadministrators ermöglicht.
Überprüft auf CVE-2019-1040-Schwachstelle über SMB. Das Skript stellt eine Verbindung zum Ziel-Host (oder zu Ziel-Hosts) her und sendet eine ungültige NTLM-Authentifizierung. Falls diese akzeptiert wird, ist der Host anfällig für CVE-2019-1040 und Sie können den MIC Remove attack mit ntlmrelayx ausführen.
Beachten Sie, dass dies keine fehlgeschlagenen Anmeldeversuche erzeugt, da die Anmeldeinformationen selbst gültig sind; es fehlt lediglich der NTLM-Nachrichtenintegritätscode, weshalb die Authentifizierung abgelehnt wird, ohne den badpwdcount zu erhöhen.
Das Skript erfordert eine aktuelle impacket-Version. Sollte sowohl mit Python 2 als auch 3 funktionieren (Python 3 erfordert die Verwendung von impacket aus dem Git-Repository).
[*] CVE-2019-1040 scanner by @_dirkjan / Fox-IT - Based on impacket by SecureAuth
usage: scan.py [-h] [-target-file file] [-port [destination port]]
[-hashes LMHASH:NTHASH]
target
CVE-2019-1040 scanner - Connects over SMB and attempts to authenticate with
invalid NTLM packets. If accepted, target is vulnerable to MIC remove attack
positional arguments:
target [[domain/]username[:password]@]<targetName or address>
optional arguments:
-h, --help show this help message and exit
connection:
-target-file file Use the targets in the specified file instead of the
one on the command line (you must still specify
something as target name)
-port [destination port]
Destination port to connect to SMB Server
authentication:
-hashes LMHASH:NTHASH
NTLM hashes, format is LMHASH:NTHASH