コンテンツにスキップ

Microsoft IIS インテグレーションガイド🔗

このガイドでは、Microsoft Internet Information Services (IIS) のログをセキュリティ監視のために他のエージェントで送信するための設定手順を説明します。対応しているエージェントについては、Microsoft Windows Event Log の接続をご参照ください。

Secureworks® Taegis™ XDR On-Premises Data Collector は、Snare over Syslog フォーマットのログを受け付けます。

接続要件🔗

ソース 宛先 ポート/プロトコル
Windows Server Taegis™ XDR Collector (mgmt IP) UDP/514

インテグレーションから提供されるデータ🔗

正規化されたデータ 汎用的な検知 ベンダー固有の検知
Microsoft IIS HTTP

注意

XDR検知機は、データソースのログが特定の検知機に関連付けられたスキーマに正規化されていても、必ずしもトリガーされるとは限りません。ただし、カスタム検出ルールを作成することで、データソースから正規化されたデータに基づいて検出を生成することができます。

ログ設定手順🔗

ログの設定は、ご利用中の Microsoft IIS のバージョンによって異なります。

重要

データソースは、XDRが正しいタイムゾーンを報告できるように、タイムスタンプをUTCで報告するように設定する必要があります。

注意

NXLog CEはタイムスタンプをUTCに変更することをサポートしていません。これが必要な場合は、NXLog Enterprise Editionなどの別製品が必要です。

Microsoft IIS ログの設定🔗

注意

これらの手順は Microsoft IIS 8.5 以降に対応しています。

  1. Windows マシンから、管理ツール > インターネット インフォメーション サービス (IIS) マネージャー を開きます。
  2. IIS 管理コンソール内で、設定対象の IIS Web サイトを選択します。
  3. ログ を選択します。

    IIS サーバープロパティからログを選択

  4. 以下のフィールドを選択します。

    • Date
    • Time
    • Client IP Address
    • User Name
    • Service Name
    • Server Name
    • Server IP Address
    • Server Port
    • Method
    • URI Stem
    • URI Query
    • Protocol Status
    • Protocol Substatus
    • Win32 Status
    • Bytes Sent
    • Bytes Received
    • Time Taken
    • Host
    • User Agent
    • Referrer

    必須フィールド

  5. フィールドの追加 を選択し、X-Forwarded-For カスタムフィールドを設定します。

    • フィールド名 — X-Forwarded-For
    • ソースタイプ — Request Header
    • ソース — X-Forwarded-For

    カスタムフィールド

  6. OK を選択します。

  7. 操作 から 適用 を選択して変更を反映します。

    変更の適用

Syslog 転送の設定🔗

注意

IIS ログを XDR へ送信するには、Snare over Syslog フォーマットでログを送信できるサードパーティ製エージェントが必要です。

Snare の設定🔗

  1. http://<ip-address>:6161 で利用可能な Enterprise Agent for Windows の Web インターフェースにアクセスします。
  2. 左側のメニューから Log Configuration を選択します。

    Snare ログ設定の追加

  3. Add を選択して Snare Log Configuration モニターを追加します。

    • Log Type — MS IIS Logs
    • Multi-Line Format — Single line only
    • Log File or DirectoryC:\inetpub\logs\LogFiles\W3C\W3SVC<siteIDnumber>\

    注意

    Snare ではディレクトリ名のワイルドカードがサポートされていないため、各 W3SVC サイト ID ごとに Log Configuration モニターが必要です。3つのウェブサイトを運用している場合は、それぞれ W3SVC1、W3SVC2、W3SVC3 ディレクトリ用に3つの設定が必要です。 ログが他の場所にある場合は、IIS ログ設定に適切なパスを使用してください。

    • Log Name Formatu_ex%_x.log
    • All matching files

    Snare ログ設定

  4. Change Configuration を選択します。

  5. サイト ID の数に応じて、必要な数だけモニターを追加します。
  6. 左側のメニューから Apply Configuration & Restart Service を選択します。

    設定の適用

NXLog の設定🔗

  1. 下記の設定内容を、お客様の環境に合わせてファイルパスや XDR Collector の FQDN または IP に修正してください。
  2. Input スタンザ内の File パスは、IIS ログがデフォルト以外の場所に保存されている場合に変更してください。
  3. Output スタンザ内の Host 値は、XDR Collector の FQDN または IP に変更してください。UDP を使用する場合は、Moduleom_udp に、Port514 に変更してください。

    ## Please set ROOT to the folder NXLog is installed in. { #please-set-root-to-the-folder-nxlog-is-installed-in }
    ## - if 64bit NxLog is used, comment out (#) x86 and uncomment C:\Program Files\nxlog lines { #if-64bit-nxlog-is-used-comment-out-x86-and-uncomment-cprogram-filesnxlog-lines }
    define ROOT C:\Program Files\nxlog
    define ROOT_STRING C:\Program Files\nxlog
    ## - if 32bit NxLog is used, comment out (#) "C:\Program Files\nxlog" and uncomment x86 lines { #if-32bit-nxlog-is-used-comment-out-cprogram-filesnxlog-and-uncomment-x86-lines }
    #define ROOT C:\Program Files (x86)\nxlog
    #define ROOT_STRING C:\Program Files (x86)\nxlog
    
    Moduledir %ROOT%\modules
    CacheDir %ROOT%\data
    Pidfile %ROOT%\data\nxlog.pid
    SpoolDir %ROOT%\data
    LogFile %LOGFILE%
    
    <Extension _syslog>
    Module xm_syslog
    </Extension>
    
    <Input W3SVCIN>
    Module im_file
    ## By using the recursive directive, we'll monitor all directories under LogFiles for file u_ex*.log { #by-using-the-recursive-directive-well-monitor-all-directories-under-logfiles-for-file-u_exlog }
    
    File 'C:\inetpub\logs\LogFiles\u_ex*.log'
    SavePos TRUE
    Recursive TRUE
    ReadFromLast TRUE
    PollInterval 1
    Exec if $raw_event =~ /^#/ drop();            \
                else                            \
                {                                \
                $Hostname = hostname_fqdn();    \
                $SourceName = "IISWebLog";        \
                $Message = $raw_event;            \
                }
    </Input>
    
    <Output W3SVCOUT>
        Module      om_udp
        Module      om_tcp
    ## Guidance on TLS/SSL configuration - https://nxlog.co/documentation/nxlog-user-guide/om_ssl.html { #guidance-on-tlsssl-configuration-httpsnxlogcodocumentationnxlog-user-guideom_sslhtml }
        Module    om_ssl
        Host        %XDR%
        Port        %PORT%
        CAFile    %CERTDIR%\CA.cer
        CertFile    %CERTDIR%\winhost.cer
        CertKeyFile    %CERTDIR%\winhost.key
        AllowUntrusted    FALSE
    
    ## Create our RFC3164 compliant syslog line and transmit on local5.info { #create-our-rfc3164-compliant-syslog-line-and-transmit-on-local5info }
        Exec        $SyslogFacilityValue = 21;$Hostname=hostname_fqdn();$Severity = 'INFO';to_syslog_bsd();
    
    </Output>
    
    <Route 1>
        Path    W3SVCIN => W3SVCOUT
    </Route>
    
  4. 設定内容をデスクトップ上の nxlog.conf というファイルに保存します。

  5. 既存の C:\Program Files (x86)\NXLog\conf\nxlog.conf ファイルのバックアップを作成します。
  6. デスクトップ上の新しいファイルで C:\Program Files (x86)\NXLog\conf\nxlog.conf を置き換えます。
  7. NXLog サービスを再起動します。