Social Engineering
MOTW (Mark of the Web) is a metadata tag added by Windows to files downloaded from the internet. It’s stored as an Alternate Data Stream (Zone.Identifier) and tells the OS that the file came from an untrusted source (e.g., browser download, email attachment).
For Red Teamers, MOTW matters because it can trigger security features like SmartScreen, AMSI, or macro blocking in Office. Files marked with MOTW are more likely to be flagged, blocked, or require user interaction.
To increase payload execution success, it's crucial to deliver files without MOTW. Common ways to avoid it include:
Using internal delivery methods (e.g., compromised Exchange, shared drives)
Hosting files over SMB/WebDAV
Packaging payloads in ZIPs without MOTW (e.g., ZIPs created locally or transferred via trusted channels)
Using scripts or LOLBins that write the payload to disk without MOTW
Bottom line: No MOTW = fewer defenses triggered = higher success rate.
Macros
Macro for Libre Office
Macro for MS Word
Loader Bypass AV/EDR: Bypass AV/EDR via DInvoke + Sliver
Word Malicious Macro with Cobalt Strike
Simple Macro
Create a blank document
View > Macros > Select document
Attacks > Scripted Web Delivery (S)
Set URI Path
Set Host (nickelviper.com)
Set Port (80)
Set Listener HTTP/DNS
Set type: Powershell
Enable Use X64 Payload
Copy the payload and set it into the macro.
Save as
.doc
.Send the file whether via email from a compromise Exchange to avoid the MOTW or any methods you want.
Remote Template injection
Create a blank document
View > Macros > Select document
Attacks > Scripted Web Delivery (S)
Set URI Path
Set Host (nickelviper.com)
Set Port (80)
Set Listener HTTP/DNS
Set type: Powershell
Enable Use X64 Payload
Copy the payload and set it into the macro.
Save as
.dot
.Host the file (python server|Cobalt Striket Server)
Create a new black template
Save as
.docx
By using 1-zip click on file
Go to Word > _rels > settings.xml.rels
Modify the
target
parameter within thesettings.xml.rels
file with the.dot
file you created before and is hosted.
Send the file whether via email from a compromise Exchange to avoid the MOTW or any methods you want.
Capturing NTLMv2 Hashes
If you see you possess Write permission over public SMB share in your target domain or you see the website accepts uploading files you could use tools such as ntlm_theft to create a malicious files and steal NTLMv2 Hash
Some places to steal NTLMV2 Hashes
Last updated