Skip to content

Instantly share code, notes, and snippets.

@oscarandreu
Created June 9, 2020 10:35
Show Gist options
  • Save oscarandreu/0eacbd6cb9654395217ef2d3e665c05f to your computer and use it in GitHub Desktop.
Save oscarandreu/0eacbd6cb9654395217ef2d3e665c05f to your computer and use it in GitHub Desktop.
Use of Alternate Data Streams with powershell
Set-Content -path .\hello.txt -value $(Get-Content $(Get-Command calc.exe).Path -readcount 0 -encoding byte) -encoding byte -stream exestream
wmic process call create $(Resolve-Path .\hello.txt:exestream)
Set-Content -path .\test:$INDEX_ALLOCATION -value "asdf" -stream $INDEX_ALLOCATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment