
SMBを介してCVE-2019-1040の脆弱性をチェックします。 このスクリプトは対象ホストへの接続を確立し、 無効なNTLM認証を送信します。これが受け入れられた場合、ホストは CVE-2019-1040に対して脆弱であり、ntlmrelayxを使用して MIC Remove攻撃を実行できます。
ログイン情報自体は有効であり、NTLMメッセージ整合性コードが欠落しているだけであるため、認証が拒否されてもbadpwdcountは増加しないことに注意してください。
このスクリプトには最新のimpacketバージョンが必要です。Python 2と3の両方で動作するはずです(Python 3ではgitからimpacketを使用する必要があります)。
[*] 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