Client-side Exploit
Windows Office Marco
Here is a sample from OSCP course:
First use msfvenom to create a reverse shell payload:
In the file evil.hta, you will see the powershell script encoded with base64.
For marco, the max. length of a string is only 50 characters and therefore we have to split it. Here is an example Python script:
Then we can craft our MS macro:
When the office client open this document, a reverse shell will call back.
Windows Office DDE
You can embed bat
file, which could give us a reverse shell when a user clicks on the DDE object.
Prepare a bat file like:
Then in Office, in the Insert ribbon > Object > Create from File, and then choose your bat script. You can even display as icon and change the display name.
Last updated