Sploitus

Exploit for cve-2019-1040-scanner

kitploit · 2026-08-31

Exploit Code

MARKDOWN38 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-FOX-IT-CVE-2019-1040-SCANNER
# Сканер CVE-2019-1040

Проверяет уязвимость CVE-2019-1040 через SMB. Скрипт устанавливает соединение с целевым хостом (хостами) и отправляет недопустимую аутентификацию NTLM. Если она принимается, хост уязвим к CVE-2019-1040, и вы можете выполнить атаку MIC Remove с помощью ntlmrelayx.

Обратите внимание, что это не генерирует неудачные попытки входа, так как сами учётные данные действительны, отсутствует только код целостности сообщения NTLM, поэтому аутентификация отклоняется без увеличения счётчика badpwdcount.

# Использование

Скрипт требует последнюю версию impacket. Должен работать как с python 2, так и с python 3 (Python 3 требует использования impacket из git).

root@kitploit:~
    
    
    [*] 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