收集 Active Countermeasures AC-Hunter 記錄
剖析器版本:3.0
本文說明如何使用 Bindplane,將 Active Countermeasures AC-Hunter 記錄檔擷取至 Google Security Operations。
AC-Hunter 是 Active Countermeasures 推出的網路威脅偵測平台,可分析網路流量,找出與惡意中繼站通訊的遭入侵系統,自動搜尋威脅。AC-Hunter 會在 Linux 伺服器上的 Docker 容器中執行,並透過系統記錄檔通訊協定將威脅警報轉送至 SIEM 或集中式記錄伺服器。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體。
- Windows Server 2016 以上版本,或搭載
systemd的 Linux 主機。 - 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟。
- 具備 Active Countermeasures AC-Hunter 伺服器的特殊權限 (透過 sudo 執行 SSH),可編輯設定檔。
- AC-Hunter 5.3.0 以上版本 (舊版含有錯誤,會導致無法傳送 syslog 訊息)。
- 從 AC-Hunter 伺服器到 Bindplane 代理程式主機的網路路徑,使用您選擇的 syslog 通訊埠 (UDP 或 TCP)。
- 在 AC-Hunter 主機上啟用 IP 轉送,允許 Docker 容器將系統記錄傳送至外部伺服器。
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:在 2027 年 7 月 20 日停用 Ingestion API 前,請繼續使用擷取驗證檔案 (選項 2)。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 請提供下列設定詳細資料:
- 服務帳戶名稱:輸入帳戶名稱 (例如
bindplane-ingest)。 - 服務帳戶說明:輸入說明 (例如
Bindplane agent log ingestion)。
- 服務帳戶名稱:輸入帳戶名稱 (例如
- 點按「Create and continue」(建立並繼續)。
- 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
- 依序點選「繼續」和「完成」。
- 按一下您建立的服務帳戶,然後前往「金鑰」分頁標籤。
- 依序點選「新增金鑰」>「建立新的金鑰」。
- 選取「JSON」,然後按一下「建立」。金鑰檔案會下載到電腦。
- 將金鑰檔案儲存為 Bindplane 收集器目錄中的
ingestion-auth.json(Linux 為/opt/observiq-otel-collector/ingestion-auth.json,Windows 為C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新config.yaml中的creds_file_path,使其與儲存檔案的路徑相符。 - 依序前往「IAM & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。設定匯出工具時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「收集代理程式」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統中。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「設定檔」。
- 複製並儲存「機構詳細資料」部分的客戶 ID。
安裝 Bindplane 代理程式
請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。
Windows 安裝
- 以管理員身分開啟命令提示字元或 PowerShell。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
安裝 Linux
- 開啟具有 root 或 sudo 權限的終端機。
執行下列指令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安裝資源
如需其他安裝選項,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理程式,擷取系統記錄並傳送至 Google SecOps
找出設定檔
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
編輯設定檔
將
config.yaml的全部內容替換為下列設定:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/ac_hunter: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<CUSTOMER_ID>' endpoint: chronicle.googleapis.com log_type: AI_HUNTER raw_log_field: body service: pipelines: logs/ac_hunter_to_chronicle: receivers: - udplog exporters: - chronicle/ac_hunter
設定參數
請替換下列預留位置:
接收器設定:
udplog:如果是 UDP syslog,請使用udplog;如果是 TCP syslog,請使用tcplog。與 AC-Hunter 中設定的通訊協定相符。0.0.0.0:514:要監聽的 IP 位址和通訊埠。使用0.0.0.0監聽所有介面。
Exporter 設定:
<CUSTOMER_ID>:在上一步複製的 Google SecOps 客戶 ID。/opt/observiq-otel-collector/ingestion-auth.json:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1)。- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
location:將<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。如需完整清單,請參閱「區域性端點」。project:依序前往「IAM 與管理」>「設定」,然後將<PROJECT_NUMBER>替換為專案編號。endpoint:維持設為chronicle.googleapis.com。
舊版擷取 API 匯出工具
如果您使用選項 2 的擷取驗證檔案,請將
exporters區塊替換為下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/ac_hunter: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<CUSTOMER_ID>' endpoint: malachiteingestion-pa.googleapis.com log_type: AI_HUNTER raw_log_field: body
重新啟動 Bindplane 代理程式,套用變更
如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:
執行下列指令:
sudo systemctl restart observiq-otel-collector確認服務正在執行:
sudo systemctl status observiq-otel-collector檢查記錄是否有錯誤:
sudo journalctl -u observiq-otel-collector -f
如要在 Windows 重新啟動 Bindplane 代理程式,請按照下列步驟操作:
您可以選擇下列其中一個選項:
- 以管理員身分開啟命令提示字元或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector- 服務控制台:
- 按下
Win+R,輸入services.msc,然後按下 Enter 鍵。 - 找出「observIQ OpenTelemetry Collector」。
- 按一下滑鼠右鍵,然後選取「重新啟動」。
- 按下
確認服務是否正在執行:
sc query observiq-otel-collector查看記錄檔是否有錯誤:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
在 Active Countermeasures AC-Hunter 設定 syslog 轉送
- 透過 SSH 以特殊權限存取權登入 AC-Hunter 伺服器。
備份現有設定檔:
sudo cp /etc/AI-Hunter/config.yaml /etc/AI-Hunter/config.yaml.backup在文字編輯器中開啟設定檔:
sudo nano /etc/AI-Hunter/config.yaml找到「Alert:」(快訊:) 部分和巢狀的「Syslog:」(系統記錄:) 部分。提供下列設定詳細資料:
Alert: Syslog: Threshold: 20 Protocol: "udp" Address: "BINDPLANE_IP:514" Tag: " AC-Hunter "- 門檻:輸入觸發警告的最低威脅分數 (例如
20)。分數等於或高於這個值的系統會產生系統記錄警告。 - 通訊協定:選取
"udp"或"tcp",與 Bindplane 代理程式接收器設定相符。使用""(空字串) 寫入主機/dev/log,以便轉送 rsyslog。 - Address:輸入 Bindplane 代理程式 IP 位址和通訊埠 (例如
"10.1.2.3:514")。 - 標記:輸入記錄識別的選用標記 (例如
" AC-Hunter ")。在結尾引號前加上尾端空格,以免標記與訊息文字重疊。
- 門檻:輸入觸發警告的最低威脅分數 (例如
儲存設定檔並結束編輯器。
重新啟動 AC-Hunter,即可套用變更:
hunt up -d --force-recreate請等到下一個小時的 20 分左右,AC-Hunter 會從感應器匯入新的每小時記錄,並在匯入週期內,針對超過設定門檻的系統傳送 syslog 警告。
檢查本機 syslog 記錄檔,確認 syslog 訊息是否傳送至 Bindplane 代理程式主機:
sudo tail -f /var/log/syslog
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
api_msg_label |
additional.fields |
已合併 |
prev_score |
metadata.description |
直接對應 |
score |
metadata.description |
直接對應 |
ts_date |
metadata.event_timestamp |
已剖析為 MMM dd HH:mm:ss |
ts_iso8601 |
metadata.event_timestamp |
已剖析為 ISO8601 |
has_principal |
metadata.event_type |
對應:true → STATUS_UNCATEGORIZED |
src_ip |
principal.asset.ip |
已合併 |
src_ip |
principal.ip |
已合併 |
blacklist_avg_bytes_label |
principal.labels |
已合併 |
blacklist_in_label |
principal.labels |
已合併 |
blacklist_out_label |
principal.labels |
已合併 |
database_label |
principal.labels |
已合併 |
dns_txt_query_label |
principal.labels |
已合併 |
invalid_cert_label |
principal.labels |
已合併 |
max_beacon_label |
principal.labels |
已合併 |
max_duration_label |
principal.labels |
已合併 |
prev_score_label |
principal.labels |
已合併 |
rare_client_label |
principal.labels |
已合併 |
score_label |
principal.labels |
已合併 |
unexpected_proto_label |
principal.labels |
已合併 |
source_module_label |
principal.resource.attribute.labels |
已合併 |
domain |
target.asset.hostname |
直接對應 |
domain |
target.hostname |
直接對應 |
| 不適用 | metadata.event_type |
常數:STATUS_UNCATEGORIZED |
| 不適用 | metadata.product_name |
常數:AI hunter |
| 不適用 | metadata.vendor_name |
常數:Active Countermeasures |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。