Gracias Nico, Todo funciona perfectamente,
He creado un decoder y rule nuevo para un tipo de log que no termina de salir:
Log: solo cambia un guión y la fecha solo tiene un dígito (9)
May 9 12:27:06 control KerioControl IPS: Alert, severity: Low, Rule ID: 1:2013409 ET POLICY Outbound MSSQL Connection to Non-Standard Port - Likely Malware, proto:TCP, ip/port:
192.168.4.21:60412 ->
20.216.165.5:63009
Rule:
<group name="ids,">
<rule id="110002" level="6">
<category>ids</category>
<description>Evento IDS/IPS Alerta $(severity) $(rule_id) $(proto) $(srcip) $(dstip)</description>
</rule>
</group>
Decoder:
<decoder name="kerio1">
<program_name>KerioControl1</program_name>
</decoder>
<decoder name="kerio1">
<type>ids</type>
<prematch type="pcre2">IPS: Alert|Packet drop, </prematch>
<regex type="pcre2">severity: (\w+), Rule ID: (.*?) - (.*), proto:(\w+), ip\/port:(\d+.\d+.\w+.\w+):(\d+) -> (\d+.\d+.\w+.\w+):((\d+))</regex>
<order>severity, rule_id, proto, srcip, srcport, dstip, dstport, type</order>
</decoder>
Pero hace referencia al decorder y reglas anteriores:
**Phase 1: Completed pre-decoding.
full event: 'May 9 12:27:06 control KerioControl IPS: Alert, severity: Low, Rule ID: 1:2013409 ET POLICY Outbound MSSQL Connection to Non-Standard Port - Likely Malware, proto:TCP, ip/port:
192.168.4.21:60412 ->
20.216.165.5:63009'
timestamp: 'May 9 12:27:06'
hostname: 'control'
**Phase 2: Completed decoding.
name: 'kerio'
**Phase 3: Completed filtering (rules).
id: '110001'
level: '6'
description: 'Evento IDS/IPS Alerta '
groups: '["ids"]'
firedtimes: '1'
mail: 'false'
**Alert to be generated
El viernes, 5 de mayo de 2023 a las 8:38:14 UTC+2, suri cata escribió: