Hi gulguly64
I hope you are doing fine! thanks for use Wazuh!
Analyzing the custom decoders that you use, I wonder if the example log is the correct, maybe it arrives with a syslog header, in that case the pre-decoder will capture the program_name field and that make sense use program_name as a filter in the custom decoder.
Did you find some Trend Micro events into Wazuh manager? to verify the correct log format please look for some events into
/var/ossec/logs/archives/archives.json, if
archives.json file doesn't exist, modify manager
ossec.conf to include log all options as following configuration, restart the manager to enable it.
<ossec_config>
<global>
<alerts_log>yes</alerts_log>
<logall>yes</logall>
<logall_json>yes</logall_json>
</global>Maybe the log will looks as:
Apr 7 13:15:07 user CEF:0|Trend Micro|Apex Central|2019...I suspect it because of how the decoder is made, otherwise, I did some changes in the custom decoders to match your example log.
New custom decoder
<decoder name="cef_trend_micro">
<prematch>CEF:0\|Trend Micro\|</prematch>
</decoder>
<decoder name="cef_apex_central">
<parent>cef_trend_micro</parent>
<prematch>Trend Micro\|Apex Central\|</prematch>
<regex type="pcre2">CEF:0\|Trend Micro\|([^\|]+)\|(\d+)\|</regex>
<order>application,version,type</order>
</decoder>
Then I run wazuh-logtest and the results are successfully:
/var/ossec/bin/wazuh-logtest
Type one log per line
CEF:0|Trend Micro|Apex Central|2019|BM:1000|Behavior Monit oring|3|rt=Aug 16 2017 05:00:40 GMT+00:00 dvchost=localhost cn1Label=Risk_Level cn1=1 cs2Label=Policy cs2=1000 sproc=C:\ \Windows\\SysWOW64\\rundll32.exe cn2Label=Event_Type cn2=4 c s1Label=Target cs1=HKCU\\Software\\Microsoft\\Windows\\Curre ntVersion\\Run\\COM+ act=3 cn3Label=Operation cn3=302 shost= shost1 src=10.0.76.40 deviceFacility=Apex One
**Phase 1: Completed pre-decoding.
full event: 'CEF:0|Trend Micro|Apex Central|2019|BM:1000|Behavior Monit oring|3|rt=Aug 16 2017 05:00:40 GMT+00:00 dvchost=localhost cn1Label=Risk_Level cn1=1 cs2Label=Policy cs2=1000 sproc=C:\ \Windows\\SysWOW64\\rundll32.exe cn2Label=Event_Type cn2=4 c s1Label=Target cs1=HKCU\\Software\\Microsoft\\Windows\\Curre ntVersion\\Run\\COM+ act=3 cn3Label=Operation cn3=302 shost= shost1 src=10.0.76.40 deviceFacility=Apex One'
**Phase 2: Completed decoding.
name: 'cef_trend_micro'
parent: 'cef_trend_micro'
application: 'Apex Central'
version: '2019'
Let me know if that works.
Regards.