Exploitation
Last updated
Last updated
Getting a shell with .odt file embedded with malicious macros.
Open libreo office by typing libreoffice in terminal.
To create a macro we will go to Tools > Macros > Organize Macros > Basic
We will then create a new macro which we will name whatever we want.
We will type Shell(" ")
Anything in between those will be executed.
So although there is other ways of doing this I would rather have my payload have chances of being executed and not be caught up by an AV by using the multi/handler which automatically encodes the payload.
So we will generate our payload.
And start a python webserver on port 80.
Inside the macro between the quotation marks we will paste this payload which will get our generated payload and execute it, resulting in a reverse shell.
Then we save the macro. Once saved we attach the macro to an event that will execute the macro when somebody opens the file.
We will go to Tools > Customize > Events > Open Document > Macro... > Nameofmacro > Standard > Main
Save the FIle as odt.
Upload and free money.
Code execution.