Streams
NTFS files can contain multiple streams of data. Each stream resembles a separate file but is listed within a single filename. Streams are accessed using the syntax file:stream, and by default, the main stream is unnamed (and hence is accessed when you simply specify the filename).
For example, you can use the echo command to create a file or a specific stream. To create a stream named Data for the file named Text.txt, run the following command.
Echo Hello, world > text.txt:data
Directory listings will show that the Text.txt file is zero bytes long, and opening the file in a text editor will show nothing. However, it does contain data in the Data stream, which you can demonstrate by running the following command.
More < text.txt:data Hello, world
Legitimate programs often use streams. However, malicious software also uses streams to hide data. You can use the Streams program, available at http://technet.microsoft.com/en-ca/sysinternals/bb897440.aspx, to list streams. For example, to list all files with streams within the Windows directory, run the following command.
Streams -s %windir% Streams v1.56 - Enumerate alternate NTFS data streams Copyright (C) 1999-2007 Mark Russinovich Sysinternals - www.sysinternals.com C:\Windows\Thumbs.db: :encryptable:$DATA 0 C:\Windows\PLA\System\LAN Diagnostics.xml: :0v1ieca3Feahez0jAwxjjk5uRh:$DATA 2524 :{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA 0 C:\Windows\PLA\System\System Diagnostics.xml: :0v1ieca3Feahez0jAwxjjk5uRh:$DATA 5384 :{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA 0 C:\Windows\PLA\System\System Performance.xml: :0v1ieca3Feahez0jAwxjjk5uRh:$DATA 500 :{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA 0 C:\Windows\PLA\System\Wireless Diagnostics.xml: :0v1ieca3Feahez0jAwxjjk5uRh:$DATA 3240 :{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA 0 C:\Windows\ShellNew\Thumbs.db: :encryptable:$DATA 0 C:\Windows\System32\Thumbs.db: :encryptable:$DATA 0
As you can see from this output, several files in subdirectories within the C:\Windows\ directory have a stream named $DATA.
In this tutorial:
- Managing Disks and File Systems
- Overview of Partitioning Disks
- How to Choose Between MBR or GPT
- Converting from MBR to GPT Disks
- GPT Partitions
- Choosing Basic or Dynamic Disks
- Working with Volumes
- How to Create a Simple Volume
- How to Create a Spanned Volume
- How to Create a Striped Volume
- How to Resize a Volume
- How to Delete a Volume
- How to Create and Use a Virtual Hard Disk
- File System Fragmentation
- Backup And Restore
- How File Backups Work
- File and Folder Backup Structure
- How System Image Backups Work
- How to Start a System Image Backup from the Command Line
- How to Restore a System Image Backup
- System Image Backup Structure
- Best Practices for Computer Backups
- How to Manage Backup Using Group Policy Settings
- Previous Versions and Shadow Copies
- How to Manage Shadow Copies
- How to Restore a File with Previous Versions
- How to Configure Previous Versions with Group Policy Settings
- Windows ReadyBoost
- BitLocker Drive Encryption
- How BitLocker Encrypts Data
- How BitLocker Protects Data
- TPM with External Key (Require Startup USB Key At Every Startup)
- TPM with PIN (Require PIN At Every Startup)
- TPM with PIN and External Key
- BitLocker To Go
- BitLocker Phases
- Requirements for Protecting the System Volume with BitLocker
- How to Enable the Use of BitLocker on the System Volume on Computers Without TPM
- How to Enable BitLocker Encryption on System Volumes
- How to Enable BitLocker Encryption on Data Volumes
- How to Manage BitLocker Keys on a Local Computer
- How to Manage BitLocker from the Command Line
- How to Recover Data Protected by BitLocker
- How to Disable or Remove BitLocker Drive Encryption
- How to Decommission a BitLocker Drive Permanently
- How to Prepare AD DS for BitLocker
- How to Configure a Data Recovery Agent
- How to Manage BitLocker with Group Policy
- The Costs of BitLocker
- Windows 7 Encrypting File System
- How to Export Personal Certificates
- How to Import Personal Certificates
- How to Grant Users Access to an Encrypted File
- Symbolic Links
- How to Create Symbolic Links
- How to Create Relative or Absolute Symbolic Links
- How to Create Symbolic Links to Shared Folders
- How to Use Hard Links
- Disk Quotas
- How to Configure Disk Quotas on a Single Computer
- How to Configure Disk Quotas from a Command Prompt
- How to Configure Disk Quotas by Using Group Policy Settings
- Disk Tools
- EFSDump
- SDelete
- Streams
- Sync
- MoveFile and PendMoves