
Comprueba la vulnerabilidad CVE-2019-1040 sobre SMB. El script establecerá una conexión con el/los host(s) objetivo y enviará una autenticación NTLM inválida. Si esta es aceptada, el host es vulnerable a CVE-2019-1040 y puedes ejecutar el ataque MIC Remove con ntlmrelayx.
Ten en cuenta que esto no genera intentos de inicio de sesión fallidos, ya que la información de inicio de sesión en sí misma es válida; simplemente falta el código de integridad del mensaje NTLM, por lo que la autenticación se rechaza sin incrementar el badpwdcount.
El script requiere una versión reciente de impacket. Debería funcionar tanto con Python 2 como con Python 3 (Python 3 requiere que uses impacket desde 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