Macro

Preparation

  • Install Office.

  • Create a Word document, called Evil.doc.

  • Open a Macros from View menu. Select 'Evil' document in Macros in:

  • Insert your macro name, 'MyMacro' in the Macro name: and then click 'Create'

  • This will take you to a VB editor.

  • Add the following script to your new macro.

  • Create a reverse shell payload with hta extension via msfvenom

  • Make them readable with a python script. Download hta2macro.py.

  • Copy the split string to the Macro and add some commands in the Macro.

  • and save it as Word 97 format.

  • When you check the macro again, you see the following scripts.

  • Set up a netcat listener to validate your macro to work.

  • Open the word document.

  • Click Enable Content.

  • Kali machine, you will see the connection.

Execution

  • Check your macro

  • Set up a netcat listener again, upload the document to your target location, and wait until someone opens the document and enable content.

Last updated