Hidden in Plain Sight: How Hackers Use Alternate Data Streams to Evade Detection on Windows Systems

Listen to this Post

Featured Image

Introduction

In the ever-evolving world of cybersecurity, adversaries are constantly finding new ways to sneak past defenses. One such technique, often overlooked but extremely potent, is the use of Alternate Data Streams (ADS). Originally a feature built into Windows NTFS to support compatibility with Apple’s HFS, ADS has become a tool of choice for cybercriminals seeking stealth. This article explores how threat actors manipulate this hidden feature, why it matters in modern-day cybersecurity, and what defenders can do to spot and stop such covert operations.

Understanding the Threat: A Digest of Alternate Data Streams in Cyber Attacks

Alternate Data Streams are an obscure yet powerful feature of Windows NTFS file systems. Each file typically includes a default unnamed data stream—this is the data you normally see. But Windows also allows for additional, named streams to be attached to files. These aren’t visible in File Explorer, making them perfect for hiding malicious content. Even directories can have their own alternate data streams, providing cybercriminals with even more places to hide.

Threat actors exploit this feature to conceal malware and executables in otherwise benign-looking files. One prominent example is BitPaymer ransomware, operated by a group called Indrik Spider. In 2017, this malware targeted the UK’s National Health Service, storing its payload inside an alternate data stream labeled ‘bin’ to stay undetected. This campaign alone brought in over \$1.5 million in just over a year.

Writing and reading from an alternate stream is surprisingly simple. For example, creating a text file and writing data into its ‘secret’ stream results in a file that appears empty in File Explorer. Even though it holds hidden content, traditional directory listings won’t reveal this data unless special commands like dir /r are used. What’s more disturbing is that tools such as PowerShell and wmic can execute malicious binaries directly from these streams without raising alarms.

Reserved file names in Windows, like “CON”, add another layer of stealth. Attackers can bypass Windows’ file-naming restrictions using the prefix \?\, writing hidden streams to files that cannot be accessed or even seen using regular commands or interfaces. Unless defenders know how to use specific tools and syntax, these malicious files remain completely hidden.

Detecting and defending against these attacks is tough. Alternate data streams can’t be disabled, so defenders must proactively hunt for them. This involves using command-line tools like dir /r or Sysinternals’ Streams64.exe, often in combination with scheduled tasks to regularly scan sensitive directories. Without automation and active monitoring, these malicious streams can linger undetected for months, serving as a launchpad for attacks or persistent backdoors.

What Undercode Say:

Alternate Data Streams (ADS) are a prime example of how a legitimate operating system feature can be turned into a weapon against its own users. Originally introduced to support legacy compatibility, ADS now offers a cloak of invisibility for attackers. It’s elegant, insidious, and deeply underestimated in threat modeling.

What makes ADS especially dangerous is its simplicity and subtlety. Unlike exotic zero-day vulnerabilities or complex exploitation chains, hiding and executing malware through ADS doesn’t require a high skill ceiling. A few command-line instructions are enough. Worse, many security tools don’t monitor or log interactions with alternate data streams, leaving defenders blind unless they’ve taken specific steps to detect them.

For enterprise environments, this poses a massive risk. Security Information and Event Management (SIEM) solutions need custom rules or plugins to detect ADS-based attacks. Endpoint Detection and Response (EDR) tools often ignore these streams unless they’re explicitly configured to track them. This blind spot is what adversaries count on.

From a Red Team perspective, the use of ADS offers a perfect way to maintain persistence without tripping alarms. For example, hiding payloads in alternate streams of legitimate system files or even reserved-name files like “CON” using \?\ means defenders must employ precise and rarely-used detection methods to even notice the threat.

Moreover, the case of Indrik Spider and BitPaymer underscores the operational success of ADS-based techniques. With over \$1.5 million raked in, the use of alternate streams allowed their malware to bypass initial scans and gain a foothold in critical systems. This wasn’t a theoretical or fringe technique—it worked in the wild.

Another major concern is how alternate streams interact with file permissions. Because ADS is tied to the host file, if the host file has full system access, so does the malicious code within the stream. That makes privileged escalation and lateral movement much easier once initial access is obtained.

On the defensive side, organizations need to adopt a “trust but verify” policy for their NTFS environments. That means regularly running tools like streams64.exe in scheduled intervals across high-risk directories. Output files should be versioned and compared daily to detect new streams, potentially indicating an infection.

And automation is crucial. Manual detection is too time-consuming and error-prone. By combining script-based enumeration with forensic logging and anomaly detection, defenders can reclaim visibility into this shadowy part of the file system.

Ultimately, what makes ADS so powerful is its subtlety. It doesn’t exploit a bug or a loophole—it simply uses the OS as designed, but for malicious ends. That’s a wake-up call: threat actors don’t always need to break into your house. Sometimes, they just hide in the walls.

Fact Checker Results:

✅ ADS is a legitimate NTFS feature, often misused by attackers

✅ Indrik

✅ Detection requires advanced tools like streams64.exe and custom monitoring rules 🔍

Prediction:

The use of Alternate Data Streams for stealth malware delivery is expected to increase in the coming years. As EDR and antivirus solutions focus on more common attack vectors, adversaries will lean further into under-monitored techniques like ADS. We predict a surge in hybrid attacks combining ADS with living-off-the-land binaries (LOLBins), especially in targeted ransomware operations. Organizations that do not incorporate alternate stream monitoring into their security stack will remain highly vulnerable to these stealthy, fileless threats.

References:

Reported By: isc.sans.edu
Extra Source Hub:
https://www.twitter.com
Wikipedia
Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram