
Vérifie la présence de la vulnérabilité CVE-2019-1040 via SMB. Le script établira une connexion vers les hôtes cibles et enverra une authentification NTLM invalide. Si celle-ci est acceptée, l'hôte est vulnérable à CVE-2019-1040 et vous pouvez exécuter l'attaque MIC Remove avec ntlmrelayx.
Notez que cela ne génère pas de tentatives de connexion échouées car les informations de connexion sont elles-mêmes valides ; c'est simplement le code d'intégrité du message NTLM qui est absent, raison pour laquelle l'authentification est refusée sans augmenter badpwdcount.
Le script nécessite une version récente d'impacket. Il devrait fonctionner avec Python 2 et 3 (Python 3 nécessite d'utiliser impacket depuis git).
[*] 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