收集 Microsoft IIS 記錄

支援的國家/地區:

本文說明如何使用 Bindplane 收集 Microsoft Internet Information Services (IIS) 記錄,並傳送至 Google Security Operations。剖析器會先嘗試清除及正規化輸入資料,方法是移除不必要的字元,並將欄位名稱標準化。接著,它會使用一系列 grok 模式,從各種 Microsoft IIS 記錄格式中擷取相關欄位,並將這些欄位對應至統合式資料模型 (UDM)。

事前準備

  • 確認您擁有 Google SecOps 執行個體。
  • 確認您使用的是 Windows 2016 以上版本。
  • 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。

取得 Google SecOps 擷取驗證檔案

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「收集代理程式」
  3. 下載擷取驗證檔案。將檔案安全地儲存在要安裝 Bindplane 的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「設定檔」
  3. 複製並儲存「機構詳細資料」專區中的客戶 ID

在 Windows 上安裝 Bindplane 代理程式

  1. 以系統管理員身分開啟「命令提示字元」或「PowerShell」
  2. 執行下列指令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

其他安裝資源

設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 Google SecOps

  1. 設定 YAML 檔案前,請先停止「服務」面板中的observIQ Distro for Open Telemetry Collector 服務
  2. 存取設定檔:

    1. 找出 config.yaml 檔案。通常位於 Linux 的 /etc/bindplane-agent/ 目錄,或 Windows 的安裝目錄。
    2. 使用文字編輯器 (例如 nanovi 或記事本) 開啟檔案。
  3. 按照下列方式編輯 config.yaml 檔案:

    receivers:
      iis:
        collection_interval: 60s
    
    processors:
      # Resourcedetection is used to add a unique (host.name) to the metric resource(s), allowing users to filter between multiple agent systems.
      resourcedetection:
        detectors: ["system"]
        system:
          hostname_sources: ["os"]
    
      normalizesums:
    
      batch:
    
    exporters:
      chronicle/powershell:
        endpoint: malachiteingestion-pa.googleapis.com
        # Adjust the path to the credentials file you downloaded in Step 1
        creds: '/path/to/ingestion-authentication-file.json'
        log_type: 'IIS'
        override_log_type: false
        raw_log_field: body
        customer_id: '<customer_id>'
    
    service:
      pipelines:
        logs/winpowershell:
          receivers:
            - iis
          processors:
            - resourcedetection
            - normalizesums
            - batch
          exporters: [chronicle/iis]
    
  4. <customer_id> 替換為實際的客戶 ID。

  5. /path/to/ingestion-authentication-file.json 更新為「取得 Google SecOps 擷取驗證檔案」一節中儲存驗證檔案的路徑。

  6. 儲存 config.yaml 檔案後,啟動 observIQ Distro for Open Telemetry Collector 服務

重新啟動 Bindplane 代理程式,以套用變更

  • 如要在 Windows 中重新啟動 Bindplane 代理程式,可以使用「服務」控制台,或輸入下列指令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
@timestamp metadata.event_timestamp 原始記錄中記錄的事件時間戳記。
@version metadata.product_version IIS 伺服器版本。
AgentDevice additional.fields.AgentDevice.value.string_value 產生記錄的裝置。
AgentLogFile additional.fields.AgentLogFile.value.string_value 記錄檔的名稱。
ASP.NET_SessionId network.session_id 使用者的工作階段 ID。
c-ip principal.ip 用戶端的 IP 位址。
管道 security_result.about.resource.attribute.labels.Channel.value 記錄事件的管道。
ChannelID security_result.about.resource.attribute.labels.ChannelID.value 系統記錄事件的頻道 ID。
電腦 target.hostname 目標電腦的主機名稱。
cs-bytes network.received_bytes 從用戶端收到的位元組數。
cs-host principal.hostname、principal.asset.hostname 用戶端的主機名稱。
cs-method network.http.method 用戶端使用的 HTTP 方法。
cs-uri-query target.url 用戶端要求的網址查詢字串。
cs-uri-stem target.url 用戶端要求的網址路徑。
cs-username principal.user.user_display_name 用戶端的使用者名稱。
cs-version network.tls.version_protocol 用戶端使用的 HTTP 版本。
cs(Cookie) 用於擷取 Cookie 資訊。
cs(Referer) network.http.referral_url 將用戶端導向目前網頁的網址。
cs(User-Agent) network.http.user_agent 用戶端的 User-Agent。
csbyte network.received_bytes 從用戶端收到的位元組數。
cshost principal.hostname、principal.asset.hostname 用戶端的主機名稱。
csip principal.ip、principal.asset.ip 用戶端的 IP 位址。
csmethod network.http.method 用戶端使用的 HTTP 方法。
csreferer network.http.referral_url 將用戶端導向目前網頁的網址。
csuseragent network.http.user_agent 用戶端的 User-Agent。
csusername principal.user.user_display_name 用戶端的使用者名稱。
csversion network.tls.version_protocol 用戶端使用的 HTTP 版本。
日期 如果原始記錄時間戳記無效,可用於建構事件時間戳記。
說明 security_result.description 活動說明。
devicename target.hostname 目標電腦的主機名稱。
dst_ip target.ip、target.asset.ip 目標機器的 IP 位址。
dst_port target.port 目標機器的連接埠號碼。
持續時間 要求時間長度 (以毫秒為單位)。
EventEnqueuedUtcTime additional.fields.EventEnqueuedUtcTime.value.string_value 事件在佇列中排隊的時間 (世界標準時間)。
EventID metadata.product_log_id 活動的 ID。
EventProcessedUtcTime additional.fields.EventProcessedUtcTime.value.string_value 以世界標準時間為準的事件處理時間。
EventTime metadata.event_timestamp 事件的時間戳記。
EventType metadata.product_event_type 活動類型。
file_path target.file.full_path 事件中涉及的檔案完整路徑。
FilterId security_result.about.resource.attribute.labels.FilterId.value 篩選條件的 ID。
FilterKey security_result.about.resource.attribute.labels.FilterKey.value 篩選器的鍵。
FilterName security_result.about.resource.attribute.labels.FilterName.value 篩選器名稱。
FilterType security_result.about.resource.attribute.labels.FilterType.value 篩選條件類型。
主機 target.hostname 目標電腦的主機名稱。
host.architecture principal.asset.hardware.cpu_platform 主機的架構。
host.geo.name additional.fields.geo_name.value.string_value 主機的地理位置。
host.hostname target.hostname、target.asset.hostname 主機的主機名稱。
host.id observer.asset_id 主機的 ID。
host.ip principal.ip、principal.asset.ip 主機的 IP 位址。
host.mac principal.mac 主機的 MAC 位址。
host.os.build additional.fields.os_build.value.string_value 主機作業系統的版本號碼。
host.os.kernel principal.platform_patch_level 主機作業系統的核心版本。
host.os.name additional.fields.os_name.value.string_value 主機的作業系統名稱。
host.os.platform principal.platform 主機的作業系統平台。
host.os.version principal.platform_version 主機的作業系統版本。
http_method network.http.method 用戶端使用的 HTTP 方法。
http_response network.http.response_code HTTP 回應代碼。
http_status_code network.http.response_code 回應的 HTTP 狀態碼。
http_substatus additional.fields.sc_substatus.value.string_value 回應的 HTTP 子狀態碼。
執行個體 additional.fields.instance.value.string_value 工作執行個體 ID。
intermediary_devicename intermediary.hostname、intermediary.asset.hostname 中介裝置的主機名稱。
json_message JSON 格式的原始記錄訊息。
kv_fields 用於從原始記錄訊息中擷取鍵/值組合。
LayerKey security_result.about.resource.attribute.labels.LayerKey.value 圖層的鍵。
LayerName security_result.about.resource.attribute.labels.LayerName.value 圖層名稱。
LayerId security_result.about.resource.attribute.labels.LayerId.value 圖層的 ID。
log.file.path target.file.full_path 記錄檔的完整路徑。
log.offset metadata.product_log_id 事件在記錄檔中的位移。
logstash.collect.host observer.hostname 收集記錄的電腦主機名稱。
logstash.process.host intermediary.hostname 處理記錄的電腦主機名稱。
logstash_json_message JSON 格式的原始記錄訊息。
訊息 security_result.description 原始記錄訊息。
政府部門 additional.fields.ministry.value.string_value 與活動相關的部會。
名稱 實體名稱。
NewValue additional.fields.NewValue.value.string_value 設定的新值。
OldValue additional.fields.OldValue.value.string_value 設定的舊值。
通訊埠 principal.port 用戶端的連接埠號碼。
priority_code 系統記錄訊息的優先順序代碼。
ProcessID principal.process.pid 產生事件的程序的程序 ID。
ProviderGuid security_result.about.resource.attribute.labels.ProviderGuid.value 供應商的 GUID。
ProviderKey security_result.about.resource.attribute.labels.ProviderKey.value 供應商金鑰。
ProviderName security_result.about.resource.attribute.labels.ProviderName.value 供應商名稱。
referrer_url network.http.referral_url 將用戶端導向目前網頁的網址。
request_url target.url 用戶端要求的網址。
s-computername target.hostname 目標電腦的主機名稱。
s-ip target.ip、target.asset.ip 目標機器的 IP 位址。
s-port target.port 目標機器的連接埠號碼。
s-sitename additional.fields.sitename.value.string_value 網站名稱。
sc-bytes network.sent_bytes 傳送至用戶端的位元組數。
sc-status network.http.response_code 回應的 HTTP 狀態碼。
sc-substatus additional.fields.sc_substatus.value.string_value 回應的 HTTP 子狀態碼。
sc-win32-status 回應的 Windows 狀態碼。
scbyte network.sent_bytes 傳送至用戶端的位元組數。
scstatus network.http.response_code 回應的 HTTP 狀態碼。
嚴重性 security_result.severity 事件的嚴重程度。
service.type additional.fields.service_type.value.string_value 服務類型。
sIP principal.ip、principal.asset.ip 用戶端的 IP 位址。
sPort principal.port 用戶端的連接埠號碼。
sSiteName additional.fields.sitename.value.string_value 網站名稱。
src_ip principal.ip、principal.asset.ip、observer.ip 用戶端的 IP 位址。
src_port principal.port 用戶端的連接埠號碼。
sysdate 系統記錄訊息的日期和時間。
syslog_facility security_result.severity_details syslog 訊息的設施。
syslog_pri 系統記錄訊息的優先順序。
syslog_severity security_result.severity_details 系統記錄訊息的嚴重性。
syslog_severity_code 系統記錄訊息的嚴重性代碼。
標記 security_result.rule_name 與活動相關聯的標記。
任務 additional.fields.task.value.string_value 工作名稱。
時間 如果原始記錄時間戳記無效,可用於建構事件時間戳記。
time-taken 要求時間長度 (以毫秒為單位)。
uri_query target.url 用戶端要求的網址查詢字串。
user_agent network.http.user_agent 用戶端的 User-Agent。
使用者名稱 target.user.userid 使用者的使用者名稱。
UserSid target.user.windows_sid 使用者的 Windows SID。
權重 security_result.about.resource.attribute.labels.Weight.value 篩選條件的權重。
win32_status 回應的 Windows 狀態碼。
xforwardedfor X-Forwarded-For 標頭,內含以半形逗號分隔的 IP 位址清單。
metadata.log_type IIS
network.direction INBOUND
metadata.vendor_name Microsoft
metadata.product_name Internet Information Server
metadata.event_type NETWORK_HTTPUSER_UNCATEGORIZEDGENERIC_EVENTSTATUS_UPDATEUSER_LOGOUTUSER_LOGIN
extensions.auth.type MACHINE

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。