How Tanium Can Help with CVE-2021-40444 Microsoft MSHTML ActiveX Vulnerability
Overview
On September 7, 2021, Microsoft released guidance about a vulnerability affecting MSHTML - a proprietary browser engine used by Internet Explorer and other applications including Microsoft Office. This vulnerability can allow remote code execution on all supported versions of Microsoft Windows if a user opens a malicious Office document. US CERT and the Australian Cyber Security Centre released advisories recommending immediate action due to known exploits in the wild.
As of September 8, Microsoft issued guidance to prevent exploitation of this vulnerability using registry entries to control ActiveX. Using this guidance allows previously installed ActiveX controls to continue to run. However, new ActiveX controls cannot be added. Additionally, Microsoft reported customers using Microsoft Defender with detection build 1.349.22.0 will be protected against the attack. However, security expert Kevin Beaumont reported that this may be unreliable.
Microsoft has released patches for this vulnerability on September 2021’s Patch Tuesday.
This article will describe how Tanium can help you find, monitor, and mitigate the vulnerability.
Finding the Issue
Interact
To identify systems that lack the Microsoft-recommendedworkarounds, you can use the following questions in Interact:
To find systems missing the CVE-2021-40444 Patches, you can leverage Tanium Comply, or the following Interact question:
Get Computer Name and Operating System and File Version[%windir%\system32\mshtml.dll] from all machines with ( File Exists[%windir%\system32\mshtml.dll] contains file exists and ( ( Operating System Build Number equals 6003 and File Version[%windir%\system32\mshtml.dll] < 9.0.8112.21591 ) or ( ( Operating System Build Number equals 7601 and File Version[%windir%\system32\mshtml.dll] < 11.0.9600.20120 ) or ( ( Operating System Build Number equals 9200 and File Version[%windir%\system32\mshtml.dll] > 11.0 and File Version[%windir%\system32\mshtml.dll] < 11.0.9600.20120 ) or ( ( Operating System Build Number equals 9600 and File Version[%windir%\system32\mshtml.dll] < 11.0.9600.20120 ) or ( ( Operating System Build Number equals 10240 and File Version[%windir%\system32\mshtml.dll] < 11.0.10240.19060 ) or ( ( Operating System Build Number equals 14393 and File Version[%windir%\system32\mshtml.dll] < 11.0.14393.4651 ) or ( ( Operating System Build Number equals 17763 and File Version[%windir%\system32\mshtml.dll] < 11.0.17763.2183 ) or ( ( Operating System Build Number equals 18363 and File Version[%windir%\system32\mshtml.dll] < 11.0.18362.1801 ) or ( ( Operating System Build Number matches 19041|19042|19043 and File Version[%windir%\system32\mshtml.dll] < 11.0.19041.1237 ) or ( Operating System Build Number equals 20348 and File Version[%windir%\system32\mshtml.dll] < 11.0.20348.230 ) ) ) ) ) ) ) ) ) ) )
To find systems without the recommended registry values, use the following question:
Get Computer Name and Operating System from all machines with ( Is Windows contains True and ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1001] matches "(?!(.*3.*)).*" or all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1004] matches "(?!(.*3.*)).*" ) ) ) ) ) ) ) )
Tanium Interact – Custom Content Alternatively, Tanium has custom content available to help identify endpoints that are not utilizing the mitigation. The custom sensor returns whether a system has the IE ActiveX mitigation applied and eliminates the need to customize an Interact question. For customers that can import content, the attached file CVE-2021-40444 – IE ActiveX Status.xmlNo Content found for /db/organizations/tanium/repositories/master/content/documents/guardian/CVE-2021-40444_-_IE_ActiveX_Status.xml will provide you with this content. For customers that cannot import content but can create their own sensors, the attached file CVE-2021-40444 – IE ActiveX Status.vbs can be used to create the sensor yourself. (Click links to download, or scroll down to the article comments to access these files)
Comply
Tanium Comply is the recommended way to check for this vulnerability. Tanium Comply customers can build a Comply vulnerability assessment for CVE-2021-40444.
At the time of this writing, the National Vulnerability Database has not issued a score for CVE-2021-40444. Customers are advised to review their Comply report settings to ensure they are including unscored “Info” vulnerabilities to ensure coverage for Zero Day attacks.
To Update the TVL
Review the documentation here.
To Build a Vulnerability Assessment
Follow the instruction in the Tanium documentation for Create a vulnerability assessment. To customize this report specifically for CVE-2021-40444 only, ensure you have selected the following:
-
Select All Windows as your Computer Groups to Target
-
Select Windows as the Platform
-
Select the Tanium Scan Engine as the Engine
-
Select Windows 10 as the Operating System
-
Indicate CVE-2021-40444 in the field for List of Individual CVEs
Threat Response
Tanium’s examination of malicious file samples has identified opportunities to correlate parent-child process behavior and commands associated with the attack vector. This behavioral analysis offers opportunities to detect even as malicious actors manipulate the already-identified samples when signature-based detection may fail.
The high-level overview of the behavior begins when a victim opens a maliciously crafted document containing metadata instructing it to download a .html file (over unencrypted HTTP traffic). The .html files contain JavaScript that is automatically executed to download a .CAB file. A .dll file is extracted from that .CAB file resulting in the execution of the desired payload. As attackers modify their post-exploitation choices, different types of payloads including beacons, ransomware, or Trojans could be executed. It has already been reported that this vulnerability can be exploited through .rtf files, which have no protection from Office’s “Protected Mode” to prevent immediate execution.
Tanium Threat Response may be able to detect activity related to this exploit. The Signal definition below can be used to detect post exploitation activity seen related to this vulnerability. (source):
process.path ends with ‘\control.exe’ AND process.command_line contains ‘.cpl:’
Another example of a Tanium signal that evaluates the parent/child relationship and inclusion of .inf files seen in Tanium-evaluated malicious samples is:
process.parent_path contains 'control.exe' AND process.parent_command_line contains '.inf' AND process.command_line contains 'rundll32.exe' AND process.command_line contains '.inf'
Yara rules and other indicators of compromise (IOCs) can be imported, tested, and scanned against active memory or targeted locations.
Scanning against all active memory can have a performance impact. Be sure to test intelligence on a subset of machines prior to using against all production systems.
Monitoring the Issue in Trends
To report on vulnerable systems running Windows (All Versions), create the following source in Trends:
Create or edit an existing board (adding a section) with panel using the newly created data source:
A custom sensor is provided in this article - CVE-2021-40444 - IE ActiveX Status.xmlExample of a Bar Chart with 2 values returned by the custom sensor• IE ActiveX Installation Allowed• IE ActiveX Installation Not Allowed
A pre-configured Trends board titled Common Vulnerabilities and Exposures (CVEs) is attached to this article. You can import it into your environment. The board contains six panels, two that rely on the Registry Value sensor that is available out-of-the-box, two that require the custom sensor CVE-2021-40444 - IE ActiveX Status.xml and two that requires Tanium Comply 2.10 to be installed. If a required sensor is not present at the time of import, the corresponding panels will not be imported.
Steps to Import a Board:1. Obtain the custom sensor and import it before moving forward.2. Download the Trends board: tanium-trends-board-common-vulnerabilities-and-exposures-cvesV2.json. Click this link to download, or you can find it attached to a comment below the article.3. From the Trends workbench, navigate to the Boards page.4. Click on the three-dot icon to expand, then select Import File.5. Browse for the json file and select Open.6. In the Import Boards modal, select the appropriate panels:
a. Custom sensor is installed: IE ActiveX Installation and IE ActiveX Installation - Last 7 Daysb. Custom sensor is not installed: Vulnerabilities Found and Vulnerabilities Found – Last 7 Daysc. Tanium Comply 2.10 is installed: Comply – Vulnerability Found and Comply Vulnerability found – Last 7 Days
Example when importing when custom sensor not present:
7. Click Validate to check for existing boards, panels, sensors, and sources.8. Click Import. If the board already exists in your environment, any new sections or panels will be merged with the existing board.
**Mitigating the Issue**
Patch
As of September 14, 2021, Microsoft has released patches for this vulnerability. Ensure that you have an applicable Patch Scan to evaluate for this CVE. Please see the documentation for setting Patch list rules here. If you do not already have a patch deployment that includes this set of updates, you can create a one-time deployment by following these instructions:1. Navigate to Patch > Deploy Patches > New Install Deployment
a. Name: CVE-2021-40444 Patchingb. Platform: Windowsc. Content Set: Patch Content Set
2. Select Add Patches Manually
a. Filter on CVE-2021-40444b. Select the three that return to account for all operating systems impacted
3. Set Targeting Criteria. Example: All Windows4. Choose an existing or custom deployment template and preferences.5. Show Preview to Continue6. Issue deployment.
Interact
Tanium can deploy the mitigating registry changes with the built-in Registry – Set Value package for each registry value you wish to set. Alternatively, a single, custom package can be created to deploy a .reg file, provided by Microsoft, just like you would execute locally on an individual host. You can then run this on all Windows endpoints.
To mitigate the issue, first ask a Tanium Interact question which shows endpoints without the mitigated value and that fall under the scope of the change. As with any change, these should be rolled out in phases where possible as it could break new ActiveX application requirements.
Then, either run a Registry – Set Value action for each value to configure or use the custom package you preconfigured.
Preconfiguring a package to make all changes at once Use the following steps to createNo Content found for /db/organizations/tanium/repositories/master/content/documents/userguides/platform_user/authoring_packages.dita a preconfigured package that can be used to make all registry changes at once:
-
Create a cve202140444.reg file containing the Microsoft recommended registry changes. The file should contain the following contents:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0]"1001"=dword:00000003"1004"=dword:00000003 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1]"1001"=dword:00000003"1004"=dword:00000003 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2]"1001"=dword:00000003"1004"=dword:00000003 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]"1001"=dword:00000003"1004"=dword:00000003
-
Create a custom Tanium package that runs a command such as “cmd /c reg import cve202140444.reg”
-
Ask a Tanium question to identify the hosts with the missing registry changes you wish to reconfigure, and select “True”, then click Deploy Action. Below is the Tanium question you can use:
Get Online from all machines with ( Is Windows contains True and ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2,1001] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2,1004] matches "(?!(.*3.*)).*" or ( all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1001] matches "(?!(.*3.*)).*" or all Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1004] matches "(?!(.*3.*)).*" ) ) ) ) ) ) )
Example showing a user targeting impacted systems and clicking Deploy Action:
-
Confirm that the hosts have made the modification as expected by re-asking the Tanium question above. Note: the default Max Age value of Registry Key Subkeys is 15 minutes, so it may take a few minutes before endpoints report the updated value.
Enforce
Tanium Enforce Machine Administrative Template (ADMX) policies can be leveraged to implement the workaround referenced in CVE-2021-40444.To create and enforce a policy containing these settings do the following:
-
Create or modify an existing Machine Administrative Template policy.
-
On the left menu section navigate to Windows Components > Internet Explorer > Internet Control Panel > Security Page > Internet Zone.
-
Expand the Download signed ActiveX Controls policy setting.
-
Select the Enabled state radio button.
-
Select Disabled for the Download signed ActiveX controls option.
-
Click the Add to Policy button.
-
Expand the Download unsigned ActiveX Controls policy setting.
-
Select the Enabled state radio button.
-
Select Disabled for the Download unsigned ActiveX controls option.
-
Click the Add to Policy button.
-
Repeat steps 2 through 10 for each of the following zones:
-
Intranet
-
Local Machine
-
Trusted
-
-
Save the policy by clicking the blue Save button at the lower left corner.
-
Enforce on a desired computer group or ad-hoc question.
-
Once the policy status reports "Applied", the registry items on the endpoint have been remediated.
Final Notes
This is a developing issue. We will keep updating this post as more information is available.
References
-
Microsoft Guidance - https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444