I have created a conditional grok filter for audit log and seperated the SYSCALL event from audit. Created a parser for SYSCALL.
This commit is contained in:
@@ -224,6 +224,37 @@ pipelineConfig:
|
||||
- drop_events:
|
||||
drop_when: '/log_source != "audit.audit.log"'
|
||||
|
||||
- grok:
|
||||
break_on_match: true
|
||||
match:
|
||||
log:
|
||||
- '^type=%{WORD:log_type} msg=audit\(%{INT:timestamp_seconds}\.%{INT:timestamp_fraction}:%{INT:event_id}\): %{GREEDYDATA:msg}'
|
||||
target_key: audit
|
||||
|
||||
- grok:
|
||||
break_on_match: true
|
||||
grok_when: '/audit/log_type == "SYSCALL"'
|
||||
match:
|
||||
/audit/msg:
|
||||
- ^arch=%{WORD:arch} syscall=%{INT:syscall_id} success=%{WORD:success}
|
||||
exit=%{INT:exit_code} a0=%{NOTSPACE:a0} a1=%{NOTSPACE:a1} a2=%{NOTSPACE:a2}
|
||||
a3=%{NOTSPACE:a3} items=%{INT:items} ppid=%{INT:ppid} pid=%{INT:pid} auid=%{INT:auid}
|
||||
uid=%{INT:uid} gid=%{INT:gid} euid=%{INT:euid} suid=%{INT:suid} fsuid=%{INT:fsuid}
|
||||
egid=%{INT:egid} sgid=%{INT:sgid} fsgid=%{INT:fsgid} tty=%{GREEDYDATA:terminal}
|
||||
ses=%{INT:ses} comm=\"%{NOTSPACE:comm}\" exe=\"%{GREEDYDATA:exe}\" subj=%{GREEDYDATA:subject}
|
||||
key=\"%{WORD:key}\".*ARCH=%{GREEDYDATA:architecture} SYSCALL=%{WORD:syscall} AUID=\"%{GREEDYDATA:AUID}\"
|
||||
UID=\"%{GREEDYDATA:UID}\" GID=\"%{GREEDYDATA:GID}\" EUID=\"%{GREEDYDATA:EUID}\" SUID=\"%{GREEDYDATA:SUID}\"
|
||||
FSUID=\"%{GREEDYDATA:FSUID}\"
|
||||
EGID=\"%{GREEDYDATA:EGID}\" SGID=\"%{GREEDYDATA:SGID}\" FSGID=\"%{GREEDYDATA:FSGID}\"
|
||||
target_key: syscall
|
||||
- date:
|
||||
match:
|
||||
- key: /audit/timestamp_seconds
|
||||
patterns:
|
||||
- epoch_second
|
||||
destination: "@timestamp"
|
||||
|
||||
|
||||
sink:
|
||||
- opensearch:
|
||||
hosts:
|
||||
@@ -235,6 +266,7 @@ pipelineConfig:
|
||||
cert: /usr/share/dataprepper/cert/root-ca.pem
|
||||
index: cpanel-audit-log-%{yyyy.MM.dd}
|
||||
|
||||
|
||||
cpanel-kernel-pipeline:
|
||||
source:
|
||||
pipeline:
|
||||
|
||||
Reference in New Issue
Block a user