Hi Nikolai
Good to know you alredy fix it!!
In this case we are not capturing the application, and your rule searches for the program name, we could take 2 ways, unglob the host with the pfSense and capture that as program_name
I that case we have to change the decoder too, Or change the rule to validate the fields captured by the current decoder.
Option 1: New rule with current decoder. <rule id="100100" level="5">
<field name="host" type="pcre2">pfSense</field>
<description>pfSense log arrived</description>
</rule>
Testing it
/var/ossec/bin/wazuh-logtest
Starting wazuh-logtest v4.6.0
Type one log per line
1 2023-11-06T18:43:48.398094+01:00 pfSense.meinlab.local filterlog 26614 - - 81,,,10001,em1,match,pass,in,4,0x0,,64,740,0,none,6,tcp,60,10.10.10.101,10.10.10.1,32846,80,0,S,4272229248,,64240,,mss; sackOK;TS;nop;wscale
**Phase 1: Completed pre-decoding.
full event: '1 2023-11-06T18:43:48.398094+01:00 pfSense.meinlab.local filterlog 26614 - - 81,,,10001,em1,match,pass,in,4,0x0,,64,740,0,none,6,tcp,60,10.10.10.101,10.10.10.1,32846,80,0,S,4272229248,,64240,,mss; sackOK;TS;nop;wscale'
**Phase 2: Completed decoding.
name: 'pfsense'
action: 'filterlog'
date: '2023-11-06T18:43:48.398094+01:00'
host: 'pfSense.meinlab.local'
**Phase 3: Completed filtering (rules).
id: '100100'
level: '5'
description: 'pfSense log arrived'
groups: '['test']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
Option 2: Updating the decoderDecoder:
<decoder name="pfsense-child">
<parent>pfsense</parent>
<regex type="pcre2">\d+\s+(\d+-\d+-\d+T\d+:\d+:\d+.\d+\+\d+:\d+)\s+((pfSense)\S+)\s+(\S+)\s+</regex>
<order>date,host,program_name,action</order>
</decoder>
Rule:
<rule id="100111" level="5">
<decoded_as>pfsense</decoded_as>
<description>pfSense log arrived</description>
</rule>
Testing it
/var/ossec/bin/wazuh-logtest
Type one log per line
1 2023-11-06T18:43:48.398094+01:00 pfSense.meinlab.local filterlog 26614 - - 81,,,10001,em1,match,pass,in,4,0x0,,64,740,0,none,6,tcp,60,10.10.10.101,10.10.10.1,32846,80,0,S,4272229248,,64240,,mss; sackOK;TS;nop;wscale
**Phase 1: Completed pre-decoding.
full event: '1 2023-11-06T18:43:48.398094+01:00 pfSense.meinlab.local filterlog 26614 - - 81,,,10001,em1,match,pass,in,4,0x0,,64,740,0,none,6,tcp,60,10.10.10.101,10.10.10.1,32846,80,0,S,4272229248,,64240,,mss; sackOK;TS;nop;wscale'
**Phase 2: Completed decoding.
name: 'pfsense'
action: 'filterlog'
date: '2023-11-06T18:43:48.398094+01:00'
host: 'pfSense.meinlab.local'
program_name: 'pfSense'
**Phase 3: Completed filtering (rules).
id: '100111'
level: '5'
description: 'pfSense log arrived'
groups: '['test']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
Regards!