Why WSL becomes a security blind spot in the enterprise
From Bashware to Qilin ransomware: real WSL abuse cases, and what defenders can do with Intune and GPO, Hyper-V Firewall, EDR visibility and detection rules.
In this post
WSL (Windows Subsystem for Linux) is the Microsoft feature that runs Linux directly on Windows. Developers like it. For a security team, it means one more Linux environment inside a Windows PC, and one that is hard to see. This post uses published cases and Microsoft documentation to lay out how the threat works and what you can do about it.
Why it is a threat: confirmed facts
The mechanism: an unseen VM that can still reach Windows files
wsl.exe process launching a distribution. [30]The permission boundary matters too.
wsl.exe would have in PowerShell. [11]/mnt (automount), and the ability to launch Windows processes from inside WSL (interop) is turned on. [16]/etc/wsl.conf inside the distribution, which means the distribution’s root user can change them. They do not look like a central control point (this is my reading of the documentation).
Real cases: from proof of concept to ransomware
- 2017-09Check Point publishes the Bashware proof of concept
Assuming local admin rights, it quietly enabled WSL1 and ran Windows malware through Wine [1]
- 2021-09Lumen Black Lotus Labs reports a loader abusing WSL
Reported as the first publicly identified case. VirusTotal detections of one or zero per sample [2][3]
- 2022-05More than 100 WSL-based samples tracked
A remote access tool controlled over Telegram stole Chrome and Opera authentication cookies [4]
- 2025-10-23Trend Micro report on Agenda (Qilin)
The report describes WSL use as an inference: the attackers 'likely' enabled it [5]
- 2025-10-28Trend Micro answers BleepingComputer's follow-up
Says the attackers did in fact run the encryptor through WSL [6]
- 2026-01SpecterOps releases a red team tool (BOF) targeting WSL2
[8]
- 2026-02SANS ISC reports an infostealer script aimed at WSL
It checks whether it is running inside WSL, then searches /mnt, where Windows drives are mounted, first [9]
The 2025 Qilin case has to be read in two steps.
WSL vulnerabilities keep coming
| CVE | Published | Type | CVSS | Fix |
|---|---|---|---|---|
| CVE-2025-53788 [20] | 2025-08-12 | Elevation of privilege (TOCTOU race condition, CWE-367) | 7.0 | WSL 2.5.10 or later |
| CVE-2026-21237 [21] | 2026-02-10 | Elevation of privilege (race condition, CWE-362), SYSTEM rights if exploited | 7.0 | See the MSRC advisory |
| CVE-2026-57968 [22] | 2026-07-14 | WSL2 kernel elevation of privilege (buffer over-read, CWE-126) | 7.8 | WSL 2.7.8 or later |
ATT&CK mapping: only one technique where MITRE names WSL
| Technique | Basis for mapping | Notes |
|---|---|---|
| T1202 Indirect Command Execution | MITRE text names WSL and wsl.exe [23] |
MITRE says it “cannot be easily mitigated with preventive controls” |
| T1218 System Binary Proxy Execution | Sigma rules [26][27], LOLBAS [25] | Community mapping |
| T1105 Ingress Tool Transfer | LOLBAS [25] | Community mapping |
| T1564.006 Run Virtual Instance | Arguably related (my interpretation) [24] | MITRE text does not mention WSL. Mitigation M1042 is to disable unneeded virtualization such as Hyper-V |
EDR visibility into WSL: a comparison based on public documents
Seeing inside WSL2 takes support from the EDR product. The table below covers only what public documents confirm. MDE has extensive official public documentation and CrowdStrike does not, so the difference in filled cells reflects how much is publicly documented, not which product is better.
| Item | Microsoft Defender for Endpoint | CrowdStrike Falcon |
|---|---|---|
| Public basis | Official Microsoft documentation [13][14] | Reseller partner notices and release notes [31][32] |
| Approach | Install the WSL plug-in (MSI) [13] | Windows sensor plug-in plus the “WSL 2 Visibility” prevention policy setting [31] |
| Minimum version | WSL 2.0.7.0 or later; 2.9.12 or later for WSL containers [13] | Introduced with Windows sensor 7.26.19809 (released 2025-06-17) [31] |
| Required subscription | MDE Plan 2 [13] | Cannot be confirmed from public sources |
| Visible events | File, process and network events from inside WSL appear on the timeline [13] | Cannot be confirmed from public sources |
| Detection and alerts | Alerts and incidents are generated [13] | Cannot be confirmed from public sources |
| Limitations | No ARM64 or multi-session support; no antimalware, vulnerability management or response commands (isolate, terminate) on the WSL device; onboarding can take up to 30 minutes [13] | WSL service must be restarted after a sensor upgrade or downgrade (known issue) [32] |
WSL2, and it links to its Windows host through HostDeviceId in the advanced hunting DeviceInfo table. Microsoft does not guarantee visibility when a custom kernel and custom kernel command line are in use, and recommends blocking those configurations with Intune. [13]Detection examples (as published)
Even when the inside of the WSL2 VM is invisible, traces remain on the Windows side.
WslLaunch API also ends up just spawning a wsl.exe process, so watching for wsl.exe launches is still a useful lead. [8]MDE advanced hunting (KQL), finding curl and wget runs on WSL devices [13]:
let wsl_endpoints = DeviceInfo
| where OSPlatform == "Linux" and isnotempty(HostDeviceId)
| distinct DeviceId;
DeviceProcessEvents
| where FileName == "curl" or FileName == "wget"
| where DeviceId in (wsl_endpoints)
| sort by Timestamp desc
Elastic EQL, Windows processes whose parent is wsl.exe or wslhost.exe (excerpt, exclusions omitted, based on the Elastic 8.19 docs) [28]:
process where host.os.type == "windows" and event.type : "start" and process.command_line != null and
process.parent.name : ("wsl.exe", "wslhost.exe") and
not process.executable : ( ... )
| Rule | What it looks for | Level |
|---|---|---|
| Sigma “WSL Child Process Anomaly” [26] | cmd, powershell, mshta, rundll32 and similar with wsl.exe/wslhost.exe as parent, or child processes in Temp, Downloads or Public paths |
medium (status: test) |
| Sigma “Arbitrary Command Execution Using WSL” (April 2023 revision) [27] | wsl.exe command lines with -e, --exec, -u root, --user root, --debug-shell, /mnt/c and similar |
medium |
| Qualys indicators (2022) [29] | wsl.exe and bash.exe on the command line, enabling WSL through DISM or PowerShell, the LxssManager service |
— |
Not yet confirmed
Conclusion: turn it off if you can, manage it if you can’t
- Turn it off if you don't need it
Setting 'Allow the Windows Subsystem For Linux' to Disabled in the Intune settings catalog or the WSL ADMX (GPO) blocks WSL for every user on the device [12]. This setting is an option, not part of the recommended list. For a stronger block, use the App Control recommended block list to stop wsl.exe, bash.exe, wslhost.exe and related binaries [18].
- If you use it, lock it down with Intune or GPO
Microsoft recommends setting 10 items to Disabled: Inbox WSL, WSL1, debug shell, custom kernel, custom kernel command line, custom system distro, custom networking, firewall configuration, nested virtualization and kernel debugging. Eight of them apply only to Store WSL [12].
- Set a version baseline
The recommended enterprise minimum is Windows 10 or 11 22H2 with WSL 2.0.9 [11]. Given the CVEs above, keep WSL at 2.7.8 or later [22].
- Network: Hyper-V Firewall and mirrored networking
On Windows 11 22H2 or later with WSL 2.0.9 or later, Hyper-V Firewall is on by default and Windows Firewall rules apply to WSL as well [15][17]. It cannot be configured through GPO; use PowerShell or the Firewall CSP (Intune) [17]. Consider mirrored networking, DNS tunneling and autoProxy on Windows 11 22H2 or later [11][15].
- Check EDR visibility
If you use MDE, confirm the WSL plug-in requirements: Plan 2, WSL 2.0.7.0 or later, x64, single session [13]. For other EDR products, check the vendor documentation for how much they see inside WSL2.
- Deploy detection rules
Watch for processes whose parent is wsl.exe or wslhost.exe, wsl.exe arguments such as -e, -u root and --debug-shell, and WSL being enabled through DISM or PowerShell [26][27][29].
- Manage distributions and credentials
Distribute approved images with wsl --export/--import, and patch packages inside the distribution with Linux configuration management tools [11]. Also audit SSH keys and secrets in config files inside WSL [8].
- Which teams and PCs in your organization actually use WSL, and does a ban or managed use fit better?
- Have you checked your EDR vendor's documentation for what it sees inside WSL2?
- When WSL devices have no isolate or terminate commands, as with the MDE plug-in, is your incident response process ready to act at the host level?
What do you think?
- Beware of the "Bashware": A New Method for Any Malware to Bypass Security Solutions — Check Point Research, 2017-09-11
- Yes, of course there's now malware for Windows Subsystem for Linux — The Register, 2021-09-17
- Attackers Use Linux Binaries as Loaders for Windows Malware — SecurityWeek, 2021-09-20
- New Windows Subsystem for Linux malware steals browser auth cookies — BleepingComputer, 2022-05-28
- Agenda Ransomware Deploys Linux Variant on Windows Systems Through Remote Management Tools and BYOVD Techniques — Trend Micro Research, 2025-10-23
- Qilin ransomware abuses WSL to run Linux encryptors in Windows — BleepingComputer, 2025-10-28
- Uncovering Qilin attack methods exposed through multiple cases — Cisco Talos, 2025-10-26
- One WSL BOF to Rule Them All — SpecterOps, 2026-01-16
- WSL in the Malware Ecosystem — SANS ISC, 2026-02-11
- New enterprise-grade security controls for the Windows Subsystem for Linux — Microsoft DevBlogs, 2023-11-15
- Set up Windows Subsystem for Linux for your company — Microsoft Learn, 2026-06-02
- Intune settings for WSL — Microsoft Learn, 2026-10-30
- Microsoft Defender for Endpoint plug-in for Windows Subsystem for Linux (WSL) — Microsoft Learn, 2026-12-03
- What's new in Microsoft Defender for Endpoint — Microsoft Learn, 2026-12-03
- Accessing network applications with WSL — Microsoft Learn, 2026-06-02
- Advanced settings configuration in WSL — Microsoft Learn, 2026-10-16
- Hyper-V Firewall — Microsoft Learn, 2026-10-08
- Applications that can bypass App Control and how to block them — Microsoft Learn
- The Windows Subsystem for Linux is now open source — Windows Developer Blog, 2025-05-19
- CVE-2025-53788 (CVE record) — CVE.org, 2025-08-12
- CVE-2026-21237 Windows Subsystem for Linux Elevation of Privilege Vulnerability (CSAF) — MSRC, 2026-02-10
- CVE-2026-57968 Windows Subsystem for Linux (WSL2) Kernel Elevation of Privilege Vulnerability (CSAF) — MSRC, 2026-07-14
- T1202 Indirect Command Execution — MITRE ATT&CK, 2026-05-12
- T1564.006 Run Virtual Instance — MITRE ATT&CK, 2026-05-12
- Wsl.exe — LOLBAS Project
- WSL Child Process Anomaly (Sigma rule) — SigmaHQ, 2023-08-15
- Arbitrary Command Execution Using WSL (Sigma rule, as of commit 683b63f) — SigmaHQ, 2023-04-12
- Execution via Windows Subsystem for Linux (prebuilt rule, 8.19 docs) — Elastic
- Implications of Windows Subsystem for Linux for Adversaries & Defenders (Part 2) — Qualys, 2022
- Closing the Visibility Gap with Microsoft Defender for Endpoint — Truesec, 2026-03-12
- CrowdStrike June 2025 Update Information — Macnica (CrowdStrike reseller partner), 2025-06
- Release Notes: Falcon Sensor for Windows 7.31.20308 (partner-posted copy) — ENDPOINT.VN (CrowdStrike reseller partner), 2025-11-13
Information in this post is current as of December 4, 2026. Things may have changed since.