
SMB를 통해 CVE-2019-1040 취약점을 확인합니다. 이 스크립트는 대상 호스트에 연결하여 잘못된 NTLM 인증을 전송합니다. 이것이 수락되면 호스트는 CVE-2019-1040에 취약하며, ntlmrelayx와 함께 MIC 제거 공격을 실행할 수 있습니다.
로그인 정보 자체는 유효하므로 실패한 로그인 시도가 생성되지 않는다는 점에 유의하십시오. 단지 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