Hi, I hope you are well.
I made some decoders for you.
you should put it at the top inside the /var/ossec/ruleset/decoders/0065-cisco-ios decoders.xml file
remember that if you update the manager, the default files will be overridden
<decoder name="fwsma">
<prematch>\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %FWSM-\S+:</prematch>
</decoder>
<decoder name="fwsma-fw3">
<parent>fwsma</parent>
<regex type="pcre2">(\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d): %FWSM-(\S+):</regex>
<order>datetime,fwsm_rule</order>
</decoder>
<decoder name="fwsma-fw3">
<parent>fwsma</parent>
<regex type="pcre2">src outside:((?:\d{1,3}\.){3}\d{1,3})(?:\/(\d+))?</regex>
<order>srcip,srcport</order>
</decoder>
<decoder name="fwsma-fw3">
<parent>fwsma</parent>
<regex type="pcre2">dst.*?:((?:\d{1,3}\.){3}\d{1,3})(?:\/(\d+))?</regex>
<order>dstip,dstport</order>
</decoder>
<decoder name="fwsma-fw3">
<parent>fwsma</parent>
<regex type="pcre2">by access-group\s(\S+)\s(\[0[xX][0-9a-fA-F]+,\s0[xX][0-9a-fA-F]+\])</regex>
<order>accessgroup,value</order>
</decoder>
put the rule here /var/ossec/etc/rules/local_rules.xml
<rule id="100210" level="5">
<decoded_as>fwsma</decoded_as>
<description>fwsm event</description>
<group>fwsmia</group>
</rule>
you can test with /var/ossec/bin/wazuh-logtest and paste the full log :
output:
Starting wazuh-logtest v4.5.0
Type one log per line
Apr 21 2020 20:07:29: %FWSM-4-106023: Deny udp src outside:
172.16.151.218/64569 dst cgsi_piso3_172.30.2.:
172.30.2.70/161 by access-group "ACCESS_IN_outside" [0x0, 0x0]
**Phase 1: Completed pre-decoding.
full event: 'Apr 21 2020 20:07:29: %FWSM-4-106023: Deny udp src outside:
172.16.151.218/64569 dst cgsi_piso3_172.30.2.:
172.30.2.70/161 by access-group "ACCESS_IN_outside" [0x0, 0x0]'
**Phase 2: Completed decoding.
name: 'fwsma'
accessgroup: '"ACCESS_IN_outside"'
datetime: 'Apr 21 2020 20:07:29'
dstip: '172.30.2.70'
dstport: '161'
fwsm_rule: '4-106023'
srcip: '172.16.151.218'
srcport: '64569'
value: '[0x0, 0x0]'
**Phase 3: Completed filtering (rules).
id: '100210'
level: '5'
description: 'fwsm event'
groups: '['yara', 'fwsmia']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
Regards