Office Macro

Macros allow to execute VBScript code uppon Office document opening.

Write Macro

Within a Word document, choose Visual Basic from the Developer tab. Then double-click on ThisDocument to open the macro editor.

malware_windows_macro-2.png

In order to execute the macro on document opening, use the following code skeleton (see VBScript for payloads):

Private Sub Document_Open()
    [VBS PAYLOAD]
End Sub
Deception

Use deceptive techniques to trick the user to enable macro and trigger execution.

malware_windows_macro-3.png

Document**: 2019-Employee-Benefits-macro.doc**

Enable Macro Panel

In order to write a macro, you first need to enable the Developer tab of the Office application.

  1. Right-click on the Ribbon
  2. Customize the Ribbon
  3. Select Developer tab

malware_windows_macro-1.png