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
+43-42Lines changed: 43 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,11 @@ The Windows Subsystem for Linux (WSL) 2, which replaces the previous version of
26
26
27
27
Be aware of the following before you start:
28
28
29
-
1. The plug-in doesn't yet automatically update. When a new plug-in version is released, the new MSI package needs to be applied to perform the update. You can apply the new package by using any tool that deploys software. Updates are coming soon through Microsoft Update. If preferred, you can continue to use the MSI package method.
29
+
1. The plug-in does not currently support automatic updates. When a new version is released, a new MSI package needs to be applied to perform the update. This can be done through any of the software deployment tools. Updates will come through Microsoft updates.
30
30
31
31
2. As 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 a (any) distribution has been running long enough (at least 30 minutes), it does show up.
32
32
33
-
3. If you're using a proxy in your (test) environment, make sure that the plug-in is set up to use it correctly. WSL is typically not automatically configured to use a proxy. For more information, see the section, [Setting a proxy for Defender running in WSL](#setting-a-proxy-for-defender-running-in-wsl).
34
-
35
-
4. The use of a custom kernel in combination with the plug-in isn't supported. When you attempt to launch WSL with the plugin installed, you'll encounter the error *A fatal error was returned by plugin 'DefenderforEndpointPlug-in'. Error message: 'Custom Kernel/Configuration not supported.'*.
33
+
3. The use of a custom kernel in combination with the plug-in is not supported. When you attempt to launch WSL with the plugin installed, you will encounter the error *A fatal error was returned by plugin 'DefenderforEndpointPlug-in'. Error message: 'Custom Kernel/Configuration not supported.'*.
36
34
37
35
## Software prerequisites
38
36
@@ -42,7 +40,7 @@ Be aware of the following before you start:
42
40
43
41
- Defender for Endpoint must be onboarded and running on the Windows host OS.
44
42
45
-
- The host OS must be running Windows 10, version 2004 and higher (build 19044 and higher) or Windows 11 to support the Windows Subsystem for Linux versions that can work with the plug-in.
43
+
- The host OS must be running Windows 10 Client, version 2004 and higher (build 19044 and higher) or Windows 11 Client to support the Windows Subsystem for Linux versions that can work with the plug-in.
46
44
47
45
## Software components and installer file names
48
46
@@ -62,31 +60,31 @@ Components installed:
62
60
63
61
## Installation steps
64
62
65
-
If your Windows Subsystem for Linux isn't installed yet, follow these steps:
63
+
If you Windows Subsystem for Linux isn't installed yet, follow these steps:
66
64
67
65
1. Open Terminal or Command Prompt. (In Windows, go to **Start** > **Command Prompt**. Or, right-click the start button and then select **Terminal**.)
68
66
69
67
2. Run the command `wsl -–install`.
70
68
71
-
### Confirm WSL is installed and running
69
+
### 1. Confirm WSL is installed and running
70
+
71
+
1. Using Terminal or Command Prompt, run `wsl –update` to make sure you have the latest version.
72
72
73
-
1. Using Terminal or Command Prompt, run`wsl –update`to make sure you have the latest version.
73
+
2. Run the`wsl` command to ensure WSL is running before testing.
74
74
75
-
2. Run the `wsl` command to ensure WSL is running before testing.
75
+
### 2. Install the plug-in
76
76
77
-
### Install the plug-in
78
77
79
-
After WSL is running and fully up to date, follow these steps to install the plug-in:
78
+
After WSL is running and fully up to date, follow these steps to install the plug-in:
80
79
81
-
1. Install the MSI file downloaded from the onboarding section in the Microsoft Defender portal (**Settings** > **Endpoints** > **Onboarding** > **Windows Subsystem for Linux 2 (plug-in)**.)
80
+
1. Install the MSI file downloaded from the onboarding section in the Microsoft Defender portal (**Settings** > **Endpoints** > **Onboarding** > **Windows Subsystem for Linux 2 (plug-in)**.)
82
81
83
-
2. Open a command prompt/terminal and run `wsl`.
82
+
2. Open a command prompt/terminal and run `wsl`.
84
83
85
84
You can [deploy the package using Microsoft Intune](/mem/intune/apps/lob-apps-windows).
86
85
87
86
> [!NOTE]
88
87
> If `WslService` is running, it stops during the installation process. You do not need to onboard the subsystem separately; instead, the plug-in automatically onboards to the tenant the Windows host is onboarded to.
89
-
90
88
## Installation validation checklist
91
89
92
90
1. After update or installation, wait for at least five minutes for the plug-in to fully initialize and write log output.
@@ -97,7 +95,7 @@ After WSL is running and fully up to date, follow these steps to install the plu
97
95
98
96
4. Run the command `.\healthcheck.exe`.
99
97
100
-
5. Review the details of Defender and WSL and make sure they match or exceed the following requirements:
98
+
5. Review the details of Defender and WSL and make sure they match or exceed the following:
101
99
102
100
-**Defender Plug-in Version**: `0.23.1102.4`
103
101
-**WSL Version**: `2.0.7.0` or later
@@ -108,24 +106,27 @@ After WSL is running and fully up to date, follow these steps to install the plu
108
106
109
107
This section describes how to configure proxy connectivity for the Defender for Endpoint plug-in. If your enterprise uses a proxy to provide connectivity to Defender for Endpoint running on the Windows host, continue reading to determine whether you need to configure it for the plug-in.
110
108
111
-
Reuse the Defender for Endpoint static proxy setting (`TelemetryProxyServer`).
109
+
If you want to use the host [windows EDR telemetry proxy](configure-proxy-internet.md) configuration for MDE for the WSL plug-in, nothing more is required. This configuration is adopted by the plug-in automatically.
112
110
113
-
If you want to use the host [static proxy](configure-proxy-internet.md) configuration for MDE for the WSL plug-in, nothing more is required. This configuration is adopted by the plug-in automatically.
111
+
If you want to use the host [winhttp proxy](https://learn.microsoft.com/defender-endpoint/configure-proxy-internet?view=o365-worldwide#configure-the-proxy-server-manually-using-netsh-command) configuration for MDE for WSL plug-in, nothing more is required. This configuration is adopted by the plug-in automatically.
114
112
115
-
If you want to use the host network and network proxy setting for MDE for WSL plug-in, nothing more is required. This configuration is adopted by the plug-in automatically.
113
+
If you want to use the host [network and network proxy setting](https://support.microsoft.com/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1#ID0EFD=Windows_11) for MDE for WSL plug-in, nothing more is required. This configuration is adopted by the plug-in automatically.
116
114
117
115
## Plug-in Proxy selection
118
116
119
-
If your host machine contains multiple proxy settings, the plug-in selects the proxy configurations with the following hierarchy:
117
+
If your host machine contains multiple proxy settings, the plug-in will select the proxy configurations with the following hierarchy
120
118
121
-
1. Defender for Endpoint static proxy setting (`TelemetryProxyServer`).
119
+
1. Defender for Endpoint static proxy setting (`TelemetryProxyServer`)
122
120
123
-
2.`Winhttp` proxy (configured through `netsh` command).
121
+
2. Winhttp proxy (configured through netsh command)
124
122
125
-
3. Network & Internet proxy settings.
123
+
3. Network & Internet proxy settings
126
124
127
-
Example: If your host machine has both *Winhttp proxy* and *Network & Internet proxy*, the plug-in selects `Winhttp proxy` as the proxy configuration.
125
+
**Example:** If your host machine has both Winhttp proxy as well as Network & Internet proxy, plug-in will select `Winhttp proxy` as the proxy configuration for plug-in.
128
126
127
+
> [!NOTE]
128
+
> The `DefenderProxyServer` registry key is no longer supported. Follow the above mentioned steps to configure proxy in plug-in.
129
+
129
130
## Connectivity test for Defender running in WSL
130
131
131
132
The following procedure describes how to confirm that Defender in Endpoint in WSL has internet connectivity.
@@ -134,24 +135,23 @@ The following procedure describes how to confirm that Defender in Endpoint in WS
134
135
135
136
2. Create a registry key with the following details:
136
137
137
-
-**Name**:`ConnectivityTest`
138
-
-**Type**:`REG_DWORD`
139
-
-**Value**:`Number of seconds plug-in must wait before running test. (Recommended: 60 seconds)`
3. Once the registry is set, restart wsl using the following steps:
143
144
144
-
1. Open Command Prompt and run the command, `wsl --shutdown`.
145
+
1. Open Command Prompt and run `wsl --shutdown`.
145
146
146
147
2. Run the command `wsl`.
147
148
148
149
4. Wait for 5 minutes and then run `healthcheck.exe` (located at `C:\Program Files\Microsoft Defender for Endpoint plug-in for WSL\tools` for the results of the connectivity test).
149
150
150
-
If successful, you can see that the connectivity test was successful.
151
+
If successful, the connectivity test shows success.
151
152
152
153
> [!NOTE]
153
154
> To set a proxy for use in WSL containers (the distributions running on the subsystem), see [Advanced settings configuration in WSL](/windows/wsl/wsl-config).
154
-
155
155
## Verifying functionality and SOC analyst experience
156
156
157
157
After installing the plug-in, the subsystem and all its running containers are onboarded to the [Microsoft Defender portal](https://security.microsoft.com).
@@ -186,7 +186,6 @@ To test the plug-in after installation, follow these steps:
186
186
187
187
> [!NOTE]
188
188
> It takes about 5 minutes for the events to appear on the Microsoft Defender portal
189
-
190
189
Treat the machine as if it were a regular Linux host in your environment to perform testing against. In particular, we would like to get your feedback on the ability to surface potentially malicious behavior using the new plug-in.
191
190
192
191
### Advanced hunting
@@ -246,9 +245,9 @@ DeviceProcessEvents
246
245
4. If you don't see any devices in the Microsoft Defender portal, or you don't see any events in the timeline, check these things:
247
246
248
247
- If you aren't seeing a machine object, make sure sufficient time has passed for onboarding to complete (typically up to 10 minutes).
249
-
248
+
250
249
- 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?)
251
-
250
+
252
251
- Use the health check tool to provide an overview of overall plug-in health. Open Terminal, and run the `healthcheck.exe` tool from `C:\Program Files\Microsoft Defender for Endpoint plug-in for WSL\tools`.
253
252
254
253
:::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":::
@@ -269,26 +268,28 @@ DeviceProcessEvents
269
268
270
269
:::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":::
271
270
272
-
6. Microsoft Defender Endpoint for WSL supports Linux distributions running on WSL 2. If they're associated with WSL 1, you might encounter issues. Therefore, it is advised to disable WSL 1. To do so with the Intune policy, perform the following steps :
271
+
6. Microsoft Defender Endpoint for WSL supports Linux distributions running on WSL 2. If they are associated with WSL 1, you may face issues. Therefore, it is advised to disable WSL 1. To do so with the Intune policy, perform the following steps :
273
272
274
273
1. Navigate to your Microsoft Intune admin center portal.
275
274
276
-
2. Go to **Devices** > **Configuration Profiles** > **Create** > **New Policy**.
275
+
2. Go to Devices -> Configuration Profiles -> Create -> New Policy.
276
+
277
+
3. Select Windows 10 and later -> Settings catalog.
277
278
278
-
3. Select **Windows 10 and later** > **Settings catalog**.
279
+
4. Create a name for the new profile and search for “Windows Subsystem for Linux” to see and add the full list of available settings.
279
280
280
-
4. Create a name for the new profile, and search for **Windows Subsystem for Linux**to see and add the full list of available settings.
281
-
282
-
5. Set the **Allow WSL1** setting to **Disabled**, to ensure that only WSL 2 distributions can be used.
281
+
5. Set the Allow WSL1 setting to Disabled.
282
+
283
+
This will ensure only WSL 2 distributions can be used.
283
284
284
285
Alternately, if you want to keep using WSL 1, or not use the Intune Policy, you can selectively associate your installed distributions to run on WSL 2, by running the command in PowerShell:
285
-
286
+
286
287
```powershell
287
288
wsl --set-version <YourDistroName> 2
288
289
```
289
290
290
291
To have WSL 2 as your default WSL version for new distributions to be installed in the system, run the following command in PowerShell:
0 commit comments