Rapid7 Vulnerability & Exploit Database

Microsoft Office Word Malicious Hta Execution

Back to Search

Microsoft Office Word Malicious Hta Execution



This module creates a malicious RTF file that when opened in vulnerable versions of Microsoft Word will lead to code execution. The flaw exists in how a olelink object can make a http(s) request, and execute hta code in response. This bug was originally seen being exploited in the wild starting in Oct 2016. This module was created by reversing a public malware sample.


  • Haifei Li
  • ryHanson
  • wdormann
  • DidierStevens
  • vysec
  • Nixawk
  • sinn3r <sinn3r@metasploit.com>




Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/fileformat/office_word_hta
msf exploit(office_word_hta) > show targets
msf exploit(office_word_hta) > set TARGET < target-id >
msf exploit(office_word_hta) > show options
    ...show and set options...
msf exploit(office_word_hta) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security