收集 Microsoft IIS 記錄
支援以下發布途徑:
Google secops
Siem
本文說明如何使用 Bindplane,將 Microsoft Internet Information Services (IIS) 記錄收集到 Google 安全作業。剖析器會先嘗試清理及正規化輸入資料,方法是移除不必要的字元並標準化欄位名稱。接著,它會使用一系列 grok
模式,從各種 Microsoft IIS 記錄格式中擷取相關欄位,並將這些欄位對應至統一資料模型 (UDM)。
事前準備
- 確認您有 Google SecOps 執行個體。
- 請確認您使用的是 Windows 2016 或更新版本。
- 如果在 Proxy 後方執行,請確認防火牆通訊埠已開啟。
取得 Google SecOps 擷取驗證檔案
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「收集代理程式」。
- 下載擷取驗證檔案。請在將要安裝 Bindplane 的系統上,安全地儲存檔案。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「設定檔」。
- 複製並儲存「機構詳細資料」部分中的客戶 ID。
在 Windows 上安裝 Bindplane 代理程式
- 以系統管理員身分開啟命令提示字元或 PowerShell。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
其他安裝資源
- 如需其他安裝選項,請參閱這份安裝指南。
設定 Bindplane 代理程式,以便擷取系統記錄檔並傳送至 Google SecOps
- 在設定 YAML 檔案之前,請先在「服務」面板中停止
observIQ Distro for Open Telemetry Collector
Service。 存取設定檔:
- 找出
config.yaml
檔案。通常位於 Linux 的/etc/bindplane-agent/
目錄或 Windows 的安裝目錄。 - 使用文字編輯器 (例如
nano
、vi
或記事本) 開啟檔案。
- 找出
按照下列方式編輯
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]
將
<customer_id>
替換為實際的客戶 ID。在「取得 Google SecOps 攝入驗證檔案」部分,將
/path/to/ingestion-authentication-file.json
更新為驗證檔案的儲存路徑。儲存
config.yaml
檔案後,請啟動observIQ Distro for Open Telemetry Collector
服務。
重新啟動 Bindplane 代理程式以套用變更
如要在 Windows 中重新啟動 Bindplane 代理程式,您可以使用「Services」主控台,或輸入下列指令:
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 | 用戶端的使用者代理程式。 |
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 | 用戶端的使用者代理程式。 |
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 | syslog 訊息的優先順序代碼。 | |
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 訊息的日期和時間。 | |
syslog_facility | security_result.severity_details | syslog 訊息的設施。 |
syslog_pri | syslog 訊息的優先順序。 | |
syslog_severity | security_result.severity_details | syslog 訊息的嚴重性。 |
syslog_severity_code | syslog 訊息的嚴重性代碼。 | |
標記 | security_result.rule_name | 與事件相關聯的標記。 |
任務 | additional.fields.task.value.string_value | 工作名稱。 |
時間 | 如果原始記錄時間戳記無效,則用於建立事件時間戳記。 | |
time-taken | 要求的時間長度 (以毫秒為單位)。 | |
uri_query | target.url | 用戶端要求的網址查詢字串。 |
user_agent | network.http.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_HTTP 、USER_UNCATEGORIZED 、GENERIC_EVENT 、STATUS_UPDATE 、USER_LOGOUT 、USER_LOGIN |
|
extensions.auth.type | MACHINE |
異動
2025-01-27
改善項目:
- 新增剖析 XML 記錄的支援功能。
2024-06-20
改善項目:
- 已將
streamid
對應至additional.fields
。
2024-06-11
改善項目:
- 新增 Grok 模式,用於剖析未剖析的記錄。
2024-02-18
改善項目:
- 修改 Grok 模式欄位名稱,以便正確對應值。
- 已將名稱從
intermediary_devicename
變更為observer_devicename
。 - 已將名稱從
src_ip
變更為observer_ip
。 - 已將名稱從
dst_ip
變更為principal_or_intermediary_ip
。 - 已將名稱從
xff_ips
變更為principal_xff_ips
。 - 已將
observer_ip
對應至observer.ip
。 - 已將
observer_devicename
對應至observer.hostname
。 - 已將
principal_xff_ips
對應至principal.ip
。 - 如果
principal_xff_ips
存在,則將principal_or_intermediary_ip
對應至intermediary.ip
。 - 如果沒有
principal_xff_ips
,則將principal_or_intermediary_ip
對應至principal.ip
。
2024-02-12
改善項目:
- 新增 Grok 模式,以便支援含有 kv 資料的網路記錄。
- 已將
sc-substatus
對應至additional.fields
。
2024-01-09
改善項目:
- 新增 Grok 模式,以便支援含有鍵/值資料的網路記錄。
- 已將
dst_ip2
對應至target.ip
。 - 將
X-BackEndCookie
、exchangecookie
、OutlookSession
、MapiContext
、MapiRouting
、content_type
和MapiSequence
對應至additional.fields
。
2023-12-19
改善項目:
- 如果
EventType
等於VERBOSE
,則將Configuration
對應為metadata.product_event_type
的值。 - 已將
Message
對應至security_result.description
。 - 已將
PhysicalPath
對應至target.file.full_path
。 - 將
OldValue
、NewValue
、Configuration
和ConfigPath
對應至additional.fields
。
2023-12-06
改善項目:
- 已將
@timestamp
對應至metadata.event_timestamp
。 - 已將
host.hostname
對應至target.hostname
。 - 已將
logstash.process.host
對應至intermediary.hostname
。 - 已將
logstash.collect.host
對應至observer.hostname
。 - 已將
_user
對應至principal.user.userid
。 - 已將
http_response
對應至network.http.response_code
。 - 已將
referer
對應至network.http.referral_url
。 - 已將
syslog_severity
對應至security_result.severity_details
。 - 已將
message
對應至security_result.description
。 - 如果
request_url
為/login.aspx
,而entity
為AutoLogout=1
,請將metadata.event_type
設為USER_LOGOUT
。 - 如果
request_url
是/login.aspx
,請將metadata.event_type
設為USER_LOGIN
。
2023-10-27
改善項目:
- 將
Noun.hostname
和Noun.asset.hostname
對應至相同的值。 - 已將
cIP
對應至target.ip
。 - 已將
csUriStem
對應至 `target.url
`。 - 已將
sPort
對應至principal.port
。 - 已將
csUserAgent
對應至http.user_agent
。 - 已將
sIP
對應至principal.ip
。 - 已將
csMethod
對應至network.http.method
。 - 已將
scStatus
對應至http.response_code
。 - 已將
sComputerName
對應至target.hostname
。 - 已將
_resourceId
對應至target.resource.id
。 - 已將
scBytes
對應至network.sent_bytes
。 - 已將
csBytes
對應至network.received_bytes
。 - 將
sSiteName
、TenantId
、EventProcessedUtcTime
、ManagementGroupName
和EventEnqueuedUtcTime
對應至additional.fields
。 - 已將
TimeGenerated
對應至about.resource.attribute.labels
。 - 已將
SourceSystem
對應至security_result.detection_fields
。
2023-06-23
修正錯誤:
- 變更記錄格式
- 定義變更記錄模式的 grok
- 將 cs-host 對應至 principal.application
- 使用 if-else 將 uristem 和 cs-uri-stem 對應至 target.url
- 將 cs-version 對應至 network.tls.version_protocol
- 將嚴重程度的值替換為欄位 Level 中的值
- 將 sitename 的值替換為 s-sitename
- 將 UserSid 的值替換為 UserID
- 將 AgentDevice 對應為標籤鍵和值
- 已將
app_name
對應至 principal.application - 已將
ChannelID
對應至 security_result.about.resource.attribute - 將
Level
對應至 security_result.severity - 已將
ExecutionProcessID
對應至 principal.process.pid - 已將
ExecutionThreadID
對應至 principal.process.product_specific_process_id - 將
Domain
對應至 principal.user.userid - 已將
UserID
對應至 principal.user.windows_sid - 已將
AccountType
對應至 principal.user.role_name
2023-05-12
改善項目:
- 剖析失敗的 JSON 記錄
- 已將
cshost
對應至principal.hostname
- 已將
csusername
對應至principal.user.user_display_name
。 - 已將
sip
對應至target.ip
。 - 已將
uristem
對應至target.url
。 - 已將
sport
對應至target.port
。 - 已將
csversion
對應至network.tls.version_protocol
。 - 已將
csuseragent
對應至network.http.user_agent
。 - 已將
csip
對應至principal.ip
。 - 已將
xforwardedfor
對應至principal.ip
。 - 已將
csmethod
對應至network.http.method
。 - 已將
csreferer
對應至network.http.referral_url
。 - 已將
scstatus
對應至network.http.response_code
。 - 已將
computername
對應至target.asset.hostname
。 - 已將
scbyte
對應至network.sent_bytes
。 - 已將
csbyte
對應至network.received_bytes
。 - 已將
date
和time
對應至metadata.event_timestamp
。
2023-03-01
改善項目:
- 新增支援 JSON 格式記錄,這些記錄包含
c-*
、s-*
、cs-*
、sc-*
等索引鍵。
2022-10-25
改善項目:
- 從記錄中擷取
uri_query
、intermediary_device_name
、principal_username
、sent_bytes
、received_bytes
。 - 已將
dst_port
變更為src_port
。 - 已將
src_port
對應至principal.port
。 - 已將
target.url
對應項目更新為request_url
+?+uri_query
。 - 將
token_data
對應至security_result.detection_fields
為Cookie
。 - 已將
sent_bytes
對應至network.sent_bytes
。 - 已將
received_bytes
對應至network.received_bytes
。 - 如果
target_host
為空白,則將intermediary_devicename
對應至target.hostname
,否則將其對應至intermediary.hostname
。 - 已將
principal_username
對應至principal.user.userid
。 - 只有在
target_host
為空白時,才會將Devicename
對應至target.hostname
。 - 如果
xff_ips
為空白,則會將src_ip
對應至principal.ip
。 - 如果
xff_ips
非空白: - 已將
src_ip
對應至intermediary.ip
。 - 已將
xff_ips
對應至principal.ip
。 - 新增 Grok 模式,適用於其他記錄類型。
2022-10-01
改善項目:
- 編寫 grok 以剖析未剖析的 syslog`。
- 已將
Severity
對應至security_result.severity
。 - 已將
UserName
對應至target.user.userid
。 - 已將
UserSid
對應至target.user.windows_sid
。 - 已將
ProviderKey
對應至security_result.about.resource.attribute.labels
。 - 已將
LayerKey
對應至security_result.about.resource.attribute.labels
。 - 已將
LayerName
對應至security_result.about.resource.attribute.labels
。 - 已將
LayerId
對應至security_result.about.resource.attribute.labels
。 - 已將
Weight
對應至security_result.about.resource.attribute.labels
。 - 已將
Conditions
對應至security_result.about.resource.attribute.labels
。 - 已將
Action
對應至security_result.about.resource.attribute.labels
。 - 已將
CalloutKey
對應至security_result.about.resource.attribute.labels
。 - 已將
CalloutName
對應至security_result.about.resource.attribute.labels
。 - 已將
Channel
對應至security_result.about.resource.attribute.labels
。 - 已將
FilterId
對應至security_result.about.resource.attribute.labels
。 - 已將
FilterKey
對應至security_result.about.resource.attribute.labels
。 - 已將
FilterName
對應至security_result.about.resource.attribute.labels
。 - 已將
FilterType
對應至security_result.about.resource.attribute.labels
。 - 已將
ProviderGuid
對應至security_result.about.resource.attribute.labels
。 - 已將
ProviderName
對應至security_result.about.resource.attribute.labels
。 - 已將
SourceName
對應至security_result.about.resource.attribute.labels
。 - 已將
SyslogSeverity
對應至security_result.about.resource.attribute.labels
。 - 已將
Category
對應至security_result.category_details
。 - 已將
EventType
對應至metadata.product_event_type
。 - 已將
EventID
對應至metadata.product_log_id
。 - 已將
ProcessID
對應至principal.process.pid
。 - 已將
SourceModuleName
對應至target.resource.name
。 - 已將
SourceModuleType
對應至observer.application
。
2022-09-30
改善項目:
- 將 xff 標頭 IP 對應至 intermediary.ip。
- 主機名稱已對應至 target.hostname。
- 新增額外的 Grok 模式,以便正確剖析含有額外資訊的特定記錄,並在額外欄位中對應該額外資訊。
- 將 ASP.NET_Session_id 對應至 network.session_id。
2022-03-30
改善項目:
- 剖析其他欄位。
還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。