Showcasing Red Teaming TTPs — Weaponizing Custom Made C2 Channel via MS Word Macro
The author describes a custom command-and-control channel delivered via a Microsoft Word macro that runs a PowerShell command to download and execute a remote script. The raw payload evaded Windows Defender, but the macro-based delivery was detected, so the author discusses why and hints at future evasion work.
Welcome back my fellow hackers, today we are continuing the series of showcasing Red Teaming TTPs by trying to weaponize a custom C2 channel we previously written. If you want to find the video about making the C2 you can find it here: https://youtu.be/Yoj0bQkIRqU
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the macro used a direct Shell call to PowerShell, which Windows Defender flags as malicious, whereas the raw PowerShell download string was not flagged because it resembles normal C# development.
Impact
The raw PowerShell payload could establish a remote command channel on a Windows machine with Defender enabled, but the macro-based delivery was blocked by Defender.
What the attacker needed
Victim opens a Word document; victim enables macros; attacker controls a remote server
How it was found
- Create a PowerShell command that downloads and executes a remote script.
- Encode the command in Base64 to avoid syntax errors.
- Embed the encoded command in a Word macro that calls Shell with PowerShell.
- Add AutoOpen and Document_Open macros to trigger execution when the document opens.
- Open the document and enable content to run the macro.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a red-team write-up about sneaking a remote-control program onto a Windows computer using a Word document. A macro is a small script inside a document that runs when the document is opened; here it launches PowerShell, a built-in tool that can download and run other code. The author found that the plain download step was not flagged by antivirus, but wrapping it in a macro was.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.