Using Windows Ads To Hide Payloads Backdoors
The article explains how Windows NTFS Alternate Data Streams (ADS) can be used to hide malicious executables inside legitimate files, evading basic signature-based antivirus and casual inspection. An attacker can store a payload in a file's resource stream and create a symbolic link so that typing a normal command executes the hidden payload.
Published on infosecwriteups.com
Hello everyone, today I’ll be explaining how to exploit the ADS (Alternate Data Streams) file system vulnerability in Windows to hide secret payloads, backdoors, etc.., and how attackers can use it to their favor to exploit various commands/processes.
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 NTFS file system allows multiple data streams per file, and Windows does not display these alternate streams in normal file listings or basic antivirus scans, enabling hidden payload storage.
Impact
This technique could allow attackers to hide malicious payloads and backdoors, evading detection by users, administrators, and basic signature-based antivirus systems.
What the attacker needed
NTFS-formatted drive; ability to run commands on the system; write access to create files and symbolic links
How it was found
- Create a legitimate file (e.g., test.txt) and add some visible content.
- Use a command to create a hidden file within the resource stream of the legitimate file (e.g., notepad test.txt:secret.txt).
- Rename a malicious executable (e.g., payload.exe) and write its contents into a new legitimate file's alternate stream (e.g., type payload.exe > windowslog.txt:winpeas.exe).
- Modify the legitimate file to look like a normal log and delete the original payload.
- Create a symbolic link in a system directory pointing to the hidden stream (e.g., mklink wupdate.exe C:\Temp\windowslog.txt:winpeas.txt).
- When a user runs the linked command (e.g., wupdate), the hidden payload executes.
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.
Windows files can have hidden extra compartments called Alternate Data Streams (ADS) that don't show up in normal file listings. This article shows how someone can put a malicious program inside one of these hidden compartments of an innocent-looking file, and then make a shortcut so that running a normal command actually runs the hidden program. This trick can fool people and simple antivirus tools that only look at the main file content.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.