Skip to content

Commit

Permalink
Update mde-plugin-wsl.md
Browse files Browse the repository at this point in the history
  • Loading branch information
denisebmsft authored Nov 11, 2024
1 parent 2668c8b commit 7a63053
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions defender-endpoint/mde-plugin-wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,19 @@ Windows Subsystem for Linux (WSL) 2, which replaces the previous version of WSL

Be aware of the following considerations before you start:

1. The plug-in doesn't support automatic updates on versions prior to `1.24.522.2`. On version `1.24.522.2` and later, updates are supported through Windows Update across all rings. Updates through Windows Server Update services (WSUS), System Center Configuration Manager (SCCM) and Microsoft Update catalog are supported only in the Production ring to ensure package stability.
- The plug-in doesn't support automatic updates on versions prior to `1.24.522.2`. On version `1.24.522.2` and later. Updates are supported through Windows Update across all rings. Updates through Windows Server Update Services (WSUS), System Center Configuration Manager (SCCM), and Microsoft Update catalog are supported only in the Production ring to ensure package stability.

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.
- 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)). When any distribution has been running long enough (at least 30 minutes), it does show up.

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).
- 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 blocking such configurations with [Microsoft Intune wsl settings](/windows/wsl/intune).

4. The plug-in is not supported on machines with ARM64 processor.
- The plug-in is not supported on machines with an ARM64 processor.

5. 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.
- 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.

## Software prerequisites

- WSL version 2.0.7.0 or later must be running with at least one active distro.

Run `wsl --update` to make sure you are on the latest version. If `wsl -–version` shows a version older than `2.0.7.0`, run `wsl -–update –pre-release` to get the latest update.
- WSL version `2.0.7.0` or later must be running with at least one active distro. Run `wsl --update` to make sure you are on the latest version. If `wsl -–version` shows a version older than `2.0.7.0`, run `wsl -–update –pre-release` to get the latest update.

- The Windows client device must be onboarded to Defender for Endpoint.

Expand Down Expand Up @@ -142,9 +140,9 @@ For example, if your host machine has both `Winhttp proxy` and `Network & Intern
> [!NOTE]
> The `DefenderProxyServer` registry key is no longer supported. Follow the steps described earlier in this article to configure proxy in plug-in.
## Connectivity test for Defender running in WSL
## Connectivity test for Defender for Endpoint running in WSL

The defender connectivity test is triggered whenever there is a proxy modification on your device and is scheduled to run every hour.
The Defender for Endpoint connectivity test is triggered whenever there is a proxy modification on your device and is scheduled to run every hour.

On starting your wsl machine, wait for 5 minutes and then run `healthcheck.exe` (located at `%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools` for the results of the connectivity test). If successful, you can see that the connectivity test was a success. If failed, you can see that the connectivity test was `invalid` indicating that the client connectivity from MDE plug-in for WSL to Defender for Endpoint service URLs is failing.

Expand Down Expand Up @@ -258,12 +256,11 @@ DeviceProcessEvents

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:

- In Control Panel, go to **Programs** > **Programs and Features**.

- Search for and select **Microsoft Defender for Endpoint plug-in for WSL**. Then select **Repair**. This action should fix the problem by placing the right files in the expected directories.
1. In Control Panel, go to **Programs** > **Programs and Features**.

:::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":::
2. Search for and select **Microsoft Defender for Endpoint plug-in for WSL**. Then select **Repair**. This action should fix the problem by placing the right files in the expected directories.

:::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":::

### The command `healthcheck.exe` shows the output, "Launch WSL distro with 'bash' command and retry in five minutes."

Expand Down Expand Up @@ -371,15 +368,15 @@ Collect the networking logs by following these steps:

Microsoft Defender Endpoint plug-in for WSL supports Linux distributions running on WSL 2. If they're associated with WSL 1, you might encounter issues. Therefore, it's advised to disable WSL 1. To do so with the Intune policy, perform the following steps:

1. Go to your [Microsoft Intune admin center](https://intune.microsoft.com).
1. Go to your [Microsoft Intune admin center](https://intune.microsoft.com).

2. Go to **Devices** > **Configuration Profiles** > **Create** > **New Policy**.
2. Go to **Devices** > **Configuration Profiles** > **Create** > **New Policy**.

3. Select **Windows 10 and later** > **Settings catalog**.
3. Select **Windows 10 and later** > **Settings catalog**.

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.
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.

5. Set the **Allow WSL1** setting to **Disabled**, to ensure that only WSL 2 distributions can be used.
5. Set the **Allow WSL1** setting to **Disabled**, to ensure that only WSL 2 distributions can be used.

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:

Expand Down

0 comments on commit 7a63053

Please sign in to comment.