Quantcast
Channel: Tenable Blog
Viewing all articles
Browse latest Browse all 1935

CVE-2021-38647 (OMIGOD): Critical Flaw Leaves Azure Linux VMs Vulnerable to Remote Code Execution

$
0
0

Agents installed by default on Azure Linux virtual machines are vulnerable to a remote code execution flaw that can be exploited with a single request.

Background

On September 14, researchers at Wiz disclosed a set of four vulnerabilities in Microsoft’s Open Management Infrastructure (OMI), an open source Common Information Model (CIM) management server used for managing Unix and Linux systems.

CVEDescriptionCVSSv3VPR
CVE-2021-38647Open Management Infrastructure Remote Code Execution Vulnerability9.89.4
CVE-2021-38648Open Management Infrastructure Elevation of Privilege Vulnerability7.89.2
CVE-2021-38645Open Management Infrastructure Elevation of Privilege Vulnerability7.89.2
CVE-2021-38649Open Management Infrastructure Elevation of Privilege Vulnerability7.09.2

*Please note: Tenable’s Vulnerability Priority Rating (VPR) scores are calculated nightly. This blog post was published on September 17 and reflects VPR at that time.

The flaws, which are collectively referred to as “OMIGOD,” are found within OMI agents that are installed on Microsoft’s Azure Linux virtual machines (VMs) by default. These agents can be found across a number of Azure-based services, including:

  • Azure Automation
  • Azure Automatic Update
  • Azure Operations Management Suite (Azure Monitor)
  • Azure Log Analytics
  • Azure Configuration Management
  • Azure Diagnostics
  • Azure Container Insights

The researchers at Wiz note that this may not be a complete list and there may be other Azure services that utilize OMI. Because the OMI agents are installed by default, Linux VMs are at an increased risk for potential compromise, especially if they have exposed ports to the internet.

Analysis

CVE-2021-38647 is a remote code execution vulnerability in OMI. An unauthenticated, remote attacker can exploit this flaw by sending a specially crafted request to a vulnerable over a publicly accessible remote management port (ports 5986, 5985 and 1270). Successful exploitation would grant an attacker the ability to execute arbitrary code with root privileges on the vulnerable Linux VM. This particular vulnerability was assigned a CVSSv3 score of 9.8 and it is extremely simple to exploit. The specially crafted request needs to be sent without an Authorization header. As a result, this vulnerability is the most severe out of the four flaws encompassing OMIGOD.

CVE-2021-38645, CVE-2021-38648 and CVE-2021-38649 are three elevation of privilege vulnerabilities in OMI. Researchers at Wiz say that CVE-2021-38648 is “remarkably similar” to CVE-2021-38647 in that the exploitation process is nearly the same. Despite the similarities, Wiz researchers say that the root cause analysis differs from CVE-2021-38647.

For a full breakdown of the vulnerabilities, please refer to the blog post from Wiz.

Exploitation attempts for CVE-2021-38647 detected in the wild

Within just a few days of disclosure, there are reports that attackers are actively scanning for and exploiting CVE-2021-38647.

According to security researcher Kevin Beaumont, one of his test boxes was compromised and a cryptocurrency miner (coin miner) was installed by attackers.

Andrew Morris, founder and CEO of GreyNoise Intelligence, tweeted that his firm has observed around ~80 IP addresses “opportunistically exploiting” CVE-2021-38647 across the internet.

Threat researcher Germán Fernández tweeted that the Mirai botnet is “launching a massive attack” attempting to exploit CVE-2021-38647.

Clarity surrounding number of publicly exposed hosts

On September 16, Derek Abdine, the chief technical officer at Censys, published a blog post about the impact of OMIGOD. There have been reports that over two million hosts may be exposed and potentially vulnerable. Abdine reports that while the number might seem daunting, the devil is in the details. Some of the ports that OMI runs on include those with Windows Remote Management (WinRM). After performing more targeted scans, Abdine reports that they’ve identified 56 publicly exposed hosts, with the majority of them residing within Azure. Censys mentions that some of the affected hosts are associated with a major health organization and two major entertainment companies.

Proof of concept

At the time this blog post was published, there were at least three GitHub repositories containing proof-of-concept exploit scripts for CVE-2021-38647.

Vendor Response

Microsoft published a blog post on September 16 providing additional guidance on the OMI vulnerabilities.

Solution

To address these vulnerabilities, Microsoft released updates to OMI on August 11. However, the flaws were not publicly disclosed until this month’s Patch Tuesday release.

Microsoft says that CVE-2021-38647 only affects those customers using “a Linux management solution” that enables the remote management of OMI, which includes:

The following is a mapping of vulnerable services/extensions to their associated agents:

Affected Service/ExtensionDeploymentAgent
OMI (Standalone)On-Premises/CloudOMI
System Center Operations Manager (SCOM)Om-PremisesOMI
Azure Automation State Configuration DSC ExtensionOn-PremisesOMI
Azure Automation State Configuration DSC ExtensionCloudDSC Agent
Log Analytics AgentOn-Premises/CloudOMS Agent
Azure Diagnostics (LAD)CloudLAD Agent
Azure Automation Update ManagementOn-Premises/CloudOMS Agent
Azure AutomationOn-Premises/CloudOMS Agent
Azure Security CenterCloudOMS Agent

Below is a table of affected and fixed versions for the modules/extensions as defined by Microsoft in their most recent blog post.

Module/ExtensionAffected VersionFixed Version
OMI1.6.8.0 and below1.6.8-1 and above
DSC Agent2.71.X.XX and below2.7.1.25 and above
DSC Agent2.70.X.XX and below2.70.0.30 and above
DSC Agent3.0.0.13.0.0.3
DSC Agent2.0.0.0See above versions
OMS Agent for Linux GA1.13.35 and below1.13.40-0
LAD Agent4.0.0 through 4.0.54.0.11
LAD Agent3.0.131 and below3.0.133

For the remaining agents, Microsoft says that they will provide automatic updates for cloud deployments if they are enabled. If automatic updates are disabled, users are encouraged to follow the manual update instructions in the table below. For on-premises deployments, please follow the manual update instructions once the fixed versions are available.

Module/ExtensionFixed VersionAutomatic UpdateManual Update
OMI1.6.8-1 and above-GitHub
DSC Agent2.7.1.25 and above9/18/2021Instructions
DSC Agent2.70.0.30 and above9/18/2021Instructions
DSC Agent3.0.0.39/18/2021Instructions
DSC AgentSee above versions9/18/2021Instructions
OMS Agent for Linux GA1.13.40-09/18/2021GitHub
LAD Agent4.0.119/19/2021-
LAD Agent3.0.1339/19/2021-

To manually update to the patched version of OMI, organizations and individuals are instructed to add the Microsoft repository for OMI to their system before using the local package manager to upgrade, which is dependent upon which distribution of Linux is in use.

For the Azure Container Monitoring Solution, Microsoft has released an updated Docker image with the following SHA256 ID:

12b7682d8f9a2f67752bf121029e315abcae89bc0c34a0e05f07baec72280707

If your Container Monitoring Solution Docker image has a different SHA256 ID, it is considered vulnerable.

Identifying affected systems

A local detection plugin for the Microsoft Open Management Infrastructure has been released. A list of Tenable plugins to identify these vulnerabilities will appear here as they’re released.

Tenable Research is investigating a direct check plugin as well. Once it is available, we will update this blog post.

Get more information

Join Tenable's Security Response Team on the Tenable Community.

Learn more about Tenable, the first Cyber Exposure platform for holistic management of your modern attack surface.

Get a free 30-day trial of Tenable.io Vulnerability Management.


Viewing all articles
Browse latest Browse all 1935

Trending Articles