Hi Fabian,
sorry for my late answer, but I had some urgent problem to solve at work.
In attachment you can find the logs you need. To be honest, it seems there are no particular errors.
It is very strange. wazuh-logtest is ok, alerts are saved in alerts.log and alerts.json, but these specific alerts don't appear in security events wazuh dashboard.
You can see below a summary of my logs, decoders and rules.
Mar 23 19:04:35 smc: {"Timestamp":"2024-03-23 19:04:35","LogId":"887785301","NodeId":"9.9.9.9","Facility":"SSL VPN","Type":"Notification","Src":"2.2.2.2","Dst":"1.1.1.1","Service":"HTTPS","Protocol":"6","Sport":"49228","Dport":"443","AccElapsed":"15","Username":"ad07521","CompId":"Location node 1","InfoMsg":"Mobile session created","ReceptionTime":"2024-03-23 19:04:35","SenderType":"Firewall","Situation":"User-Session-Created","EventId":"7177364623462139733","UserDomain":"idm.cmcc.scc"}
alerts.log:Mar 23 19:04:35 smc: {"Timestamp":"2024-03-23 19:04:35","LogId":"887785301","NodeId":"9.9.9.9","Facility":"SSL VPN","Type":"Notification","Src":"2.2.2.2","Dst":"1.1.1.1","Service":"HTTPS","Protocol":"6","Sport":"49228","Dport":"443","AccElapsed":"15","Username":"ad07521","CompId":"Location node 1","InfoMsg":"Mobile session created","ReceptionTime":"2024-03-23 19:04:35","SenderType":"Firewall","Situation":"User-Session-Created","EventId":"7177364623462139733","UserDomain":"idm.cmcc.scc"}
alerts.json:{"timestamp":"2024-03-23T18:04:36.029+0000","rule":{"level":5,"description":"SSL VPN Mobile Session created","id":"100310","firedtimes":1,"mail":false,"groups":["forcepoint"]},"agent":{"id":"000","name":"curiosity"},"manager":{"name":"curiosity"},"id":"1711217076.7617433","full_log":"Mar 23 19:04:35 smc: {\"Timestamp\":\"2024-03-23 19:04:35\",\"LogId\":\"887785301\",\"NodeId\":\"9.9.9.9\",\"Facility\":\"SSL VPN\",\"Type\":\"Notification\",\"Src\":\"2.2.2.2\",\"Dst\":\"1.1.1.1\",\"Service\":\"HTTPS\",\"Protocol\":\"6\",\"Sport\":\"49228\",\"Dport\":\"443\",\"AccElapsed\":\"15\",\"Username\":\"ad07521\",\"CompId\":\"Location node 1\",\"InfoMsg\":\"Mobile session created\",\"ReceptionTime\":\"2024-03-23 19:04:35\",\"SenderType\":\"Firewall\",\"Situation\":\"User-Session-Created\",\"EventId\":\"7177364623462139733\",\"UserDomain\":\"idm.cmcc.scc\"}","predecoder":{"program_name":"smc","timestamp":"Mar 23 19:04:35","hostname":"smc:"},"decoder":{"name":"fp"},"data":{"protocol":"6","srcip":"2.2.2.2","dstip":"1.1.1.1","timestamp":"2024-03-23 19:04:35","logid":"887785301","nodeid":"9.9.9.9","facility":"SSL VPN","type":"Notification","service":"HTTPS","sport":"49228","dport":"443","accelapsed":"15","username":"ad07521","compid":"Location node 1","infomsg":"Mobile session created","receptiontime":"2024-03-23 19:04:35","sendertype":"Firewall","situation":"User-Session-Created","eventid":"7177364623462139733","userdomain":"idm.cmcc.scc"},"location":"/var/log/forcepoint/vpn.log"}
You can see below the custom decoders I created for our firewall:
<decoder name="fp">
<program_name>smc</program_name>
</decoder>
<decoder name="fp-ngfw">
<parent>fp</parent>
<regex offset="after_parent" type="pcre2">{"Timestamp":"([^"]*)","LogId":"([^"]*)","NodeId":"([^"]*)","Facility":"([^"]*)","Type":"([^"]*)","Src":"([^"]*)","Dst":"([^"]*)","Service":"([^"]*)","Protocol":"([^"]*)","Sport":"([^"]*)","Dport":"([^"]*)","AccElapsed":"([^"]*)","Username":"([^"]*)","CompId":"([^"]*)","InfoMsg":"([^"]*)","ReceptionTime":"([^"]*)","SenderType":"([^"]*)","Situation":"([^"]*)","EventId":"([^"]*)","UserDomain":"([^"]*)"}</regex>
<order>timestamp, logid, nodeid, facility, type, srcip, dstip, service, protocol, sport, dport, accelapsed, username, compid, infomsg, receptiontime, sendertype, situation, eventid, userdomain</order>
</decoder>
<!--
<decoder name="fp-ngfw">
<parent>fp</parent>
<regex offset="after_parent" type="pcre2">{"Timestamp":"([^"]*)","EventId":"([^"]*)","NodeId":"([^"]*)","CompId":"([^"]*)","UserOriginator":"([^"]*)","ClientIpAddress":"([^"]*)","TypeDescription":"([^"]*)","Result":"([^"]*)","ObjetcName":"([^"]*)","InfoMsg":"([^"]*)","SenderType":"([^"]*)"}</regex>
<order>timestamp, eventid, nodeid, compid, originator, srcip, typedesc, result, objectname, infomsg, sendertype</order>
</decoder>
-->
And this is the rule:
<rule id="100310" level="5">
<decoded_as>fp</decoded_as>
<field name="infomsg">Mobile session created</field>
<description>SSL VPN Mobile Session created for $(username) from $(srcip)</description>
</rule>
You can see below the custom decoders I created for our firewall:
<decoder name="fp">
<program_name>smc</program_name>
</decoder>
<decoder name="fp-ngfw">
<parent>fp</parent>
<regex offset="after_parent" type="pcre2">{"Timestamp":"([^"]*)","LogId":"([^"]*)","NodeId":"([^"]*)","Facility":"([^"]*)","Type":"([^"]*)","Src":"([^"]*)","Dst":"([^"]*)","Service":"([^"]*)","Protocol":"([^"]*)","Sport":"([^"]*)","Dport":"([^"]*)","AccElapsed":"([^"]*)","Username":"([^"]*)","CompId":"([^"]*)","InfoMsg":"([^"]*)","ReceptionTime":"([^"]*)","SenderType":"([^"]*)","Situation":"([^"]*)","EventId":"([^"]*)","UserDomain":"([^"]*)"}</regex>
<order>timestamp, logid, nodeid, facility, type, srcip, dstip, service, protocol, sport, dport, accelapsed, username, compid, infomsg, receptiontime, sendertype, situation, eventid, userdomain</order>
</decoder>
<!--
<decoder name="fp-ngfw">
<parent>fp</parent>
<regex offset="after_parent" type="pcre2">{"Timestamp":"([^"]*)","EventId":"([^"]*)","NodeId":"([^"]*)","CompId":"([^"]*)","UserOriginator":"([^"]*)","ClientIpAddress":"([^"]*)","TypeDescription":"([^"]*)","Result":"([^"]*)","ObjetcName":"([^"]*)","InfoMsg":"([^"]*)","SenderType":"([^"]*)"}</regex>
<order>timestamp, eventid, nodeid, compid, originator, srcip, typedesc, result, objectname, infomsg, sendertype</order>
</decoder>
-->
And this is the rule: <rule id="100310" level="5">
<decoded_as>fp</decoded_as>
<field name="infomsg">Mobile session created</field>
<description>SSL VPN Mobile Session created for $(username) from $(srcip)</description>
</rule>
Thank you,
Mauro