
يفحص وجود ثغرة CVE-2019-1040 عبر بروتوكول SMB. سينشئ السكربت اتصالًا بالمضيف (المضيفات) الهدف ويرسل مصادقة NTLM غير صالحة. إذا تم قبولها، يكون المضيف عرضة لثغرة CVE-2019-1040 ويمكنك تنفيذ هجوم إزالة MIC باستخدام ntlmrelayx.
لاحظ أن هذا لا ينتج عنه محاولات تسجيل دخول فاشلة، لأن معلومات تسجيل الدخول نفسها صالحة؛ المفقود فقط هو رمز تكامل رسالة NTLM، ولهذا السبب يتم رفض المصادقة دون زيادة badpwdcount.
يتطلب السكربت إصدارًا حديثًا من impacket. يجب أن يعمل مع كل من Python 2 و3 (يتطلب Python 3 استخدام impacket من 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