How to Fix MSDT Vulnerability using SCCM and Intune | CVE-2022-30190
Tags: applicationsecurity, poc
Published: 2022-10-29 05:25:46

---
title: How to Fix MSDT Vulnerability using SCCM and Intune | CVE-2022-30190
published: true
date: 2022-10-29 12:59:00 UTC
tags: ApplicationSecurity,Poc
canonical_url: https://tutorialboy24.blogspot.com/2022/06/how-to-fix-msdt-vulnerability-using.html
---

 

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCoCcWgwlnvLjD3dHSSOXTG8Wma7ygPZwbFwGkPTv_fULyr_9vzEzS0XuOmYNRNYf9NdfyIb1zPDt395wC1cnVM3wFWtGYmeA-BEnTI51gQPtGrZXMNzrxT63DJCGGVFDoXm1EElJHYZ5TKIN2k4nrr3NNto9aMOgAIuZ6smXsmcgjdI7ydQH247N64A/w640-h360/in%20just%201%20week.png)

Source :- https://tutorialboy24.blogspot.com/2022/06/how-to-fix-msdt-vulnerability-using.html

## Introduction

Let’s check how to FIX MSDT Vulnerability using SCCM and Intune (CVE-2022-30190). You can use Intune or SCCM or Group Policy to fix this vulnerability Microsoft Support Diagnostic Tool (MSDT) URL protocol.

The CVE-2022-30190 Vulnerability is to deal with Windows Support Diagnostic Tool via MS Office files. A remote code execution vulnerability exists when MSDT is called using the URL protocol from a calling application such as Word.

You can use the SCCM application to fix the Remote Code Execution Vulnerability as discussed in the second part of this post -> SCCM To Fix New Remote Code Execution Vulnerability In MSHTML Component. The Group Policy or Intune Settings Catalog are the two options to disable the access to run Troubleshooting Wizards.

I have shared a similar fix for remote code execution vulnerability in the MSHTML component, and a similar fix with Intune is also available -> Deploy the registry fix using Intune Win32 App.

Another method can be used to fix similar vulnerabilities using SCCM CI and Baseline. The method uses Powershell Script for File Detection in User Profile and Rerun Discovery Script.

# What is MSDT?

Microsoft Support Diagnostic Tool (MSDT) collects information from hosts running Microsoft Windows client and Windows Server to send to Microsoft Support. This is one of the common tools used for troubleshooting office 365 applications such as Word, Excel, etc.

## Manual FIX to MSDT Vulnerability

You can manually fix the MSDT vulnerability using the registry as explained below. The registry is going to disable the MSDT URL protocol. Follow these steps to disable:

  

- Run Command Prompt as Administrator.

- To back up the registry key, execute the command “reg export HKEY\_CLASSES\_ROOT\ms-msdt MSDT\_URL\_Protocol.reg“

- Execute the command to delete registry key ms-msdt from registry “reg delete HKEY\_CLASSES\_ROOT\ms-msdt /f”.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEgMRB-sfGBbZ0M_7jNe2EBRe3PQYX-yOowcVAWsoSbLqQv_v4U7QzM-Nb5nd4UR240LRjzAn_lZbBwxEdfADHMUiF9x9cMMVMF-uod2JtL42dmKVwLMgwGkzl24bD52sJOJOC7gn0lhywjbpdfJ6JgpgRG8NKY7Z7VWGtMxh8VU2xXN_ib4xkk5AEX2bg=w640-h208)](https://blogger.googleusercontent.com/img/a/AVvXsEgMRB-sfGBbZ0M_7jNe2EBRe3PQYX-yOowcVAWsoSbLqQv_v4U7QzM-Nb5nd4UR240LRjzAn_lZbBwxEdfADHMUiF9x9cMMVMF-uod2JtL42dmKVwLMgwGkzl24bD52sJOJOC7gn0lhywjbpdfJ6JgpgRG8NKY7Z7VWGtMxh8VU2xXN_ib4xkk5AEX2bg)
  

You can revert the workaround by restoring the registry keys, as mentioned in the following step.

- Run Command Prompt as Administrator.

- To restore the registry key, execute the command “reg import  MSDT\_URL\_Protocol.reg” 

## Intune Settings Catalog Policy to FIX MSDT Vulnerability

Let’s check Intune Settings Catalog Policy to FIX MSDT Vulnerability. You can also use the Win32 app deployment method to fix this vulnerability using the registry fix method.

  

I recommend using the Settings catalog policy to fix the MSDT vulnerability issue. Follow the steps to create and deploy the fix to the Azure AD Device group.

- Sign in to the Microsoft Endpoint Manager admin center

- Select Devices > Configuration profiles > Create profile.

- Select Platform: Windows 10 and later and Profile

- Select Settings catalog (preview). Click on Create button.

- Enter the Name of the Policy and Description.

- Disable MSDT Troubleshooting and Diagnostics

- You can click on the Next button to continue and select the settings.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEhbwK-CZPYJOc_z2C4KNjbvrm9wd0eEShHAy7nFo4mZ5ble38SOrLdIDg579TLNpd1Ie9w2FNgNB_yZvCkyPzycB9KqKEmLeFZnDWWs2uL_RqcQW8vR0a2r00-MnwEkyyVXBbbn85yC0CNafT144SeY7ysZtxqlyasW4WYruPF0vk7MwA6_TvJVqCwlrA=w640-h254)](https://blogger.googleusercontent.com/img/a/AVvXsEhbwK-CZPYJOc_z2C4KNjbvrm9wd0eEShHAy7nFo4mZ5ble38SOrLdIDg579TLNpd1Ie9w2FNgNB_yZvCkyPzycB9KqKEmLeFZnDWWs2uL_RqcQW8vR0a2r00-MnwEkyyVXBbbn85yC0CNafT144SeY7ysZtxqlyasW4WYruPF0vk7MwA6_TvJVqCwlrA)
  
  

The following Intune policy setting allows users to access and run the troubleshooting tools that are available in the Troubleshooting Control Panel and to run the troubleshooting wizard to troubleshoot problems.

  

From the Configuration settings page, select Add settings. Try searching Troubleshooting and Diagnostics from the Search box under Settings Picker and click on the Search button.

  

- Click on Administrative Templates/System/Troubleshooting and Diagnostics/Scripted Diagnostics.

- Select the settings name -> Troubleshooting: Allow users to access and run Troubleshooting Wizard.

- Enable the Slider to disable the access to run the Troubleshooting wizard.

You need to click on the NEXT button to continue with the creation and deployment (assignment of the policy).

  

If you enable or do not configure this policy setting, users can access and run the troubleshooting tools from the Troubleshooting Control Panel.

  

**NOTE!** – If you disable this policy setting, users cannot access or run the troubleshooting tools from the Control Panel. Note that this setting also controls a user’s ability to launch standalone troubleshooting packs such as those found in .diagcab files.
  

[![](https://blogger.googleusercontent.com/img/a/AVvXsEhBs7iwBwJprdoqyMOm6Pv4lylBQttNHDvM3m0UASIbfTt34K9p25HZrbAounCY6axDqfE704rUVoU-uIuP8u-MaKfAVqSEZWiCank1MXNS8YHO9XpB7ZbDDCsZuWR_TlqHGAKc3G9k9v7js3XZElCsrHBgbguDuRlmW4vENxzFgqzCKNUpsREKld5Pyw=w640-h266)](https://blogger.googleusercontent.com/img/a/AVvXsEhBs7iwBwJprdoqyMOm6Pv4lylBQttNHDvM3m0UASIbfTt34K9p25HZrbAounCY6axDqfE704rUVoU-uIuP8u-MaKfAVqSEZWiCank1MXNS8YHO9XpB7ZbDDCsZuWR_TlqHGAKc3G9k9v7js3XZElCsrHBgbguDuRlmW4vENxzFgqzCKNUpsREKld5Pyw)
  

You need to configure another more accurate policy to disable MSDT tool functionality rather than all troubleshooting wizards. I would recommend testing both the policies and take a collective decision.

  

**Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with a support provider.**

  

This policy setting configures the interactive communication of the Microsoft Support Diagnostic Tool (MSDT) with the support provider. MSDT gathers diagnostic data for analysis by support professionals. If you enable this policy setting, users can use MSDT to collect and send diagnostic data to a support professional to resolve a problem.

  

By default, the support provider is set to Microsoft Corporation. If you disable this policy setting, MSDT cannot run in support mode, and no data can be collected or sent to the support provider.

  

Try searching Microsoft Support Diagnostic Tool from the Search box under Settings Picker and click on the Search button.

- Click on Administrative Templates/System/Troubleshooting and Diagnostics/Microsoft Support Diagnostic Tool.

- Select the settings name ->Microsoft Support Diagnostic Tool: Turn on MSDT interactive communication with a support provider.

- Enable the slider to disable the access to run the MSDT in support mode.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEiCBQowcsw65yXURocudSk6-YkBw9g9CQNvUS14ZMcqULYRSur6wiHfDvNLlUk-k9PsB7bjW8G5j5hur6qN6nfPMihtIfV4SyXUyl2hfz2FwFRIvWBt6-G-faeY1MAT5P7c9LFCj5Or9H6KhqKEWH9zdEw_1lt5XlMnOB9kCwYfsTrgUb5iU8efs5BgoQ=w640-h294)](https://blogger.googleusercontent.com/img/a/AVvXsEiCBQowcsw65yXURocudSk6-YkBw9g9CQNvUS14ZMcqULYRSur6wiHfDvNLlUk-k9PsB7bjW8G5j5hur6qN6nfPMihtIfV4SyXUyl2hfz2FwFRIvWBt6-G-faeY1MAT5P7c9LFCj5Or9H6KhqKEWH9zdEw_1lt5XlMnOB9kCwYfsTrgUb5iU8efs5BgoQ)
  

## Group Policy Method to FIX MSDT Vulnerability

Let’s check the Group Policy settings to FIX the MSDT Vulnerability. This method is not documented as part of an official workaround. This could be because this group policy setting will disable all the troubleshooting tools from the control panel/settings app.

  

This policy setting configures how troubleshooting for known problems can be applied on the device and lets administrators configure how it’s applied to their domains/IT environments.

- Not configuring this policy setting will allow the user to configure how troubleshooting is applied.

- Enabling this policy allows you to configure how troubleshooting is applied on the user’s device.

- Disabling the policy disables all the troubleshooting tools on the device.

  

You can launch GPEDIT.MSC tool and navigate to Configuration -> Administrative Templates -> System -> Troubleshooting and Diagnostics -> Scripted Diagnostics node.

  

Select the DISABLED option as shown in the below screenshot for the policy called Troubleshooting: Allow users to access recommended troubleshooting for known problems.

  

[![](https://blogger.googleusercontent.com/img/a/AVvXsEh3-4Rn-u8c6puOE9kSJoQnn9fU2FRC132MUHjNtGGFDgQVPdRaGMSIkBorSI3s3r-yTnj_PGq9wdUXzo8Bc8Ps08oMdocNEhk5ddCPi3jrtiSE3034E7tiyfHK7wtbTynaRp5z3Gx2fJHLjpIin0xSGBY8sqwlF0hZ6HC-cRNiQLEvSgPrxXfTEnisWA=w640-h326)](https://blogger.googleusercontent.com/img/a/AVvXsEh3-4Rn-u8c6puOE9kSJoQnn9fU2FRC132MUHjNtGGFDgQVPdRaGMSIkBorSI3s3r-yTnj_PGq9wdUXzo8Bc8Ps08oMdocNEhk5ddCPi3jrtiSE3034E7tiyfHK7wtbTynaRp5z3Gx2fJHLjpIin0xSGBY8sqwlF0hZ6HC-cRNiQLEvSgPrxXfTEnisWA)
  

Another policy setting, Microsoft Support Diagnostic Tool: Configure Execution Level, determines the execution level for Microsoft Support Diagnostic Tool. Microsoft Support Diagnostic Tool (MSDT) gathers diagnostic data for analysis by support professionals.

  

If you disable this policy setting, MSDT cannot gather diagnostic data. This will help to fix the issue with MSDT vulnerability.

  

[![](https://blogger.googleusercontent.com/img/a/AVvXsEj64df_l4gu1gTdzThGm8sHabdE9b6WQ2F4hyu0A7jHUVhJJlo8xwLZs3AU0xC59qQgxqBiY8FfSTF9HEfVAdfbU1yZk-1lF2g9_QYUBAboAHmtoc6oAHjHzGnrp_6PHCIh-es8S1cMsxr_Y45cGh1ODuIxvAtoyOmg4uquAmpGspvusu6tyL2x1-0yMg=w640-h312)](https://blogger.googleusercontent.com/img/a/AVvXsEj64df_l4gu1gTdzThGm8sHabdE9b6WQ2F4hyu0A7jHUVhJJlo8xwLZs3AU0xC59qQgxqBiY8FfSTF9HEfVAdfbU1yZk-1lF2g9_QYUBAboAHmtoc6oAHjHzGnrp_6PHCIh-es8S1cMsxr_Y45cGh1ODuIxvAtoyOmg4uquAmpGspvusu6tyL2x1-0yMg)
  

## SCCM Application Method to FIX Vulnerability

You need to use the SCCM application model to deploy the batch file to all the devices. You can then use SCCM CI to track the vulnerability. You can use the following script.

  

- Launch ConfigMgr Console

- Navigate to \Software Library\Overview\Application Management\Applications

- Right Click on the Applications node

- Select Create Application

- Select the option called “Manually specify the application information. “

- Click on the Next button and enter the name and other details of the application.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEiI3-SOIAK7rJJxYl5c9XhMkpLExDQ5mXYjx1O6Rrm3bxczDMR_tVq9AbWw3pmjz9tR45jgOYko5xPNelKu1gjSnXX6lSz8U1TDHVMEO095rzpLrlbtPkNdAz49N0J6gw80S0wrMzbTiaby5lAVmh8pl0FBz4bCl4pVxrL4qS1V7azMw_ldgAxPc7DZEw=w640-h569)](https://blogger.googleusercontent.com/img/a/AVvXsEiI3-SOIAK7rJJxYl5c9XhMkpLExDQ5mXYjx1O6Rrm3bxczDMR_tVq9AbWw3pmjz9tR45jgOYko5xPNelKu1gjSnXX6lSz8U1TDHVMEO095rzpLrlbtPkNdAz49N0J6gw80S0wrMzbTiaby5lAVmh8pl0FBz4bCl4pVxrL4qS1V7azMw_ldgAxPc7DZEw)
  

You can use the following batch file to fix the vulnerability with MSDT. Save the following as MSDT\_FIX.cmd.

```
MD C:\Windows\Temp\MSDTPUSHD C:\Windows\Temp\MSDTreg export HKEY_CLASSES_ROOT\ms-msdt MSDT_URL_Protocol.regreg delete HKEY_CLASSES_ROOT\ms-msdt /f@echo 1.0>C:\Windows\Temp\MSDT\Ver1.0.txt
```

Ensure you have saved the registry file as mentioned in the above section. You can use the following command as an installation program.

- Enter the name of the application you want to deploy – FIX MSDT Vulnerability

- Enter the Publisher Name – HTMD

- Click on the NEXT to continue

- Click on Browse in the Software Center tab to select the Software Center ICON for this FIX.

- Click on the Next button once the FIX ICON is uploaded
On the Deployment Types page, you need to provide the following details. Deployment Types include information about the installation method and the source files for the application.

- Click on ADD button to configure the FIX MSDT Vulnerability application.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEgylZUwhHb_YCAZj1_KrqX_ou1s15DvBp609c0o3jBPzu6vbHCPZrFpz_O4aerskIo4VQMx6GAkUqggolJzcCBzcDONZFq45j7yGafgo8MAsOr-qEfs4waU6UUP7nG0f9kEw-1F1CTUVviLtaRSrfiLPW8nMTQa_yt1JWDgBo1uukUMUIEnoQg2UkJu_g=w640-h589)](https://blogger.googleusercontent.com/img/a/AVvXsEgylZUwhHb_YCAZj1_KrqX_ou1s15DvBp609c0o3jBPzu6vbHCPZrFpz_O4aerskIo4VQMx6GAkUqggolJzcCBzcDONZFq45j7yGafgo8MAsOr-qEfs4waU6UUP7nG0f9kEw-1F1CTUVviLtaRSrfiLPW8nMTQa_yt1JWDgBo1uukUMUIEnoQg2UkJu_g)
  
  

Specify the settings for this deployment type. Type of the Application – Script Installer. Manually specify the deployment type information option will be automatically selected.

 

Specify general information for this deployment type

- Deployment Type Name – FIX MSDT Vulnerability.

- Language – Select English.

- Click on the NEXT button to continue.
You need to provide the content location. In this scenario, it’s only the CMD file created above. This CMD file contains a batch file to delete the registry key that causes the vulnerability.

- Content Location -> \ADMEMCM\Source\Package Source\FIX MSDT

- Install Program -> MSDT\_FIX.cmd

- Click on the NEXT button to continue.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEild1oWHR1QD0qsCr9xzxbnBcaGpI_f6n6NazMEjU2DQ5BOlW2kEkL93xgm4u8ILQsUyyCngNQ33mqQyc7fl_CY5GxWx7J6Y129AeYDzVljTlRx1XtZ0I6duuU3E8z2LnW64l2WKy8l5yVXBw_GOhMVPMQo7Z5Tz3pyypfDJw4A9Gk-vxk6_N-Z6ExGPA=w640-h330)](https://blogger.googleusercontent.com/img/a/AVvXsEild1oWHR1QD0qsCr9xzxbnBcaGpI_f6n6NazMEjU2DQ5BOlW2kEkL93xgm4u8ILQsUyyCngNQ33mqQyc7fl_CY5GxWx7J6Y129AeYDzVljTlRx1XtZ0I6duuU3E8z2LnW64l2WKy8l5yVXBw_GOhMVPMQo7Z5Tz3pyypfDJw4A9Gk-vxk6_N-Z6ExGPA)
  
  

Specify the Detection Method of this deployment type. I have to select the file name created as part of the batch file script. The file path and name are below -> FIX MSDT Vulnerability using SCCM and Intune CVE-2022-30190 6Ver1.0.txt.

- Click on Add Clause to add the detection method.

- Setting Type -> File System.

- Type -> File.

- Path -> %Windir%\Temp\MSDT

- File or Folder Name -> Ver1.0.txt

- Click on the OK and then the NEXT buttons to continue.

[![](https://blogger.googleusercontent.com/img/a/AVvXsEjJRy9gKDmOz25epoCBW3gAKqfjmcrYqrRzP5BK1zZ1owv9ZWPiF8eB9EK79hQEFoAEGRUhL9uWkGNTosUikj1Iu7uW8N7rC0d11mCPNWa-Mxi5Wh7m_lQTYHDsfInEUxMsqYnOZuRiB21AUErockKtZLEx4_YK8X-mCvawf9i4JEi6rjQO80KQbx1zGg=w640-h208)](https://blogger.googleusercontent.com/img/a/AVvXsEjJRy9gKDmOz25epoCBW3gAKqfjmcrYqrRzP5BK1zZ1owv9ZWPiF8eB9EK79hQEFoAEGRUhL9uWkGNTosUikj1Iu7uW8N7rC0d11mCPNWa-Mxi5Wh7m_lQTYHDsfInEUxMsqYnOZuRiB21AUErockKtZLEx4_YK8X-mCvawf9i4JEi6rjQO80KQbx1zGg)
  

You can select installation behavior as install this application for System. You can configure the rest of the settings as shown in the below screenshot.

  

[![](https://blogger.googleusercontent.com/img/a/AVvXsEiNo8c6nRM1fJHqDe0RlwdPtPmNX6n-67iH3OWZjscUwRHStC79PYhqVDm06kzES1Vvt9hOcNJqXfO01BPQpTj8FTDLbvAOC34ZxnVbB11eKsy7h-R7dvyykZ2H3tWo7FjlpzMdEGMY4UL5IE8PDnZlrtNpWXpAP5wWsb5k1e-9AcoYa9bYOJ8PN8NP2Q=w640-h374)](https://blogger.googleusercontent.com/img/a/AVvXsEiNo8c6nRM1fJHqDe0RlwdPtPmNX6n-67iH3OWZjscUwRHStC79PYhqVDm06kzES1Vvt9hOcNJqXfO01BPQpTj8FTDLbvAOC34ZxnVbB11eKsy7h-R7dvyykZ2H3tWo7FjlpzMdEGMY4UL5IE8PDnZlrtNpWXpAP5wWsb5k1e-9AcoYa9bYOJ8PN8NP2Q)
  

The following is the summary of the SCCM Application to fix MSDT Vulnerability. You can distribute the content to the DPs and then deploy it to the Device Collection.

  

```
 General Information:•	Name: FIX MSDT Vulnerability•	Technology: Windows Installer (*.msi file)•	Administrator comments:•	Languages: Content:•	Content location: \\ADMEMCM\Source\Package Source\FIX MSDT•	Persist in client cache: No•	Installation program: MSDT_FIX.cmd•	Installation start in: Detection Method: User Experience:•	Installation behavior: Install for system•	Login requirement: Whether or not a user is logged on•	Installation priority: Hidden•	Allow users to interact with this program: No•	Maximum allowed run time (minutes): 120•	Estimated install time (minutes): 0 Requirements: Dependencies:
  

```

  

Source :- https://tutorialboy24.blogspot.com/2022/06/how-to-fix-msdt-vulnerability-using.html