Skip to content

Commit 246338b

Browse files
1 parent f32a762 commit 246338b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

_lolbas/Binaries/Bash.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ Commands:
4040
OperatingSystem: Windows 10
4141
Tags:
4242
- Execute: CMD
43+
- Command: bash.exe
44+
Description: 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.
45+
Usecase: Execute a payload as a child process of `bash.exe` while masquerading as WSL.
46+
Category: Execute
47+
Privileges: User
48+
MitreID: T1218
49+
OperatingSystem: Windows 10, Windows Server 2019, Windows 11
50+
Tags:
51+
- Execute: CMD
4352
Full_Path:
4453
- Path: C:\Windows\System32\bash.exe
4554
- Path: C:\Windows\SysWOW64\bash.exe
@@ -49,9 +58,11 @@ Detection:
4958
- IOC: Child process from bash.exe
5059
Resources:
5160
- Link: https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-block-rules
61+
- Link: https://cardinalops.com/blog/bash-and-switch-hijacking-via-windows-subsystem-for-linux/
5262
Acknowledgement:
5363
- Person: Alex Ionescu
5464
Handle: '@aionescu'
5565
- Person: Asif Matadar
5666
Handle: '@d1r4c'
67+
- Person: Liran Ravich, CardinalOps
5768
---

_lolbas/OtherMSBinaries/Wsl.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ Commands:
3838
Privileges: User
3939
MitreID: T1105
4040
OperatingSystem: Windows 10, Windows Server 2019, Windows 11
41+
- Command: wsl.exe
42+
Description: When executed, `wsl.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.
43+
Usecase: Execute a payload as a child process of `bash.exe` while masquerading as WSL.
44+
Category: Execute
45+
Privileges: User
46+
MitreID: T1218
47+
OperatingSystem: Windows 10, Windows Server 2019, Windows 11
48+
Tags:
49+
- Execute: CMD
4150
Full_Path:
4251
- Path: C:\Windows\System32\wsl.exe
4352
Detection:
@@ -47,6 +56,7 @@ Detection:
4756
Resources:
4857
- Link: https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-block-rules
4958
- Link: https://twitter.com/nas_bench/status/1535431474429808642
59+
- Link: https://cardinalops.com/blog/bash-and-switch-hijacking-via-windows-subsystem-for-linux/
5060
Acknowledgement:
5161
- Person: Alex Ionescu
5262
Handle: '@aionescu'
@@ -57,4 +67,5 @@ Acknowledgement:
5767
- Person: Nasreddine Bencherchali
5868
Handle: '@nas_bench'
5969
- Person: Konrad 'unrooted' Klawikowski
70+
- Person: Liran Ravich, CardinalOps
6071
---

0 commit comments

Comments
 (0)