收集 OSSEC 記錄

支援以下發布途徑:

本文件說明如何設定 OSSEC 和 Google Security Operations 轉送器,以便收集 OSSEC 記錄。本文件也列出支援的記錄類型和 OSSEC 版本。

詳情請參閱「將資料擷取至 Google Security Operations」。

總覽

下圖顯示 OSSEC 代理程式和伺服器的部署架構,說明如何設定這些代理程式和伺服器,以便將記錄傳送至 Google 安全作業團隊。每個客戶部署作業可能與此表示法不同,也可能更複雜。

部署架構

架構圖顯示下列元件:

  • Linux 系統。要監控的 Linux 系統。Linux 系統包含要監控的檔案和 OSSEC 代理程式。

  • Microsoft Windows 系統。要監控的 Microsoft Windows 系統,其中已安裝 OSSEC 代理程式。

  • OSSEC 代理程式。OSSEC 代理程式會從 Microsoft Windows 或 Linux 系統收集資訊,並將資訊轉送至 OSSEC 伺服器。

  • OSSEC 伺服器。OSSEC 伺服器會監控並接收 OSSEC 代理程式傳送的資訊,分析記錄,並將記錄轉送至 Google Security Operations 轉送器。

  • Bindplane 代理程式:Bindplane 代理程式會從 osquery 擷取記錄,並將記錄傳送至 Google SecOps。

  • Google Security Operations 轉送器。Google Security Operations 轉送器是輕量軟體元件,部署在客戶網路中,支援 syslog。Google Security Operations 轉送器會將記錄轉送至 Google Security Operations。

  • Google Security Operations。Google Security Operations 會保留及分析 OSSEC 伺服器的記錄。

擷取標籤會標示剖析器,將原始記錄資料正規化為具結構性的 UDM 格式。本文中的資訊適用於使用 OSSEC 攝入標籤的剖析器。

事前準備

  • 請確認 OSSEC 代理程式已安裝在您打算監控的 Microsoft Windows 或 Linux 系統上。如要進一步瞭解如何安裝 OSSEC 代理程式,請參閱「OSSEC 安裝程序

  • 使用 Google Security Operations 剖析器支援的 OSSEC 版本。Google Security Operations 剖析器支援 OSSEC 3.6.0 版。

  • 請確認 OSSEC 伺服器已在 Linux 中央伺服器上安裝及設定。

  • 確認 Google Security Operations 剖析器支援的記錄類型。下表列出 Google Security Operations 剖析器支援的產品和記錄檔案路徑:

    作業系統 產品 記錄檔案路徑
    Microsoft Windows Microsoft Windows 事件記錄
    Linux Linux /var/log/audit/audit.log
    Linux Linux /var/log/syslog
    Linux Linux /var/log/ulog/syslogemu.log
    Linux apache2 /var/log/apache2/access.log
    Linux apache2 /var/log/apache2/error.log
    Linux apache2 /var/log/apache2/other_vhosts_access.log
    Linux apache2 /var/log/apache2/novnc-server-access.log
    Linux OpenVpn /var/log/openvpnas.log
    Linux Nginx /var/log/nginx/access.log
    Linux Nginx /var/log/nginx/error.log
    Linux rkhunter /var/log/rkhunter.log
    Linux - OSSEC Server OSSEC /var/ossec/logs/ossec.log
    Linux Linux /var/log/auth.log
    Linux Linux /var/log/kern.log
    Linux rundeck /var/log/rundeck/rundeck.api.log
    Linux rundeck /var/log/rundeck/service.log
    Linux Samba /var/log/samba/log.winbindd
    Linux Linux /var/log/mail.log
  • 請確認部署架構中的所有系統都已設定為世界標準時間。

設定 OSSEC 代理程式和伺服器,以及 Google 安全作業轉送器

如要設定 OSSEC 代理程式和伺服器,以及 Google 安全作業轉送器,請按照下列步驟操作:

  1. 如要監控 Linux 系統產生的記錄,請建立 ossec.conf 檔案,指定代理程式的記錄監控設定。以下是 Linux 系統上代理程式的設定檔範例:

    <ossec_config>
    
    <!-- Files to monitor (localfiles) -->
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/ossec/logs/ossec.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/auth.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/kern.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/mail.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/syslog</location>
    </localfile>
    
    <localfile>
     <log_format>apache</log_format>
     <location>/var/log/apache2/error.log</location>
    </localfile>
    
    <localfile>
     <log_format>apache</log_format>
     <location>/var/log/apache2/access.log</location>
    </localfile>
    
    <localfile>
     <log_format>apache</log_format>
     <location>/var/log/apache2/other_vhost_access.log</location>
    </localfile>
    
    <localfile>
     <log_format>apache</log_format>
     <location>/var/log/apache2/nonvnc-server-access.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/nginx/access.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/nginx/error.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/openvpnas.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/rkhunter.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/rundeck/service.log</location>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/samba/log.winbindd</location>
    </localfile>
    
    <localfile>
     <log_format>command</log_format>
     <command>df -P</command>
    </localfile>
    
    <localfile>
     <log_format>syslog</log_format>
     <location>/var/log/audit/audit.log</location>
    </localfile>
    
    <localfile>
     <log_format>full_command</log_format>
     <command>netstat -tan |grep LISTEN |egrep -v '(192.0.2.1| ::1)' | sort</command>
    </localfile>
    
    <localfile>
     <log_format>full_command</log_format>
     <command>last -n 5</command>
    </localfile>
    </ossec_config>
    
    
  2. 如要監控 Microsoft Windows 系統產生的記錄,請建立 ossec.conf 檔案,指定代理程式的記錄監控設定。以下是 Microsoft Windows 系統上代理程式的設定檔範例:

    <ossec_config>
    <!-- Channels to monitor (localfiles) -->
    <localfile>
     <log_format>Security</log_format>
     <location>eventchannel</location>
    </localfile>
    
    <localfile>
     <log_format>System</log_format>
     <location>eventchannel</location>
    </localfile>
    
    <localfile>
     <log_format>Application</log_format>
     <location>eventchannel</location>
    </localfile>
    </ossec_config>
    
  3. 如要使用 syslog 通訊協定,將 OSSEC 伺服器的記錄轉送至 Google Security Operations,請使用下列格式建立 syslog.conf OSSEC 伺服器設定檔:

    .*.@<CHRONICLE_FORWARDER_IP>:<CHRONICLE_FORWARDER_PORT>
    
  4. 設定 Google Security Operations 轉送程式,將記錄傳送至 Google Security Operations。詳情請參閱「在 Linux 上安裝及設定轉送器」。以下是 Google Security Operations 轉送器設定範例:

      - syslog:
          common:
            enabled: true
            data_type: OSSEC
            batch_n_seconds: 10
            batch_n_bytes: 1048576
          tcp_address: 0.0.0.0:10514
          connection_timeout_sec: 60
    

使用 Bindplane 代理程式將記錄轉送至 Google SecOps

  1. 安裝並設定 Linux 虛擬機器
  2. 在 Linux 上安裝及設定 Bindplane 代理程式,將記錄轉送至 Google SecOps。如要進一步瞭解如何安裝及設定 Bindplane 代理程式,請參閱 Bindplane 代理程式安裝和設定操作說明

如果在建立動態饋給時遇到問題,請與 Google SecOps 支援團隊聯絡。

支援的 OSSEC 記錄格式

OSSEC 剖析器支援 SYSLOG+JSON、SYSLOG 和 SYSLOG+KV 格式的記錄。

支援的 OSSEC 範例記錄

  • SYSLOG+JSON:

    2022 Jan 30 23: 13: 05 (wintest) 198.51.100.0->EventChannel {
      "win": {
        "system": {
          "providerName": "Microsoft-Windows-PowerShell",
          "providerGuid": "{A0C1853B-5C40-ABCD-1234-3CF1C58F985A}",
          "eventID": "4104",
          "version": "1",
          "level": "5",
          "task": "2",
          "opcode": "15",
          "keywords": "0x0",
          "systemTime": "2021-07-29T12:57:03.579362300Z",
          "eventRecordID": "150518739",
          "processID": "16520",
          "threadID": "6036",
          "channel": "Microsoft-Windows-PowerShell/Operational",
          "computer": "WINTEST.cbn.local",
          "severityValue": "VERBOSE",
          "message": "\\"Creating Scriptblock text (1 of 1):\\""
        },
        "eventdata": {
          "messageNumber": "1",
          "messageTotal": "1",
          "scriptBlockText": "$global:?",
          "scriptBlockId": "8d4870bf-4032-5432-1234-51ae1e6a05d5"
        }
      }
    }
    
  • SYSLOG:

    2024/04/02 15:31:58 ossec-testrule: INFO: Reading local decoder file.
    
  • SYSLOG+KV:

    2022 Jan 30 12:57:02 (ossectest) 198.51.100.0->/var/log/audit/audit.log type=LOGIN msg=audit(1627367436.123:8618732): pid=18281 uid=0 old-auid=1234967321 auid=996 tty=(none) old-ses=1234967321 ses=102952 res=1
    

欄位對應參考資料

本節說明 Google Security Operations 剖析器如何為 Linux 和 Microsoft Windows 系統套用 Grok 模式,以及如何將 OSSEC 記錄欄位對應至各個記錄類型的 Google Security Operations 統一資料模型 (UDM) 欄位。

如要瞭解常見欄位的對應參照,請參閱「常見欄位

如要參考記錄路徑、範例記錄的 grok 模式、事件類型和 Linux 系統的 UDM 欄位,請參閱以下各節:

如要瞭解支援的 Microsoft Windows 事件和對應的 UDM 欄位,請參閱「Microsoft Windows 事件資料

常用欄位

下表列出常見的記錄欄位及其對應的 UDM 欄位。

常見的記錄欄位 UDM 欄位
collected_time metadata.collected_timestamp
應用程式 principal.application
記錄 metadata.description
ip target.ip 或 principal.ip
主機名稱 target.hostname 或 principal.hostname

Linux 系統

下表列出 Linux 系統的記錄路徑、範例記錄的 Grok 模式、事件類型和 UDM 對應項目:

記錄路徑 記錄檔範例 Grok 模式 事件類型 UDM 對應
/var/log/apache2/error.log [Thu Apr 28 16:13:01.283342 2022] [core:notice] [pid 18394:tid 140188660751296] [client 1.200.32.47:59840] failed to make connection [{timestamp}][{log_module}:{log_level}][pid{pid}(<optional_field>:tid{tid}|)](<optional_field> [client {client_ip}:{client_port}]|) (?<error_message>.*) NETWORK_UNCATEGORIZED

時間戳記會對應至 metadata.event_timestamp

log_module 會對應至 target.resource.name

log_level 會對應至 security_result.severity

pid 會對應至 target.process.parent_process.pid

tid 會對應至 target.process.pid

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

error_message 會對應至 security_result.description

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/error.log [Thu Apr 28 16:13:01.283342 2022] [core:notice] [pid 18394:tid 140188660751296] failed to make connection [{timestamp}][{log_module}:{severity}][pid{pid}(<optional_field>:tid{tid}|)]{error_message} NETWORK_UNCATEGORIZED

時間戳記會對應至 metadata.event_timestamp

log_module 會對應至 target.resource.name

log_level 會對應至 security_result.severity

pid 會對應至 target.process.parent_process.pid

tid 會對應至 target.process.pid

error_message 會對應至 security_result.description

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/error.log [Thu Apr 28 16:13:01.283342 2022] [core:notice] [pid 18394:tid 140188660751296] AH00094: Command line: '/usr/sbin/apache2' [{timestamp}][{log_module}:{log_level}][pid{pid}(<optional_field>:tid{tid}|)](<optional_field> [client {client_ip}:{client_port}]|) (?<error_message>.*),referer{referer_url} NETWORK_UNCATEGORIZED

將 metadata.vendor_name 設為「Apache」

metadata.product_name 已設為「Apache HTTP Server」

時間戳記會對應至 metadata.event_timestamp

log_module 會對應至 target.resource.name

log_level 會對應至 security_result.severity

pid 會對應至 target.process.parent_process.pid

tid 會對應至 target.process.pid

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

error_message 會對應至 security_result.description

target.platform 設為「LINUX」

referer_url 會對應至 network.http.referral_url

/var/log/apache2/error.log [Sun Jan 30 15:14:47.260309 2022] [proxy_http:error] [pid 12515:tid 140035781285632] [client 1.200.32.47:59840] AH01114: HTTP: failed to make connection to backend: 192.0.2.1 , referer altostrat.com [{timestamp}] [{log_module}:{log_level}] [pid {pid}(<optional_field>:tid{tid}|)] [client {client_ip}:{client_port}]( <message_text>HTTP: )?{error_message}:( {target_ip})(<optional_field>,referer{referer_url})?" NETWORK_HTTP

時間戳記會對應至 metadata.event_timestamp

log_module 會對應至 target.resource.name

log_level 會對應至 security_result.severity

pid 會對應至 target.process.parent_process.pid

tid 會對應至 target.process.pid

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

error_message 會對應至 security_result.description

target_ip 會對應至 target.ip

referer_url 會對應至 network.http.referral_url

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/error.log [Sat Feb 02 00:30:55 2019] 新連線:[connection: gTxkX8Z6tjk] [client 192.0.2.1:50786] [{timestamp}]<message_text>connection:[connection:{connection_id}][client{client_ip}:{client_port}] NETWORK_UNCATEGORIZED

時間戳記會對應至 metadata.event_timestamp

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

connection_id 會對應至 network.session_id

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/error.log [2019 年 2 月 2 日星期六 00 點 30 分 55 秒] 新要求:[連線:j8BjX4Z5tjk] [要求:ACtkX1Z5tjk] [pid 8] [用戶端 192.0.2.1:50784] [{timestamp}]<message_text>request:[connection:{connection_id}][request:{request_id}][pid{pid}][client{client_ip}:{client_port}] NETWORK_UNCATEGORIZED

時間戳記會對應至 metadata.event_timestamp

request_id 會對應至 security_result.detection_fields.(key/value)

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

pid 會對應至 target.process.parent_process.pid

connection_id 會對應至 network.session_id

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/error.log [Sat Feb 02 00:30:55 2019] [info] [C: j8BjX4Z5tjk] [R: p7pjX4Z5tjk] [pid 8] core.c(4739): [client 192.0.2.1:50784] AH00128: File does not exist: /usr/local/apache2/htdocs/favicon.ico [{timestamp}] [{log_level}][C:{connection_id}][R:{request_id}][pid {pid}(<optional_field>:tid{tid}|)]<message_text>[client {client_ip}:{client_port}]{error_message}:{file_path} NETWORK_UNCATEGORIZED

時間戳記會對應至 metadata.event_timestamp

log_level 會對應至 security_result.severity

request_id 會對應至 security_result.detection_fields.(key/value)

client_ip 會對應至 principal.ip

client_port 會對應至 principal.port

pid 會對應至 target.process.parent_process.pid

connection_id 會對應至 network.session_id

error_message 會對應至 security_result.description

file_path 會對應至 target.file.full_path

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/access.log 10.50.0.1 - - [28/Apr/2022:18:02:13 +0530] "POST /test/first.html HTTP/1.1" 200 491 "http://192.0.2.1/test/first.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" ({client_ip})?<message_text>{userid}[{timestamp}](<optional_field>{method}/(<optional_field>{resource}?) {client_protocol}?){result_status}{object_size}(<optional_field>(<optional_field>{referer_url}?)(<optional_field>{user_agent}?)? NETWORK_HTTP

client_ip 會對應至 principal.ip

userid 會對應至 principal.user.userid

host 會對應至 principal.hostname

時間戳記會對應至 metadata.event_timestamp

方法會對應至 network.http.method

資源會對應至 principal.resource.name

client_protocol 會對應至 network.application_protocol

result_status 會對應至 network.http.response_code

object_size 會對應至 network.sent_bytes

referer_url 會對應至 network.http.referral_url

user_agent 會對應至 network.http.user_agent

network.ip_protocol 設為「TCP」

network.direction 設為「OUTBOUND」

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

var/log/apache2/other_vhosts_access.log wintest.example.com:80 ::1 - - [14/Jan/2022:14:08:16 -0700] \"GET /server-status?auto HTTP/1.1\" 200 1415 \"-\" \"Python-urllib/2.7\" {target_host}:{NUMBER:target_port} {client_ip} - (<optional_field>{host}?) [{timestamp}](<optional_field>{method}/(<optional_field>{resource}?){client_protocol}?){result_status}{object_size}(<optional_field>{referer_url}?)(<optional_field>{user_agent}?) NETWORK_HTTP

target_host 會對應至 target.hostname

target_port 會對應至 target.port

client_ip 會對應至 principal.ip

userid 會對應至 principal.user.userid

host 會對應至 principal.hostname

時間戳記會對應至 metadata.event_timestamp

方法會對應至 network.http.method

資源會對應至 principal.resource.name

result_status 會對應至 network.http.response_code

object_size 會對應至 network.sent_bytes

referer_url 會對應至 network.http.referral_url

user_agent 會對應至 network.http.user_agent

network.ip_protocol 設為「TCP」

network.direction 設為「OUTBOUND」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 已設為「Apache HTTP Server」

network.application_protocol 設為「HTTP」

/var/log/apache2/access.log "http://192.0.2.1/test/first.html" -> /altostrat.com (<optional_field>{referer_url}?)->(<optional_field>{path}?) GENERIC_EVENT

path 會對應至 target.url

referer_url 會對應至 network.http.referral_url

network.direction 設為「OUTBOUND」

target.platform 設為「LINUX」

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

/var/log/apache2/access.log Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.67.0 Chrome/98.0.4758.141 Electron/17.4.1 Safari/537.36 (<optional_field>{user_agent}) GENERIC_EVENT

user_agent 會對應至 network.http.user_agent

network.direction 設為「OUTBOUND」

target.platform 設為「LINUX」

network.application_protocol 設為「HTTP」

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「Apache」

metadata.product_name 設為「Apache HTTP Server」

var/log/nginx/access.log 172.16.19.228 - admin [05/May/2022:11:53:27 +0530] "GET /icons/ubuntu-logo.png HTTP/1.1" 404 209 "http://192.0.2.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" {principal_ip} - (<optional_field>{principal_user_userid}?) [{timestamp}] {http_method} /(<optional_field>{resource_name}?|) {protocol}(<message_text>){response_code} {received_bytes}(<optional_field>{referer_url}) ({user_agent}|{user_agent})? NETWORK_HTTP

時間會對應至 metadata.timestamp

ip 會對應至 target.ip

principal_ip 會對應至 principal.ip

principal_user_userid 會對應至 principal.user.userid

metadata_timestamp 會對應至 timestamp

http_method 會對應至 network.http.method

resource_name 會對應至 principal.resource.name

通訊協定會對應至 network.application_protocol = (HTTP)

response_code 會對應至 network.http.response_code

received_bytes 會對應至 network.sent_bytes

referer_url 會對應至 network.http.referral_url

user_agent 會對應至 network.http.user_agent

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「NGINX」

將 metadata.product_name 設為「NGINX」

network.ip_protocol 設為「TCP」

network.direction 設為「OUTBOUND」

var/log/nginx/error.log 2022/01/29 13:51:48 [error] 593#593: *62432 open() \"/usr/share/nginx/html/nginx_status\" failed (2: No such file or directory), client: 192.0.2.1, server: localhost, request: \"GET /nginx_status HTTP/1.1\", host: \"192.0.2.1:8080\" "{year}\/{month}\/{day}{time}[{severity}]{pid}#{thread_id}:{inner_message2}"

inner_message2 會對應至「{security_result_description_2},client:{principal_ip},server:(<optional_field>{target_hostname}?),request:"{http_method} /(<optional_field>{resource_name}?) {protocol}/1.1",host:"({target_ip}:{target_port})?"

「bind() to ({target_ip}|[{target_ip}]):{target_port} failed ({security_description})」

"\*{cid}{security_description}",

「{security_description}」

NETWORK_HTTP

thread_id 會對應至 principal.process.pid

嚴重性會對應至 security_result.severity

(debug 會對應至 UNKNOWN_SEVERITY、info 會對應至 INFORMATIONAL、notice 會對應至 LOW、warn 會對應至 MEDIUM、error 會對應至 ERROR、crit 會對應至 CRITICAL、alert 會對應至 HIGH)

target_file_full_path 會對應至 target.file.full_path

principal_ip 會對應至 principal.ip

target_hostname 會對應至 target.hostname

http_method 會對應至 network.http.method

resource_name 會對應至 principal.resource.name

通訊協定會對應至「TCP」

target_ip 會對應至 target.ip

target_port 會對應至 target.port

security_description + security_result_description_2 會對應至 security_result.description

pid 會對應至 principal.process.parent_process.pid

network.application_protocol 設為「HTTP」

時間戳記會對應至 %{year}/%{day}/%{month} %{time}

target.platform 設為「LINUX」

將 metadata.vendor_name 設為「NGINX」

將 metadata.product_name 設為「NGINX」

network.ip_protocol 設為「TCP」

network.direction 設為「OUTBOUND」

var/log/rkhunter.log [14:10:40] 檢查必要指令失敗 [<message_text>]{security_description} STATUS_UPDATE

time 會對應至 metadata.timestamp

securtiy_description 會對應至 security_result.description

principal.platform 設為「LINUX」

將 metadata.vendor_name 設為「RootKit Hunter」

metadata.product_name 設為「RootKit Hunter」

var/log/rkhunter.log [14:09:52] 檢查檔案「/dev/.oz/.nap/rkit/terror」[未找到] [<message_text>] {security_description} {file_path}[{metadata_description}] FILE_UNCATEGORIZED

metadata_description 會對應至 metadata.description

file_path 會對應至 target.file.full_path

security_description 會對應至 security_result.description

principal.platform 設為「LINUX」

將 metadata.vendor_name 設為「RootKit Hunter」

metadata.product_name 設為「RootKit Hunter」

var/log/rkhunter.log ossec:檔案大小已縮減 (inode 仍在):'/var/log/rkhunter.log'。 (<optional_field><message_text>:){metadata_description}:'{file_path}' FILE_UNCATEGORIZED

time 會對應至 metadata.timestamp

metadata_description 會對應至 metadata.description

file_path 會對應至 target.file.full_path

principal.platform 設為「LINUX」

將 metadata.vendor_name 設為「RootKit Hunter」

metadata.product_name 設為「RootKit Hunter」

/var/log/kern.log 7 月 7 日 18:48:32 zynvpnsvr kernel: [2081387.006876] IPv4: martian source 1.20.32.39 from 192.0.2.1, on dev as0t5 {timestamp}{principal_hostname}{metadata_product_event_type}: [<message_text>?] <message_text>?{target_ip}\from{principal_ip}, on dev {target_user_userid} NETWORK_CONNECTION 時間戳記會對應至「metadata.event_timestamp」

principal_hostname 會對應至「principal.hostname」

metadata_product_event_type 會對應至「metadata.product_event_type」

target_ip 會對應至「target.ip」

principal_ip 會對應至「principal.ip」

target_user_userid 會對應至「target.user.userid」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/kern.log Oct 25 10:10:51 localhost kernel: [ 31.974576] audit: type=1400 audit(1635136846.152:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-start" pid=752 {timestamp}{principal_hostname}{metadata_product_event_type}: <message_text>\operation="{metadata_description}"\profile="<message_text>"\name="{file_path}"\pid={pid} STATUS_UPDATE 時間戳記會對應至「metadata.event_timestamp」

principal_hostname 會對應至「principal.hostname」

metadata_product_event_type 會對應至「metadata.product_event_type」

metadata_description 會對應至「metadata.description」

file_path 會對應至「principal.process.file」

pid 會對應至「principal.process.pid」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/kern.log 4 月 28 日 12 點 41 分 35 秒 localhost 核心:[ 5079.912215] ctnetlink v0.93:使用 nfnetlink 註冊。 {timestamp}{principal_hostname}{metadata_product_event_type}:[<message_text>?]{metadata_description} STATUS_UPDATE 時間戳記會對應至「metadata.event_timestamp」

principal_hostname 會對應至「principal.hostname」

metadata_product_event_type 會對應至「metadata.product_event_type」

metadata_description 會對應至「metadata.description」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/kern.log Apr 28 11:17:01 localhost kernel: [ 0.030139] smpboot: CPU0: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz (family: 0x6, model: 0x55, stepping: 0x7) {timestamp}{principal_hostname}{metadata_product_event_type}:([<message_text>])<message_text>:\CPU0:{principal_asset_hardware_cpu_model}({metadata_description}) STATUS_UPDATE 時間戳記會對應至「metadata.event_timestamp」

principal_hostname 會對應至「principal.hostname」

metadata_product_event_type 會對應至「metadata.product_event_type」

principal_asset_hardware_cpu_model 會對應至「principal.asset.hardware.cpu_model」

metadata_description 會對應至「metadata.description」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

cpu_model 會對應至 principal.asset.hardware.cpu_model

/var/log/syslog.log Jan 29 13:51:46 winevt env[29194]: [29/Jan/2022:13:51:46] REQUES GET 200 /api/systems/0000-0041 (10.0.1.1) 3179 {collected_timestamp}{hostname}{command_line}[{pid}]:[{date}<message_text>]REQUES{http_method}{response_code}(<optional_field>{resource}?)({target_ip}){received_bytes} NETWORK_CONNECTION

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

http_method 會對應至 network.http.method

response_code 會對應至 network.http.response_code

資源會對應至 target.url

target_ip 會對應至 target.ip

received_bytes 會對應至 network.received_bytes

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

系統會將 command_line 對應至 principal.process.command_line

/var/log/syslog.log Jul 26 23:13:03 zynossec ossec-authd[1096]: 2021/07/26 23:13:03 ossec-authd: INFO: Received request for a new agent (zsecmgr0000-0719) from: 3.4.5.6 {collected_timestamp}<message_text>{command_line}[{pid}]:{date} {time} {command_line}:{log_level}:{message}({hostname})from: {target_ip} STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

log_level 會對應至 security_result.severity

訊息會對應至 metadata.description

系統會將 command_line 對應至 principal.process.command_line

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

target_ip 會對應至 target.ip

/var/log/syslog.log Jul 26 23:13:03 zynosec ossec-authd[1096]: 2021/07/26 23:13:03 ossec-authd: INFO: New connection from 3.4.5.6 {collected_time}{hostname}{command_line}[{pid}]:{date} {time} {command_line}:{log_level}:{description}from {target_ip} STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

log_level 會對應至 security_result.severity

description 會對應至 security_result.description

系統會將 command_line 對應至 principal.process.command_line

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/syslog.log Jan 29 13:51:46 zynosec ossec-authd[1096]: 2021/07/26 23:13:03 ossec-authd: ERROR: Invalid agent name zsecmgr0000-0719 (duplicated) {collected_timestamp}<message_text>{command_line}[{pid}]:{date}<message_text>:{log_level}:{description}{hostname}({reason}) STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

log_level 會對應至 security_result.severity

description + reason 會對應至 security_result.description

系統會將 command_line 對應至 principal.process.command_line

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/syslog.log 5 月 2 日 06:25:01 localhost apachectl[64942]:AH00558:apache2:無法使用 ::1 可靠地判斷伺服器的完整網域名稱。全域設定「ServerName」指示詞,即可抑制這則訊息 {collected_timestamp}{hostname}{command_line}(<optional_field>|[{pid}]):{message} STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

訊息會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

系統會將 command_line 對應至 principal.process.command_line

/var/log/syslog.log 5 月 2 日 00:00:45 localhost fstrim[64727]: /: 6.7 GiB (7205015552 位元組) 已裁剪 {collected_timestamp}{hostname}{command_line}(<optional_field>|[{pid}]):{message} STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

訊息會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

系統會將 command_line 對應至 principal.process.command_line

/var/log/syslog.log 5 月 3 日 10:14:37 localhost rsyslogd:rsyslogd 的使用者 ID 已變更為 102 {collected_timestamp}{hostname}{command_line}:{message}to{user_id} STATUS_UPDATE

collected_time 會對應至 metadata.collected_timestamp

主機名稱會對應至 principal.hostname

訊息會對應至 metadata.description

user_id 會對應至 principal.user.userid

系統會將 command_line 對應至 principal.process.command_line

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

/var/log/syslog.log May 5 10:36:48 localhost systemd[1]: Starting System Logging Service... {collected_timestamp}{hostname}{command_line}(<optional_field>|[{pid}]):{message} STATUS_UPDATE

collected_time 會對應至 metadata.event_timestamp

主機名稱會對應至 principal.hostname

pid 會對應至 principal.process.pid

訊息會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

系統會將 command_line 對應至 principal.process.command_line

/var/log/mail.log Mar 16 11:40:56 Ubuntu18 sendmail[9341]: 22G6AtwH009341: from=<ossecm@Ubuntu18>, size=377, class=0, nrcpts=1, metadata_descriptionid=<202203160610.22G6AtwH009341@Ubuntu18.cdsys.local>, proto=SMTP, daemon=MTA-v4, relay=localhost [192.0.2.1] {timestamp} {target_hostname} {application}[{pid}]: <message_text>:{KV} STATUS_UPDATE

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/mail.log Apr 7 13:44:01 prod postfix/pickup[22580]: AE4271627DB: uid=0 from=<root> {timestamp} {target_hostname} {application}[{pid}]: <message_text>{KV} EMAIL_UNCATEGORIZED

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/mail.log Apr 7 13:44:01 prod postfix/cleanup[23434]: AE4271627DB: message-id=<20150207184401.AE4271627DB@server.hostname.01> {timestamp} {target_hostname} {application}[{pid}]: <message_text> message-id=<{resource_name}> STATUS_UPDATE

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

resource_name 會對應至 target.resource.name

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/mail.log 4 月 7 日 13:44:01 產品 postfix/qmgr[3539]:AE4271627DB:from=<root@server.hostname.01>, size=565, nrcpt=1 (queue active) {timestamp} {target_hostname} {application}[{pid}]: <message_text>{KV} EMAIL_UNCATEGORIZED

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/mail.log Apr 7 13:44:01 prod postfix/smtp[23436]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c03::1b]:25: Network is unreachable {timestamp} {target_hostname} {application}[{pid}]: <message_text>{KV} STATUS_UPDATE

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/mail.log Apr 7 13:44:02 prod postfix/local[23439]: E62521627DC: to=<root@server.hostname.01>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox) {timestamp} {target_hostname} {application}[{pid}]: <message_text>{KV} EMAIL_UNCATEGORIZED

target_hostname 會對應至 target.hostname

application 會對應至 target.application

pid 會對應至 target.process.pid

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/rundeck/service.log [2022-05-04T17:03:11,166] WARN config.NavigableMap - 透過點號符號存取設定鍵「[filterNames]」已淘汰,並將在日後推出的版本中移除。請改用 'config.getProperty(key, targetClass)'。 [{timestamp}]{severity}{summary}\-{security_description}

, at {command_line}\({file_path}:<message_text>\)

STATUS_UPDATE

將 command_line 對應至「target.process.command_line」

file_path 會對應至「target.process.file.full_path」

時間戳記會對應至「metadata.event_timestamp」

嚴重性會對應至「security_result.severity」

summary 會對應至「security_result.summary」

security_description 會對應至「security_result.description」

將 metadata.product_name 設為「OSSEC」

將 metadata.vendor_name 設為「OSSEC」

/var/log/auth.log Apr 27 21:03:03 Ubuntu18 systemd-logind[836]: Removed session 3080. {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}]):{security_description}{network_session_id}?(of user{principal_user_userid})? USER_LOGOUT

時間戳記會對應至「metadata.timestamp」

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

network_session_id 會對應至「network.session_id」

如果 metadata.event_type 為 USER_LOGOUT,principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」。

「principal.platform」已對應至「LINUX」

if(removed_session) event_type 設為 USER_LOGOUT

extensions.auth.type 已設為 AUTHTYPE_UNSPECIFIED

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log Apr 28 11:33:24 Ubuntu18 systemd-logind[836]: 使用者 root 的新工作階段 3205。 {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}]):{security_description}{network_session_id}?(of user{principal_user_userid})? USER_LOGIN

時間戳記會對應至「metadata.timestamp」

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

network_session_id 會對應至「network.session_id」

如果 metadata.event_type 為 USER_LOGOUT,principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」。

「principal.platform」已對應至「LINUX」

「network.application_protocol」會對應至「SSH」

if(new_session) event_type 設為 USER_LOGIN

extensions.auth.type 已設為 AUTHTYPE_UNSPECIFIED

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log Apr 28 11:35:31 Ubuntu18 sshd[23573]: Accepted password for root from 10.0.1.1 port 40503 ssh2 {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}])<optional_field> {security_description} for (invalid user )?{principal_user_userid} from {principal_ip} port {principal_port} ssh2(:{security_result_detection_fileds_ssh_kv}SHA256:{security_result_detection_fileds_kv})? USER_LOGIN

時間戳記會對應至「metadata.timestamp」

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

如果 metadata.event_type 為 USER_LOGOUT,principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」。

principal_ip 會對應至「principal.ip」

principal_port 會對應至「principal.port」

security_result_detection_fields_ssh_kv 會對應至「security_result.detection_fields.key/value」

security_result_detection_fields_kv 會對應至「security_result.detection_fields.key/value」

「principal.platform」已設為「LINUX」

「network.application_protocol」設為「SSH」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log Apr 28 11:50:20 Ubuntu18 sshd[24145]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.1.1 user=root {timestamp} {principal_hostname}{principal_application}([{pid}])<optional_field> <message_text>: {security_description};logname=(<message_text>)?uid=({principal_user_userid})?euid=({principal_user_attribute_labels_euid_kv})?tty=(<message_text>)?ruser=({principal_ruser_userid})?rhost=({target_ip})?(user=(<optional_field>{principal_user_userid}|{principal_user_userid})?)? USER_LOGIN

時間戳記會對應至「metadata.timestamp」

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

principal_user_uuserid 已對應至「principal.user.attribute.labels」

principal_user_attribute_labels_euid_kv 會對應至「principal.user.attribute.labels.key/value」

principal_ruser_userid 會對應至「principal.user.attribute.labels.key/value」

target_ip 會對應至「target.ip」

如果 metadata.event_type 是 USER_LOGOUT,則 principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」

「principal.platform」已設為「LINUX」

「network.application_protocol」設為「SSH」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log Feb 24 00:13:02 precise32 sudo: tsg : user NOT in sudoers ; TTY=pts/1 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/ls {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}])<optional_field> {principal_user_userid} :( {security_description} ;)? TTY=<message_text> ; PWD={principal_process_command_line_1} ; USER={principal_user_attribute_labels_uid_kv} ; COMMAND={principal_process_command_line_2} STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

principal_hostname 會對應至 principal.hostname

principal_application 會對應至 principal.application

pid 會對應至 principal.process.pid

principal_user_userid 會對應至 target.user.userid

security_description 會對應至「security_result.description」

principal_process_command_line_1 會對應至「principal.process.command_line」

principal_process_command_line_2 會對應至「principal.process.command_line」

principal_user_attribute_labels_uid_kv 會對應至「principal.user.attribute.labels.key/value」

「principal.platform」已設為「LINUX」

/var/log/auth.log Apr 26 07:39:01 Ubuntu18 CRON[2126]: pam_unix(cron:session): session opened for user root by (uid=0) {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}])<optional_field> {security_description} for (invalid user|user)?{principal_user_userid}(by (uid={principal_user_attribute_labels_uid_kv}))?$ USER_LOGIN

時間戳記會對應至 metadata.timestamp

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

如果 metadata.event_type 是 USER_LOGOUT,principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」。

principal_user_attribute_labels_uid_kv 會對應至「principal.user.attribute.labels.key/value」

「principal.platform」已設為「LINUX」

「network.application_protocol」設為「SSH」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log Apr 26 07:39:01 Ubuntu18 CRON[2126]: pam_unix(cron:session): session closed for user root {timestamp} {principal_hostname}{principal_application}(<optional_field>[{pid}])<optional_field> {security_description} for (invalid user|user)?{principal_user_userid}(by (uid={principal_user_attribute_labels_uid_kv}))?$ USER_LOGOUT

時間戳記會對應至 metadata.timestamp

如果 metadata.event_type 是 USER_LOGOUT,則 principal_hostname 會對應至「target.hostname」,否則會對應至「principal.hostname」。

如果 metadata.event_type 是 USER_LOGOUT,則 principal_application 會對應至「target.application」,否則會對應至「principal.application」。

如果 metadata.event_type 是 USER_LOGOUT,則 pid 會對應至「target.process.pid」,否則會對應至「principal.process.pid」。

security_description 會對應至「security_result.description」

如果 metadata.event_type 是 USER_LOGOUT,principal_user_userid 會對應至「principal.user.userid」,否則會對應至「target.user.userid」。

principal_user_attribute_labels_uid_kv 會對應至 principal.user.attribute.labels.key/value

「principal.platform」已設為「LINUX」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

/var/log/auth.log 2018 年 5 月 24 日 12:56:31 ip-10-50-2-176 sshd[119931]: 逾時,用戶端未回應。 {timestamp} {principal_hostname}{principal_application}([{pid}])<optional_field> {security_result_description} STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

principal_hostname 會對應至 principal.hostname

principal_application 會對應至 principal.application

pid 會對應至 principal.process.pid

security_result_description 會對應至 security_result_description

「principal.platform」已設為「LINUX」

metadata.vendor_name 設為 OSSEC

metadata.product_name 設為 OSSEC

var/log/samba/log.winbindd [2022/05/05 13:51:22.212484, 0] ../source3/winbindd/winbindd_cache.c:3170(initialize_winbindd_cache)initialize_winbindd_cache:清除快取並使用版本號碼 2 重新建立 {timestamp},{severity}(<optional_field>,pid={pid},effective({principal_user_attribute_labels_kv},{principal_group_attribute_labels_kv}),real({principal_user_userid},{principal_group_product_object_id}))?]<message_text>:{security_description} STATUS_UPDATE

時間戳記會對應至「metadata.timestamp」

pid 會對應至「principal.process.pid」

principal_user_attribute_labels_kv 會對應至「principal.user.attribute.labels」

principal_group_attribute_labels_kv 會對應至「principal.group.attribute.labels」

principal_user_userid 會對應至「principal.user.userid」

principal_group_product_object_id 會對應至「principal.group.product_object_id」

security_description 會對應至「security_result.description」

metadata_description 會對應至「metadata.description」

將 metadata.product_name 設為「OSSEC」

「metadata.vendor_name」設為「OSSEC」

var/log/samba/log.winbindd messaging_dgm_init:繫結失敗:裝置沒有足夠的空間 {user_id}:{desc} STATUS_UPDATE

將 metadata.product_name 設為「OSSEC」

將「metadata.vendor_name」設為「OSSEC」

user_id 會對應至 principal.user.userid

desc 會對應至 metadata.description

var/log/openvpnas.log 2022-04-29T10:51:22+0530 [stdout#info] [OVPN 4] OUT: '2022-04-29 05:21:22 mohit_AUTOLOGIN/10.50.0.1:16245 MULTI: Learn: 172.27.232.2 -> mohit_AUTOLOGIN/10.50.0.1:16245' {timestamp}[stdout#{log_level}][OVPN <message_text>]OUT:(<optional_field>'|")<message_text>-<message_text>{user}\/{ip}:{port}MULTI:Learn:{local_ip}->{target_hostname}?{target_ip}:{port}(<optional_field>'|") NETWORK_HTTP

時間戳記會對應至 metadata.timestamp

log_level 會對應至 security_result.severity

local_ip 會對應至 principal.ip

target_ip 會對應至 target.ip

target_hostname 會對應至 principal.hostname

port 會對應至 target.port

user 會對應至 principal.user.user_display_name

將 metadata.vendor_name 設為「OpenVPN」

將 metadata.product_name 設為「OpenVPN Access Server」

principal.platform 設為「LINUX」

var/log/openvpnas.log 2022-04-28T16:14:13+0530 [stdout#info] [OVPN 6] OUT: '2022-04-28 16:14:13 library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.08' {timestamp}[stdout#{log_level}][OVPN <message_text>]OUT:(<optional_field>'|")<message_text>{msg}(<optional_field>'|") STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

log_level 會對應至 security_result.severity

msg 會對應至 security_result.description

將 metadata.vendor_name 設為「OpenVPN」

將 metadata.product_name 設為「OpenVPN Access Server」

principal.platform 設為「LINUX」

var/log/openvpnas.log 2022-04-29T10:51:22+0530 [stdout#info] [OVPN 4] OUT: '2022-04-29 05:21:22 10.50.0.1:16245 [mohit_AUTOLOGIN] Peer Connection Initiated with [AF_INET]10.50.0.1:16245 (via [AF_INET]10.50.2.175%ens160)' {timestamp}[stdout#{log_level}][OVPN <message_text>]OUT:(<optional_field>'|")<message_text>{message}(<optional_field>'|")

訊息會對應至 <message_text>with[<message_text>]<message_text>:{port}<message_text>

STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

log_level 會對應至 security_result.severity

訊息會對應至 security_result.description

將 metadata.vendor_name 設為「OpenVPN」

將 metadata.product_name 設為「OpenVPN Access Server」

principal.platform 設為「LINUX」

var/log/openvpnas.log 2022-04-29T10:51:22+0530 [stdout#info] [OVPN 4] OUT: "2022-04-29 05:21:22 mohit_AUTOLOGIN/10.50.0.1:16245 SENT CONTROL [mohit_AUTOLOGIN]: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 12,ping-restart 50,redirect-gateway def1,redirect-gateway bypass-dhcp,redirect-gateway autolocal,route-gateway 172.27.232.1,dhcp-option DNS 10.0.1.99,dhcp-option DNS 10.0.1.94,register-dns,block-ipv6,ifconfig 172.27.232.2 255.255.254.0,peer-id 0,auth-tokenSESS_ID,cipher AES-256-GCM,key-derivation tls-ekm' (status=1)" {timestamp}[stdout#{log_level}][OVPN <message_text>]OUT:(<optional_field>'|")<message_text>{user}\/{ip}:{message}(<optional_field>'|") STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

log_level 會對應至 security_result.severity

訊息會對應至 security_result.description

user 會對應至 principal.user.user_display_name

ip 會對應至 principal.ip

將 metadata.vendor_name 設為「OpenVPN」

將 metadata.product_name 設為「OpenVPN Access Server」

principal.platform 設為「LINUX」

var/log/openvpnas.log 2022-04-29T10:51:22+0530 [stdout#info] AUTH SUCCESS {'status': 0, 'user': 'mohit', 'reason': 'AuthAutoLogin: autologin certificate auth succeeded', 'proplist': {'prop_autogenerate': 'true', 'prop_autologin': 'true', 'pvt_password_digest': '[redacted]', 'type': 'user_connect'}, 'common_name': 'mohit_AUTOLOGIN', 'serial': '3', 'serial_list': []} cli='win'/'3.git::d3f8b18b'/'OCWindows_3.3.6-2752' {timestamp}[stdout#{log_level}]{summary}{'<message_text>':({status})?'<message_text>':({user})?'<message_text>':({reason})?<message_text>}, 'common_name':'{user_name}'<message_text>}cli='{cli}' STATUS_UPDATE

時間戳記會對應至 metadata.timestamp

log_level 會對應至 security_result.severity

訊息會對應至 security_result.description

summary 會對應至 security_result.summary

user_name 會對應至 principal.user.user_display_name

cli 會對應至 principal.process.command_line

status 會對應至 principal.user.user_authentication_status

將 metadata.vendor_name 設為「OpenVPN」

將 metadata.product_name 設為「OpenVPN Access Server」

principal.platform 設為「LINUX」

/var/log/audit.log type=SYSTEM_RUNLEVEL metadata_description=audit(1651576133.423:202): pid=1571 uid=0 auid=4294967295 ses=4294967295 metadata_description='old-level=N new-level=5 comm="systemd-update-utmp" exe="/lib/systemd/systemd-update-utmp" hostname=? addr=? terminal=? res=success' type={audit_log_type}=audit((<optional_field>{metadata_ingested_timestamp}|{metadata_ingested_timestamp})<message_text>:<message_text>):{audit_message} 在目前工作表的「稽核記錄」EventType 對應分頁中,找到 EventType audit_log_type 會對應至 metadata.product_event_type

metadata_ingested_timestamp 會對應至「metadata.event_timestamp」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.plateform 已設為「LINUX」

資料會對應至鍵/值組合-> 目前工作表 audit.log 分頁中的 UDM 對應

var/ossec/logs/ossec.log 2022/05/12 18:15:34 ossec-syscheckd:資訊:開始執行 syscheck 掃描 {timestamp} {application}(({pid}))<optional_field>{severity}:{metadata_description} STATUS_UPDATE

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

metadata_description 會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:34:27 ossec-logcollector: INFO: Monitoring full output of command(360): last -n 5 {timestamp} {application}(({pid})<optional_field>{severity}:(?<metadata_description>.*command.*(<message_text>)):{command_line} PROCESS_UNCATEGORIZED

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

將 command_line 對應至 target.process.command_line

metadata_description 會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:34:27 ossec-analysisd(1210): ERROR: Queue '/queue/alerts/ar' not accessible: 'Connection refused'. {timestamp} {application}(({pid}))<optional_field>{severity}: 佇列「{resource}」<message_text>:'{metadata_description}' USER_RESOURCE_ACCESS

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

metadata_description 會對應至 metadata.description

resource 會對應至 target.resource.name

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:34:27 ossec-logcollector(1950):INFO:分析檔案:'/var/log/rundeck/rundeck.log'。 {timestamp} {application}(({pid}))<optional_field>{severity}:(?<metadata_description><message_tewxt>file<message_text>):'{file_path}' FILE_UNCATEGORIZED

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

file_path 會對應至 target.file.full_path

metadata_description 會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:34:25 ossec-syscheckd: INFO: ignoring: 'C:\WINDOWS/PCHEALTH/HELPCTR/DataColl' {timestamp} {application}(({pid})<optional_field>{severity}:<message_text>ignoring<message_text>:'{file_path}' SCAN_PROCESS

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

file_path 會對應至 target.file.full_path

metadata.vendor_name 設為 OSSEC

metadata.product_name 設為 OSSEC

var/ossec/logs/ossec.log 2022/05/11 19:34:21 ossec-remoted(1410):INFO:讀取驗證金鑰檔案。 {timestamp} {application}(({pid}))<optional_field>{severity}:{metadata_description} STATUS_UPDATE

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

metadata_description 會對應至 metadata.description

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:34:21 ossec-remoted(1103):錯誤:無法開啟檔案「/queue/rids/004」,原因為 [(13)-(Permission denied)]。 {timestamp} {application}(({pid})<optional_field>{severity}:(?<metadata_description><message_text>file<message_text>) '{file_path}'<message_text>[({error_code})-({error_metadata_description})] FILE_UNCATEGORIZED

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

file_path 會對應至 target.file.full_path

metadata_description 會對應至 metadata.description

error_code 會對應至 security_result.summary

error_metadata_description 會對應至 security_result.summary

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/03/23 13:00:51 ossec-remoted(1206): ERROR: Unable to Bind port '1514' {timestamp} {application}(({pid}))<optional_field>{severity}:{metadata_description}port'{port}' STATUS_UPDATE

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

metadata_description 會對應至 metadata.description

port 會對應至 target.port

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:32:05 ossec-analysisd: INFO: 讀取規則檔案:'ms-se_rules.xml' {timestamp} {application}(({pid}))<optional_field>{severity}:{metadata_description}:'{file_path}' FILE_READ

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

metadata_description 會對應至 metadata.description

file_path 會對應至 target.file.full_path

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

var/ossec/logs/ossec.log 2022/05/11 19:32:06 ossec-analysisd: INFO: 忽略檔案:'/etc/mnttab' {timestamp} {application}(({pid}))<optional_field>{severity}:<message_text>(ignoring|Ignoring file)<message_text>:'{file_path}' FILE_UNCATEGORIZED

application 會對應至 target.application

pid 會對應至 target.process.pid

嚴重性會對應至 security_result.severity

file_path 會對應至 target.file.full_path

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

ntpd 程序 udp6 0 0 fe80::c59:3eff:fe14:123 :::* 999 20209 570/ntpd {protocol}{rec}{send}{ip}:{port}<message_text>{pid}/{process_name} STATUS_UPDATE

protocol 會對應至 network.ip_protocol

pid 會對應至 principal.process.pid

將 metadata.description 設為「Program name: %{process_name}」

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

syscheck 檔案「/usr/bin/fwts」已修改 檔案「{file_path}」{description} FILE_MODIFICATION

description 會對應至 metadata.description

file_path 會對應至 target.file.full_path

將 metadata.vendor_name 設為「OSSEC」

將 metadata.product_name 設為「OSSEC」

principal.platform 設為「LINUX」

稽核

稽核記錄欄位至 UDM 欄位

下表列出稽核記錄類型的記錄欄位,以及對應的 UDM 欄位。

記錄欄位 UDM 欄位
acct target.user.user_display_name
addr principal.ip
arch about.labels.key/value
auid target.user.userid
cgroup principal.process.file.full_path
cmd target.process.command_line
comm target.application
cwd target.file.full_path
資料 about.labels.key/value
devmajor about.labels.key/value
devminor about.labels.key/value
egid target.group.product_object_id
euid target.user.userid
exe target.process.file.full_path
exit target.labels.key/value
家庭 如果「ip_protocol」== 2,則將 network.ip_protocol 設為「IP6IN4」,否則設為「UNKNOWN_IP_PROTOCOL」
filetype target.file.mime_type
fsgid target.group.product_object_id
fsuid target.user.userid
gid target.group.product_object_id
主機名稱 target.hostname
icmptype network.ip_protocol 設為「ICMP」
id 如果 [audit_log_type] == "ADD_USER",則 target.user.userid 會設為 "%{id}"

如果 [audit_log_type] == "ADD_GROUP",則 target.group.product_object_id 會設為「%{id}」

否則,會將 target.user.attribute.labels.key/value 設為 id

索引節點 target.resource.product_object_id
security_result.detection_fields.key/value
list security_result.about.labels.key/value
模式 target.resource.attribute.permissions.name

target.resource.attribute.permissions.type

name target.file.full_path
new-disk target.resource.name
new-mem target.resource.attribute.labels.key/value
new-vcpu target.resource.attribute.labels.key/value
new-net pincipal.mac
new_gid target.group.product_object_id
oauid target.user.userid
ocomm target.process.command_line
opid target.process.pid
oses network.session_id
ouid target.user.userid
obj_gid target.group.product_object_id
obj_role target.user.attribute.role.name
obj_uid target.user.userid
obj_user target.user.user_display_name
ogid target.group.product_object_id
ouid target.user.userid
路徑 target.file.full_path
perm target.asset.attribute.permissions.name
pid target.process.pid
ppid target.parent_process.pid
proto 如果 [ip_protocol] == 2,network.ip_protocol 會設為「IP6IN4」

否則,network.ip_protocol 會設為「UNKNOWN_IP_PROTOCOL」

res security_result.summary
結果 security_result.summary
saddr security_result.detection_fields.key/value
sauid target.user.attribute.labels.key/value
ses network.session_id
sgid target.group.product_object_id
sig security_result.detection_fields.key/value
subj_user target.user.user_display_name
success 如果 success=='yes',則 securtiy_result.summary 會設為 'system call was successful'

否則,securtiy_result.summary 會設為「systemcall was failed」

suid target.user.userid
syscall about.labels.key/value
終端機 target.labels.key/value
tty target.labels.key/value
uid 如果 [audit_log_type] 在 [SYSCALL、SERVICE_START、ADD_GROUP、ADD_USER、MAC_IPSEC_EVENT、MAC_UNLBL_STCADD、OBJ_PID、CONFIG_CHANGE、SECCOMP、USER_CHAUTHTOK、USYS_CONFIG、DEL_GROUP、DEL_USER、USER_CMD、USER_MAC_POLICY_LOAD] 中設為 principal.user.userid

否則,系統會將 uid 設為 target.user.userid

vm target.resource.name

稽核記錄類型與 UDM 事件類型

下表列出稽核記錄類型及其對應的 UDM 事件類型。

稽核記錄類型 UDM 事件類型 說明
ADD_GROUP GROUP_CREATION 在新增使用者聊天室群組時觸發。
ADD_USER USER_CREATION 在新增使用者空間使用者帳戶時觸發。
ANOM_ABEND GENERIC_EVENT / PROCESS_TERMINATION 在程序異常結束 (搭配可導致核心傾印的訊號,如果已啟用) 時觸發。
AVC GENERIC_EVENT 觸發事件,以便記錄 SELinux 權限檢查。
CONFIG_CHANGE USER_RESOURCE_UPDATE_CONTENT 當稽核系統設定經過修改時觸發。
CRED_ACQ USER_LOGIN 在使用者取得使用者空間憑證時觸發。
CRED_DISP USER_LOGOUT 在使用者處置使用者空間憑證時觸發。
CRED_REFR USER_LOGIN 使用者重新整理使用者空間憑證時觸發。
CRYPTO_KEY_USER USER_RESOURCE_ACCESS 觸發時會記錄用於加密目的的加密編譯金鑰 ID。
CRYPTO_SESSION PROCESS_TERMINATION 觸發事件會在建立 TLS 工作階段時記錄參數。
CWD SYSTEM_AUDIT_LOG_UNCATEGORIZED 觸發錄製目前的工作目錄。
DAEMON_ABORT PROCESS_TERMINATION 當 daemon 因錯誤而停止時觸發。
DAEMON_END PROCESS_TERMINATION 在成功停止 Daemon 時觸發。
DAEMON_RESUME PROCESS_UNCATEGORIZED 在 auditd 守護程式恢復記錄時觸發。
DAEMON_ROTATE PROCESS_UNCATEGORIZED 當 auditd 守護程序輪替稽核記錄檔時觸發。
DAEMON_START PROCESS_LAUNCH 在 auditd 守護程序啟動時觸發。
DEL_GROUP GROUP_DELETION 在刪除使用者空間群組時觸發
待處理 USER_DELETION 在刪除使用者空間使用者時觸發
EXECVE PROCESS_LAUNCH 觸發事件用於記錄 execve(2) 系統呼叫的引數。
MAC_CONFIG_CHANGE GENERIC_EVENT 在 SELinux 布林值變更時觸發。
MAC_IPSEC_EVENT SYSTEM_AUDIT_LOG_UNCATEGORIZED 觸發時機:偵測到 IPSec 事件或 IPSec 設定變更時,系統會記錄 IPSec 事件相關資訊。
MAC_POLICY_LOAD GENERIC_EVENT 載入 SELinux 政策檔案時觸發。
MAC_STATUS GENERIC_EVENT 當 SELinux 模式 (強制執行、寬鬆、關閉) 變更時觸發。
MAC_UNLBL_STCADD SYSTEM_AUDIT_LOG_UNCATEGORIZED 在使用 NetLabel 提供的核心封包標示功能時,新增靜態標籤時觸發。
NETFILTER_CFG GENERIC_EVENT 偵測到 Netfilter 鏈條修改時觸發。
OBJ_PID SYSTEM_AUDIT_LOG_UNCATEGORIZED 觸發時會記錄傳送信號的程序相關資訊。
路徑 FILE_OPEN/GENERIC_EVENT 觸發事件可記錄檔案名稱路徑資訊。
SELINUX_ERR GENERIC_EVENT 偵測到內部 SELinux 錯誤時觸發。
SERVICE_START SERVICE_START 在服務啟動時觸發。
SERVICE_STOP SERVICE_STOP 在服務停止時觸發。
SYSCALL GENERIC_EVENT 觸發事件,以便記錄系統對核心的呼叫。
SYSTEM_BOOT STATUS_STARTUP 系統開機時觸發。
SYSTEM_RUNLEVEL STATUS_UPDATE 系統的執行層級變更時觸發。
SYSTEM_SHUTDOWN STATUS_SHUTDOWN 在系統關機時觸發。
USER_ACCT SETTING_MODIFICATION 在修改使用者空間使用者帳戶時觸發。
USER_AUTH USER_LOGIN 在偵測到使用者空間驗證嘗試時觸發。
USER_AVC USER_UNCATEGORIZED 在產生使用者空間 AVC 訊息時觸發。
USER_CHAUTHTOK USER_RESOURCE_UPDATE_CONTENT 在使用者帳戶屬性修改時觸發。
USER_CMD USER_COMMUNICATION 在執行使用者空間的殼層指令時觸發。
USER_END USER_LOGOUT 在使用者空間工作階段結束時觸發。
USER_ERR USER_UNCATEGORIZED 在偵測到使用者帳戶狀態錯誤時觸發。
USER_LOGIN USER_LOGIN 在使用者登入時觸發。
USER_LOGOUT USER_LOGOUT 在使用者登出時觸發。
USER_MAC_POLICY_LOAD RESOURCE_READ 在使用者空間守護程式載入 SELinux 政策時觸發。
USER_MGMT USER_UNCATEGORIZED 觸發事件,以記錄使用者空間管理資料。
USER_ROLE_CHANGE USER_CHANGE_PERMISSIONS 在使用者的 SELinux 角色變更時觸發。
USER_START USER_LOGIN 在啟動使用者空間工作階段時觸發。
USYS_CONFIG USER_RESOURCE_UPDATE_CONTENT 偵測到使用者空間系統設定變更時觸發。
VIRT_CONTROL STATUS_UPDATE 在啟動、暫停或停止虛擬機器時觸發。
VIRT_MACHINE_ID USER_RESOURCE_ACCESS 觸發事件,記錄標籤與虛擬機器的繫結狀態。
VIRT_RESOURCE USER_RESOURCE_ACCESS 觸發事件,用於記錄虛擬機器的資源指派。

郵件

郵件記錄欄位至 UDM 欄位

下表列出郵件記錄類型的記錄欄位,以及對應的 UDM 欄位。

記錄欄位 UDM 欄位
類別 about.labels.key/value
Ctladdr principal.user.user_display_name
來自 network.email.from
msgid network.email.mail_id
Proto network.application_protocol
轉發 intermediary.hostname

intermediary.ip

尺寸 network.received_bytes
統計資料 security_result.summary
network.email.to

郵件記錄類型與 UDM 事件類型

下表列出郵件記錄類型及其對應的 UDM 事件類型。

郵件記錄類型 UDM 事件類型
sendmail GENERIC_EVENT
上車 EMAIL_UNCATEGORIZED
清理 GENERIC_EVENT
qmgr EMAIL_UNCATEGORIZED
smtp GENERIC_EVENT
local EMAIL_UNCATEGORIZED

後續步驟

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