
Alternate Data Streams
A five-minute Lightning Talk at Microsoft Developer & IT Pro Days 2005 in Belgium about alternate data streams, a little-known feature of NTFS that lets a file carry hidden content. It ran in the community block at the end of day 1, the day that opened with Bill Gates’ keynote, and it was my first talk in English in front of an audience that size.
Why they exist. Windows identifies file types by their extension, while the Mac’s HFS file system keeps that kind of information in resource forks. NTFS added alternate data streams to stay compatible.
Hidden in plain sight. The demo wrote a line of text into demo.txt, then put a fake admin password into a stream of the same file, demo.txt:adm. The directory listing still showed the original 19 bytes, and opening the file showed only the first line; only reading the stream by name revealed the password. Streams aren’t limited to text either: the demo copied the Windows calculator into demo.txt:tool.exe, the file still showed 19 bytes, and starting the stream launched the calculator. Explorer doesn’t show streams, they can be attached to files, folders and even drives, and deleting the file was the only built-in way to get rid of them. Tools such as LADS list them, here 115,749 bytes hiding in a 19-byte file.
From .NET. The .NET Framework of 2005 couldn’t open streams on its own, so the StreamTest demo calls the Windows API directly, through P/Invoke to CreateFile and DeleteFile on file:stream paths, to write, read and delete individual streams.
The BlogCast. A month before the talk I recorded an eight-minute BlogCast of the same demo, at the command prompt and in C#, my first attempt at one. The original was a Windows Media file; it’s converted to MP4 here so it plays in the browser.
A few months later, the same feature turned up in Windows itself: XP SP2 marks downloaded files with a Zone.Identifier stream, which is what makes the security warning appear when you run them.
See also the posts BlogCast: Alternate Data Streams and DevDays 2005 Belgium, day 1.
Technologies: NTFS, Windows XP, C#, .NET Framework, Windows API, P/Invoke.
Given at
- January 31, 2005: Microsoft Developer & IT Pro Days 2005, Lightning Talks
Files
- Slides (PDF) (118 KB), or the original PowerPoint (258 KB)
- BlogCast demo application (10 KB)
- BlogCast, original Windows Media file (6.2 MB)
Photos
Photos by Tom Mertens.
You May Also Like

Monitoring Before the Fire
Uptime Kuma on its own instance, a probe catalog derived from config instead of memory, and alerts that found me before my family did.

Self-Hosting Young Software: Tududi
A task manager whose pinned tag vanished, whose documented SSO didn't exist yet, and what deploying early-stage software really costs.

The Repo Now Lives on the Server It Builds
Forgejo on the platform: migrating this project into itself, CI on a RAM budget, and a major upgrade gated on a bit-for-bit restore.





