Skip to content

Commit 2772ba4

Browse files
authored
Merge pull request #690 from MicrosoftDocs/mde-wsl-updates
MDE WSL updates
2 parents e134063 + 3e80c57 commit 2772ba4

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

defender-endpoint/mde-plugin-wsl.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.collection:
1414
ms.custom:
1515
- partner-contribution
1616
audience: ITPro
17-
ms.date: 05/23/2024
17+
ms.date: 06/12/2024
1818
search.appverid: MET150
1919
---
2020

@@ -23,7 +23,7 @@ search.appverid: MET150
2323
**Applies to:**
2424

2525
- [Microsoft Defender for Endpoint Plan 2](microsoft-defender-endpoint.md)
26-
- Windows 11
26+
- Windows 11
2727
- Windows 10, version 2004 and later (build 19044 and later)
2828

2929
## Overview
@@ -38,12 +38,14 @@ Be aware of the following before you start:
3838

3939
2. It takes a few minutes for the plug-in to fully instantiate, and up to 30 minutes for a WSL2 instance to onboard itself. Short-lived WSL container instances might result in the WSL2 instance not showing up in the Microsoft Defender portal ([https://security.microsoft.com](https://security.microsoft.com)). Once any distribution has been running long enough (at least 30 minutes), it does show up.
4040

41-
3. Running a custom kernel and custom kernel command line is supported in this version; however, the plug-in doesn't guarantee visibility within WSL when you're running a custom kernel and custom kernel command line.
41+
3. Running a custom kernel and custom kernel command line is not supported. Although the plug-in does not block running in that configuration, it does not guarantee visibility within WSL when you're running a custom kernel and custom kernel command line. We recommend to block such configurations with help of [Microsoft Intune wsl settings](/windows/wsl/intune).
4242

4343
4. OS Distribution is displayed **None** in Device overview page of WSL device in Microsoft Defender portal.
4444

4545
5. The plug-in is not supported on machines with ARM64 processor.
4646

47+
6. The plug-in provides visibility into events from WSL but other features like antimalware, threat and vulnerability management and response commands are not available for the WSL logical device.
48+
4749
## Software prerequisites
4850

4951
- WSL version 2.0.7.0 or later must be running with at least one active distro.
@@ -58,23 +60,23 @@ Be aware of the following before you start:
5860

5961
Installer: `DefenderPlugin-x64-0.24.426.1.msi`. You can download it from the onboarding page in the [Microsoft Defender portal](https://security.microsoft.com).
6062

61-
Installation directories:
63+
Installation directories:
6264

6365
- `%ProgramFiles%`
6466

6567
- `%ProgramData%`
6668

6769
Components installed:
6870

69-
- `DefenderforEndpointPlug-in.dll`. This DLL is the library to load Defender for Endpoint to work within WSL. You can find it at **%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\plug-in**.
71+
- `DefenderforEndpointPlug-in.dll`. This DLL is the library to load Defender for Endpoint to work within WSL. You can find it at **%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\plug-in**.
7072

7173
- `healthcheck.exe`. This program checks the health status of Defender for Endpoint and enables you to see the installed versions of WSL, plug-in, and Defender for Endpoint. You can find it at **%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools**.
7274

7375
## Installation steps
7476

7577
If your Windows Subsystem for Linux isn't installed yet, follow these steps:
7678

77-
1. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
79+
1. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
7880

7981
2. Run the command `wsl -–install`.
8082

@@ -99,7 +101,7 @@ If your Windows Subsystem for Linux isn't installed yet, follow these steps:
99101

100102
1. After update or installation, wait for at least five minutes for the plug-in to fully initialize and write log output.
101103

102-
2. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
104+
2. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
103105

104106
3. Run the command: `cd "%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools"`.
105107

@@ -132,14 +134,14 @@ If your host machine contains multiple proxy settings, the plug-in selects the p
132134

133135
3. Network & Internet proxy settings.
134136

135-
Example: If your host machine has both *Winhttp proxy* and *Network & Internet proxy*, the plug-in selects `Winhttp proxy` as the proxy configuration.
137+
Example: If your host machine has both *Winhttp proxy* and *Network & Internet proxy*, the plug-in selects `Winhttp proxy` as the proxy configuration.
136138

137139
> [!NOTE]
138140
> The `DefenderProxyServer` registry key is no longer supported. Follow the above mentioned steps to configure proxy in plug-in.
139-
141+
140142
## Connectivity test for Defender running in WSL
141143

142-
The following procedure describes how to confirm that Defender in Endpoint in WSL has internet connectivity.
144+
The following procedure describes how to confirm that Defender in Endpoint in WSL has internet connectivity.
143145

144146
1. Open Registry Editor as an administrator.
145147

@@ -169,7 +171,7 @@ After installing the plug-in, the subsystem and all its running containers are o
169171

170172
1. Sign into the Microsoft Defender portal, and open the **Devices** view.
171173

172-
2. Filter using the tag **WSL2**.
174+
2. Filter using the tag **WSL2**.
173175

174176
:::image type="content" source="media/mdeplugin-wsl/wsl-device-inventory.png" alt-text="Screenshot showing device inventory filter" lightbox="media/mdeplugin-wsl/wsl-device-inventory.png":::
175177

@@ -179,13 +181,13 @@ After installing the plug-in, the subsystem and all its running containers are o
179181

180182
:::image type="content" source="media/mdeplugin-wsl/wsl-ui-overview.png" alt-text="Screenshot showing device overview." lightbox="media/mdeplugin-wsl/wsl-ui-overview.png":::
181183

182-
The timeline is populated, similar to Defender for Endpoint on Linux, with events from inside the subsystem (file, process, network). You can observe activity and detections in the timeline view. Alerts and incidents are generated as appropriate as well.
184+
The timeline is populated, similar to Defender for Endpoint on Linux, with events from inside the subsystem (file, process, network). You can observe activity and detections in the timeline view. Alerts and incidents are generated as appropriate as well.
183185

184186
### Test the plug-in
185187

186-
To test the plug-in after installation, follow these steps:
188+
To test the plug-in after installation, follow these steps:
187189

188-
1. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
190+
1. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
189191

190192
2. Run the command `wsl`.
191193

@@ -202,9 +204,9 @@ Treat the machine as if it were a regular Linux host in your environment to perf
202204

203205
### Advanced hunting
204206

205-
In the Advanced Hunting schema, under the `DeviceInfo` table, there's a new attribute called `HostDeviceId` that you can use to map a WSL instance to its Windows host device. Here are a few sample hunting queries:
207+
In the Advanced Hunting schema, under the `DeviceInfo` table, there's a new attribute called `HostDeviceId` that you can use to map a WSL instance to its Windows host device. Here are a few sample hunting queries:
206208

207-
#### Get all WSL device IDs for the current organization/tenant
209+
#### Get all WSL device IDs for the current organization/tenant
208210

209211
```kusto
210212
//Get all WSL device ids for the current organization/tenant
@@ -215,7 +217,7 @@ let wsl_endpoints = DeviceInfo
215217
wsl_endpoints
216218
```
217219

218-
#### Get WSL device IDs and their corresponding host device IDs
220+
#### Get WSL device IDs and their corresponding host device IDs
219221

220222
```kusto
221223
//Get WSL device ids and their corresponding host device ids
@@ -258,10 +260,10 @@ DeviceProcessEvents
258260

259261
4. If you don't see any devices in the Microsoft Defender portal, or you don't see any events in the timeline, check the following things:
260262

261-
- If you aren't seeing a machine object, make sure sufficient time has passed for onboarding to complete (typically up to 10 minutes).
262-
263+
- If you aren't seeing a machine object, make sure sufficient time has passed for onboarding to complete (typically up to 10 minutes).
264+
263265
- Make sure to use the right filters, and that you have the appropriate permissions assigned to view all device objects. (For example, is your account/group is restricted to a specific group?)
264-
266+
265267
- Use the health check tool to provide an overview of overall plug-in health. Open Terminal, and run the `healthcheck.exe` tool from `%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools`.
266268

267269
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-support.png" alt-text="Screenshot showing status in PowerShell." lightbox="media/mdeplugin-wsl/wsl-health-check-support.png":::
@@ -271,6 +273,7 @@ DeviceProcessEvents
271273
- If the connectivity test reports "invalid" in health check, include the following configuration settings in the `.wslconfig` located in your `%UserProfile%` and restart WSL. Details about settings can be found in [WSL Settings](/windows/wsl/wsl-config#main-wsl-settings).
272274

273275
- In Windows 11
276+
274277
```bash
275278
# Settings apply across all Linux distros running on WSL 2
276279
[wsl2]
@@ -279,15 +282,17 @@ DeviceProcessEvents
279282

280283
networkingMode=mirrored
281284
```
285+
282286
- In Windows 10
287+
283288
```bash
284289
# Settings apply across all Linux distros running on WSL 2
285290
[wsl2]
286291
287292
dnsProxy=false
288293
```
289294

290-
5. If you run into any other challenges or issues, open Terminal, and run the following commands to generate a support bundle:
295+
5. If you run into any other challenges or issues, open Terminal, and run the following commands to generate a support bundle:
291296

292297
```powershell
293298
cd "%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools"
@@ -297,7 +302,7 @@ DeviceProcessEvents
297302
.\healthcheck.exe --supportBundle
298303
```
299304

300-
The support bundle can be found in the path provided by the previous command.
305+
The support bundle can be found in the path provided by the previous command.
301306

302307
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-overview.png" alt-text="Screenshot showing status in PowerShell output." lightbox="media/mdeplugin-wsl/wsl-health-check-overview.png":::
303308

@@ -319,18 +324,18 @@ DeviceProcessEvents
319324
wsl --set-version <YourDistroName> 2
320325
```
321326

322-
To have WSL 2 as your default WSL version for new distributions to be installed in the system, run the following command in PowerShell:
327+
To have WSL 2 as your default WSL version for new distributions to be installed in the system, run the following command in PowerShell:
323328

324329
```powershell
325330
wsl --set-default-version 2
326331
```
327332

328333
7. The plug-in uses the Windows EDR ring by default. If you wish to switch to an earlier ring, set `OverrideReleaseRing` to one of the following under registry and restart WSL:
329334

330-
- **Name**: `OverrideReleaseRing`
331-
- **Type**: `REG_SZ`
332-
- **Value**: `Dogfood or External or InsiderFast or Production`
333-
- **Path**: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Defender for Endpoint plug-in for WSL`
335+
- **Name**: `OverrideReleaseRing`
336+
- **Type**: `REG_SZ`
337+
- **Value**: `Dogfood or External or InsiderFast or Production`
338+
- **Path**: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Defender for Endpoint plug-in for WSL`
334339

335340
8. If you see an error on launching WSL, such as "A fatal error was returned by plugin 'DefenderforEndpointPlug-in' Error code: Wsl/Service/CreateInstance/CreateVm/Plugin/ERROR_FILE_NOT_FOUND", it means the Defender for Endpoint plug-in for WSL installation is faulty. To repair it, follow these steps:
336341

@@ -340,4 +345,4 @@ DeviceProcessEvents
340345

341346
This should fix the problem by placing the right files in the expected directories.
342347

343-
:::image type="content" source="media/mdeplugin-wsl/plug-in-repair-control-panel.png" alt-text="Screenshot showing MDE plug-in for WSL repair option in control panel." lightbox="media/mdeplugin-wsl/plug-in-repair-control-panel.png":::
348+
:::image type="content" source="media/mdeplugin-wsl/plug-in-repair-control-panel.png" alt-text="Screenshot showing MDE plug-in for WSL repair option in control panel." lightbox="media/mdeplugin-wsl/plug-in-repair-control-panel.png":::

0 commit comments

Comments
 (0)