To understand ADS, analysts must look at how the New Technology File System (NTFS) manages data. Every file on an NTFS volume consists of a set of attributes stored within a Master File Table (MFT) record.
The actual content of a file is stored in the $DATA attribute. A standard file has a single, unnamed $DATA attribute. However, NTFS allows a single file to have multiple, named $DATA attributes. These are the Alternate Data Streams.
An ADS is accessed by appending a colon (:) to the primary file’s name:
FileName.extension:StreamName.extension:$DATA
For example, if an attacker hides a payload named malware.exe inside a benign text file named readme.txt, the resulting stream is addressed as:
readme.txt:malware.exe
Crucially, adding a 50MB executable to the ADS of a 1KB text file will not change the reported file size of the text file in Windows Explorer or standard dir commands, making the payload completely invisible to the casual observer.
Before hunting for malware, DFIR analysts must understand the most critical legitimate use of ADS: the Mark of the Web (MoTW).
When a user downloads a file from the internet via a web browser or email client, Windows automatically creates an ADS named Zone.Identifier. This stream contains metadata indicating the file’s origin zone (e.g., Internet, Intranet).
Forensic Value of MoTW
During a Suspicious Email Analysis or phishing investigation, reading the Zone.Identifier stream of a downloaded payload reveals the exact URL from which the file was downloaded (the HostUrl field). This provides immediate, high-fidelity IOCs for threat hunting.
Writing to an ADS is trivial; executing from it requires specific “Living off the Land” (LOLBAS) techniques. Since modern Windows versions restrict executing an .exe directly from an ADS via the command line, attackers use indirect execution methods.
WMI Execution: Using Windows Management Instrumentation to launch the hidden executable.
wmic process call create "C:\Users\Public\readme.txt:hidden.exe"
Rundll32 Execution: If the hidden payload is a DLL, it can be executed using the native rundll32.exe utility.
rundll32.exe C:\Users\Public\readme.txt:hidden.dll,EntryPoint
Script Execution: Hiding PowerShell or VBScript code inside an ADS and executing it via Get-Content or wscript.
Because ADS payloads are invisible to standard dir or Windows Explorer checks, analysts must use specific utilities during live response or offline MFT parsing.
When analyzing a forensic image, analysts parse the $MFT file. Tools like Eric Zimmerman’s MFTECmd will explicitly list files containing named $DATA attributes, allowing analysts to extract the hidden payload directly from the raw disk image regardless of OS restrictions.
Detecting ADS abuse requires granular endpoint telemetry. Native Windows event logs are insufficient; organizations must rely on Sysmon or EDR solutions.
Sysmon Event 15 is specifically designed to log the creation of named file streams. It records the target file, the stream name, and crucially, the cryptographic hash of the stream’s contents, enabling immediate IOC correlation.
Disabling Alternate Data Streams is not possible, as it is a fundamental architectural component of the NTFS file system required by legitimate Windows services. Mitigation relies entirely on strict Execution Prevention (blocking execution from unauthorized paths using WDAC/AppLocker) and robust Behavioral Monitoring (EDR/Sysmon) to detect the creation and execution of anomalous streams.