Abuse of NTFS INDEX_ALLOCATION Stream for Directory Obfuscation
Attackers can abuse the NTFS $INDEX_ALLOCATION stream to create directories that are inaccessible to standard Windows utilities like Explorer and PowerShell, facilitating stealthy data storage.
This technique involves the abuse of the NTFS filesystem structure, specifically the $INDEX_ALLOCATION attribute. By appending the string "::$INDEX_ALLOCATION" to a directory name during creation, an attacker can create a folder structure that standard Windows APIs and common management tools (such as Windows Explorer or PowerShell) struggle to traverse or list. This effectively hides the directory and its contents from the average user and administrative tools, providing a method for stealthy persistence or data staging. While the data remains accessible via low-level file system calls or specific command-line utilities, this technique is frequently leveraged to bypass automated monitoring and user discovery during the post-exploitation phase. Defenders should be aware that standard EDR process-creation logs may not always capture the full command-line arguments involving alternate data streams, depending on the specific sensor implementation and visibility.
Impact
Successful implementation of this technique results in the creation of hidden directories that effectively bypass traditional file discovery methods. This allows an attacker to conceal malware payloads, exfiltrated data, or persistence mechanisms on an endpoint, reducing the likelihood of detection by security personnel and automated administrative cleanup tasks.
Recommendation
- Deploy the provided Sigma rule to detect the use of "::$index_allocation" in command-line arguments.
- Verify your EDR/telemetry coverage, as many standard Sysmon configurations do not log alternate data stream path components in process-creation events.
- Prioritize auditing file system modifications for directories containing "::$index_allocation" strings.
Immediate actions
Deploy the NTFS INDEX_ALLOCATION detection rule to production SIEM.
Threat Hunt
Search endpoint logs for any command line processes containing '::$index_allocation'.
Data: Process creation events / command line history
Mitigations
Implement strict file system monitoring on sensitive directories for unexpected Alternate Data Stream (ADS) usage.
T1564.004
Gaps
- Limited visibility into stream manipulation via API calls that do not involve the command line.
Detection coverage 1
Detect Potential NTFS INDEX_ALLOCATION Hidden Directory Creation
mediumDetects the use of the ::$index_allocation stream in command lines, which is used to create hidden directories inaccessible to standard Windows tooling.
Detection queries are available on the platform. Get full rules →