CVE-2022-30190 - Microsoft Support Diagnostic Tool Vulnerability

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CVE-2022-30190 - Microsoft Support Diagnostic Tool Vulnerability

Does Cortex XDR Prevent protect against CVE-2022-30190 (Microsoft Support Diagnostic Tool Vulnerability)?

Thank you!

13 REPLIES 13

L2 Linker

Hello,

hope it's ok to attach mine, as it is the same issue/idea...

If this would work, your issue would be resolved as well:

https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-does-not-block-windows-binaries/t...

L2 Linker

I haven't seen anything from Palo Alto yet.

We are using the following XQL query to detect attacks, obviously it is a little bit rough and any improvement is welcome

 

dataset = xdr_data
| filter action_process_image_name contains "msdt.exe"
| filter action_process_image_command_line contains "PCWDiagnostic" and action_process_image_command_line contains "IT_RebrowseForFile"
| fields _time, agent_hostname as host, actor_effective_username as user, actor_process_image_path as parent_process, action_process_image_path as executed , action_process_image_command_line as command_line

L2 Linker

@MartinPfeil : good idea, well done query. but you cannot prevent with it. 
That's the reason i'd love to see a hashblock for msdt.exe...

The problem could then be, that there could be different versions with different hashes...

I just disabled the Diagnostics using a group policy which seems a better approach for me.

Thats true. That is why i first searched for all occuring msdt.exe and added all hashes 😉

 

As far as i see, disabling diagnistics doesn't seem to help here, as the binary is still there and handling urls.

The only "real" workaround, afaik, is to disable msdt url protocol, as stated by microsoft.

BUT you will have to do registry changes everwhere, and revert (if needed) later.

So, blocking the hashes in the meantime, until a patch is available, seemes to be the less invasive way to go...

 

L2 Linker

FYI, some IOCs for this CVE, which might help:

New Microsoft Office Attack Vector via ms-msdt Protocol Scheme (CVE-2022-30190) - SANS Internet Stor...

At least the initial malicious document is already recognized by Cortex/Wildfire: 

4a24048f81afbe9fb62e7a6a49adbd1faf41f266b5f9feecdceb567aec096784

 

Hm, I'm not sure. I disabled both:

Scripted Diagnostics

and
Allow users to access and run Troubleshooting Wizards

 

Let's see if there will be another way to block this with Cortex soon...

 

Update - looks like a legit workaround:

To disable the exploit

Group Policy

You can disable this via GPO (which is a fully supported method vs the reg hacks)

you do this via registry:

reg add “HKLM\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnostics” /t REG_DWORD /v EnableDiagnostics /d 0

 

https://www.pwndefend.com/2022/05/30/office-microsoft-support-diagnostic-tool-msdt-vulnerability-fol...

 

L1 Bithead

The following queries can be executed for hunting successful exploitation:

 

// msdt.exe execution with suspicious argument
config case_sensitive = false timeframe = 30d
| dataset = xdr_data
| filter event_type = ENUM.PROCESS and action_process_image_command_line contains "msdt.exe" and action_process_image_command_line contains "it_browseforfile"
| fields agent_hostname , action_process_image_command_line , action_process_image_path , actor_process_command_line , actor_process_image_path , causality_actor_process_image_path

 

// office processes spawning msdt.exe
config case_sensitive = false timeframe = 30d
| dataset = xdr_data
| filter event_type = ENUM.PROCESS and action_process_image_command_line contains "msdt.exe" and actor_process_image_name in ("winword.exe", "powerpnt.exe", "excel.exe", "msaccess.exe","visio.exe","onenote.exe")
| fields agent_hostname , action_process_image_command_line , action_process_image_path , actor_process_command_line , actor_process_image_path , causality_actor_process_image_path

You could create a BIOC rule with that query and then assign this BIOC rule to a restriction profile so that it would prevent the action. It does the trick usually, keep in mind that BIOC rules aren't instantaneous, but depending of the actions, it usually reacts quickly enough to avoid most of the damage.

Great start on the query. Here's another way you could do this to avoid an and statement:

config case_sensitive = false
|dataset = xdr_data
|filter event_type = ENUM.PROCESS
|filter action_process_image_name = "msdt.exe" and action_process_image_command_line = "*PCWDiagnostic*IT_RebrowseForFile*"
|fields agent_hostname, action_process_username as User, action_process_image_name as Child_Process, action_process_image_path as Child_Path, action_process_image_command_line as Child_CMD_Line, action_process_image_sha256 as Child_SHA256, actor_process_image_name as Parent_Process, actor_process_image_path as Parent_Path, os_actor_process_command_line as Parent_CMD_Line

Hi @Luc_Desaulniers ,

thanks for the hint with the custom prevention rules. i really didnt think of that 🙂

works like a charm!

L0 Member

https://unit42.paloaltonetworks.com/cve-2022-30190-msdt-code-execution-vulnerability/

 

mentions ""WildFire and Cortex XDR categorize all known samples we’ve come across as malware.""

L4 Transporter
  • 9283 Views
  • 13 replies
  • 3 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!