Alternate Data Streams
Execution
echo "this is benign" > benign.txt
Get-ChildItem



Observations


References
Last updated
Creating a benign text file:
echo "this is benign" > benign.txt
Get-ChildItem
Hiding an evil.txt file inside the benign.txt

Note how the evil.txt file is not visible through the explorer - that is because it is in the alternate data stream now. Opening the benign.txt shows no signs of evil.txt. However, the data from evil.txt can still be accessed as shown below in the commandline - type benign.txt:evil.txt:

Additionally, we can view the data in the notepad as well by issuing:


Note that powershell can also help finding alternate data streams:

Last updated
cmd '/c echo "this is evil" > benign.txt:evil.txt'notepad .\benign.txt:evil.txtGet-Item c:\experiment\evil.txt -Stream *
Get-Content .\benign.txt -Stream evil.txt