I have been struggling trying to get my globalprotect authentication logs decoded. I have tested my decoder with a regex debugger and I think they should be right but I am not seeing any of the fields that are in my decoder, just very generic info. Here is my local_decoder:
<decoder name="paloalto-globalprotect-fields">
<parent>paloalto</parent>
<prematch type="pcre2">^[^,]*,\d+\/\d+\/\d+\s\d+:\d+:\d+,\d+,GLOBALPROTECT,</prematch>
<regex type="pcre2">^[^,]*,(\d+\/\d+\/\d+\s\d+:\d+:\d+),(\d+),(GLOBALPROTECT)</regex>
<order>receive_time, serial_number, type</order>
</decoder>
<decoder name="paloalto-globalprotect-fields">
<parent>paloalto</parent>
<regex type="pcre2" offset="after_regex">^,([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)</regex>
<order>content_type, generated_time, virtual_system, event_id, stage, authentication_method, tunnel_type, source_user, source_region, machine_name, public_ip, public_ipv6, private_ip, private_ipv6, host_id, serial_number, client_version, client_os, client_os_version, repeat_count, reason, error, description, status, location, login_duration, connect_method, error_code, portal, sequence_number, action_flags, high_res_timestamp, selection_type, response_time, priority, attempted_gateways, gateway, device_group_hierarchy_level_1, device_group_hierarchy_level_2, device_group_hierarchy_level_3, device_group_hierarchy_level_4, virtual_system_name, device_name, virtual_system_id</order>
</decoder>
Here is the log from wazuh:
2023 Apr 17 21:11:52 (syslog.server) any->/var/log/hosts/firewall-messages.log <190>1 2023-04-17T11:11:52-10:00
S3AA3-PA5220-01.summit.nso.edu - - - - 1,2023/04/17 11:11:51,013201027519,GLOBALPROTECT,0,2561,2023/04/17 11:11:51,vsys1,portal-auth,login,Other,,testuser-local,US,Test-MacBook-Pro,66.8.174.83,0.0.0.0,0.0.0.0,0.0.0.0,3c:22:fb:3e:11:78,C02CJ2W9ML7J,6.0.3,Mac,"Apple Mac OS X 13.3.1",1,,,,success,,0,,0,Summit VPN,7199699939377566884,0x0,2023-04-17T11:11:52.624-10:00,,,,,,0,0,0,0,,S3AA3-PA5220-01,0
From what I understand the prematch should match:
2023 Apr 17 21:11:52 (syslog.server) any->/var/log/hosts/firewall-messages.log <190>1 2023-04-17T11:11:52-10:00
S3AA3-PA5220-01.summit.nso.edu - - - - 1,2023/04/17 11:11:51,013201027519,GLOBALPROTECT
Which leaves the "after_regex":
,2023 Apr 17 21:11:52 (syslog.server) any->/var/log/hosts/firewall-messages.log <190>1 2023-04-17T11:11:52-10:00
S3AA3-PA5220-01.summit.nso.edu - - - - 1,2023/04/17 11:11:51,013201027519,GLOBALPROTECT
Which according to the regexp debugger should match:
<regex type="pcre2" offset="after_regex">^,([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),[^,]*,([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)</regex>
Any help would be greatly appreciated