
Scanner de vulnerabilidade SMB que detecta o CVE-2019-1040 enviando pacotes de autenticação NTLM inválidos, possibilitando ataques de relé MIC Remove para comprometimento de administrador de domínio.
Verifica a vulnerabilidade CVE-2019-1040 via SMB. O script estabelecerá uma conexão com o(s) host(s) alvo e enviará uma autenticação NTLM inválida. Se for aceita, o host é vulnerável ao CVE-2019-1040 e você pode executar o ataque MIC Remove com ntlmrelayx.
Note que isso não gera tentativas de login malsucedidas, pois a informação de login em si é válida; é apenas o código de integridade da mensagem NTLM que está ausente, motivo pelo qual a autenticação é recusada sem aumentar o badpwdcount.
O script requer uma versão recente do impacket. Deve funcionar tanto com Python 2 quanto com Python 3 (Python 3 requer o uso do impacket a partir do 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