You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: defender-endpoint/mde-plugin-wsl.md
+33-28Lines changed: 33 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.collection:
14
14
ms.custom:
15
15
- partner-contribution
16
16
audience: ITPro
17
-
ms.date: 05/23/2024
17
+
ms.date: 06/12/2024
18
18
search.appverid: MET150
19
19
---
20
20
@@ -23,7 +23,7 @@ search.appverid: MET150
23
23
**Applies to:**
24
24
25
25
-[Microsoft Defender for Endpoint Plan 2](microsoft-defender-endpoint.md)
26
-
- Windows 11
26
+
- Windows 11
27
27
- Windows 10, version 2004 and later (build 19044 and later)
28
28
29
29
## Overview
@@ -38,12 +38,14 @@ Be aware of the following before you start:
38
38
39
39
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.
40
40
41
-
3. Running a custom kernel and custom kernel command line is supportedin 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).
42
42
43
43
4. OS Distribution is displayed **None** in Device overview page of WSL device in Microsoft Defender portal.
44
44
45
45
5. The plug-in is not supported on machines with ARM64 processor.
46
46
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
+
47
49
## Software prerequisites
48
50
49
51
- 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:
58
60
59
61
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).
60
62
61
-
Installation directories:
63
+
Installation directories:
62
64
63
65
-`%ProgramFiles%`
64
66
65
67
-`%ProgramData%`
66
68
67
69
Components installed:
68
70
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**.
70
72
71
73
-`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**.
72
74
73
75
## Installation steps
74
76
75
77
If your Windows Subsystem for Linux isn't installed yet, follow these steps:
76
78
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**.)
78
80
79
81
2. Run the command `wsl -–install`.
80
82
@@ -99,7 +101,7 @@ If your Windows Subsystem for Linux isn't installed yet, follow these steps:
99
101
100
102
1. After update or installation, wait for at least five minutes for the plug-in to fully initialize and write log output.
101
103
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**.)
103
105
104
106
3. Run the command: `cd "%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools"`.
105
107
@@ -132,14 +134,14 @@ If your host machine contains multiple proxy settings, the plug-in selects the p
132
134
133
135
3. Network & Internet proxy settings.
134
136
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.
136
138
137
139
> [!NOTE]
138
140
> The `DefenderProxyServer` registry key is no longer supported. Follow the above mentioned steps to configure proxy in plug-in.
139
-
141
+
140
142
## Connectivity test for Defender running in WSL
141
143
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.
143
145
144
146
1. Open Registry Editor as an administrator.
145
147
@@ -169,7 +171,7 @@ After installing the plug-in, the subsystem and all its running containers are o
169
171
170
172
1. Sign into the Microsoft Defender portal, and open the **Devices** view.
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.
183
185
184
186
### Test the plug-in
185
187
186
-
To test the plug-in after installation, follow these steps:
188
+
To test the plug-in after installation, follow these steps:
187
189
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**.)
189
191
190
192
2. Run the command `wsl`.
191
193
@@ -202,9 +204,9 @@ Treat the machine as if it were a regular Linux host in your environment to perf
202
204
203
205
### Advanced hunting
204
206
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:
206
208
207
-
#### Get all WSL device IDs for the current organization/tenant
209
+
#### Get all WSL device IDs for the current organization/tenant
208
210
209
211
```kusto
210
212
//Get all WSL device ids for the current organization/tenant
@@ -215,7 +217,7 @@ let wsl_endpoints = DeviceInfo
215
217
wsl_endpoints
216
218
```
217
219
218
-
#### Get WSL device IDs and their corresponding host device IDs
220
+
#### Get WSL device IDs and their corresponding host device IDs
219
221
220
222
```kusto
221
223
//Get WSL device ids and their corresponding host device ids
@@ -258,10 +260,10 @@ DeviceProcessEvents
258
260
259
261
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:
260
262
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
+
263
265
- 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
+
265
267
- 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`.
266
268
267
269
:::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
271
273
- 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).
272
274
273
275
- In Windows 11
276
+
274
277
```bash
275
278
# Settings apply across all Linux distros running on WSL 2
276
279
[wsl2]
@@ -279,15 +282,17 @@ DeviceProcessEvents
279
282
280
283
networkingMode=mirrored
281
284
```
285
+
282
286
- In Windows 10
287
+
283
288
```bash
284
289
# Settings apply across all Linux distros running on WSL 2
285
290
[wsl2]
286
291
287
292
dnsProxy=false
288
293
```
289
294
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:
291
296
292
297
```powershell
293
298
cd"%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools"
@@ -297,7 +302,7 @@ DeviceProcessEvents
297
302
.\healthcheck.exe --supportBundle
298
303
```
299
304
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.
301
306
302
307
:::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":::
303
308
@@ -319,18 +324,18 @@ DeviceProcessEvents
319
324
wsl --set-version <YourDistroName> 2
320
325
```
321
326
322
-
To have WSL 2 as your default WSL version fornew distributions to be installedin the system, run the following commandin PowerShell:
327
+
To have WSL 2 as your default WSL version fornew distributions to be installedin the system, run the following commandin PowerShell:
323
328
324
329
```powershell
325
330
wsl --set-default-version 2
326
331
```
327
332
328
333
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:
329
334
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`
334
339
335
340
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:
336
341
@@ -340,4 +345,4 @@ DeviceProcessEvents
340
345
341
346
This should fix the problem by placing the right files in the expected directories.
342
347
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