# DDE

DDE is an old MS technology that is used to facilitate data transfer between applications. DDE sends messages between applications that share data and uses shared memory to exchange data between applications.  DDE can be embedded in several Office file formats

To leverage this attack vector:

Open a new MS document and insert a field

![](https://216667902-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfpNy7QBsIOaHJ1vcf-%2F-MfsXyc2MITNdgL-Uoch%2F-Mfsh8oT7qT1fZjqDsgu%2Fimage.png?alt=media\&token=937050e2-57cd-4588-a5ce-4a3e02aa59d5)

It will add an "!Unexpected End of Formula" to the document, we right-click it and "Toggle field codes" :&#x20;

![](https://216667902-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfpNy7QBsIOaHJ1vcf-%2F-MfsXyc2MITNdgL-Uoch%2F-MfshCKh-lnlI30XRIft%2Fimage.png?alt=media\&token=2f4a7d19-99b1-4deb-bc97-93c8298e9895)



We then replace the = \\\* MERGEFORMAT with the payload:&#x20;

```
{ DDEAUTO "C:\\Programs\\Microsoft\\Office\\MSWord.exe\\..\\..\\..\\windows\\system32\\WindowsPowershell\\v1.0\\powershell.exe start calc # " "required"}​
```

If we save the document, reopen our document and accept the 2 prompts, calculator will popup.

## Obfuscating Field Codes

(todo)



