criblpacks / cribl-palo-alto-networks

Process, reduce, and transform Palo Alto Networks Firewall logs.
Apache License 2.0
13 stars 7 forks source link
data logs logstream network observability palo-alto palo-alto-networks pipelines stream-processing

Cribl Pack for Palo Alto Networks Firewalls


The Cribl Pack for Palo Alto Networks Firewalls processes events with the following goals in mind:

  1. Events are received via syslog directly from Palo Alto firewalls
  2. Add Splunk metadata to events (e.g. index, source, sourcetype, host)
  3. Reduction of events by trimming the Syslog header and removing unnecessary fields such as "future_use" and "time" fields.

You should expect to see 15-30% reduction in the size of your Palo Alto Firewall log data.

Installation


  1. Install this pack from the Cribl Pack Dispensary, use the Git clone feature inside Cribl Stream, or download the most recent .crbl file from the repo releases page.
  2. Create a Route with a filter for your Palo Alto Firewall events. A sample filter to match all events:
    (sourcetype=='pan:log' || sourcetype=='pan_log' || /^[^,]+,[^,]+,[^,]+,(THREAT|TRAFFIC|SYSTEM|CONFIG|HIPMATCH|CORRELATION|USERID|GLOBALPROTECT),/.test(_raw))
  3. Select the cribl-palo-alto-networks pack as the pipeline.
  4. Configure the Global Variable (pan_default_index) inside the Pack with the appropriate Splunk index for your Palo Alto logs. By default, the index field will be set to pan_logs.

Configure Device Information

This pack assumes firewalls currently use UTC/GMT for their time zone configuration. If any device uses a local time zone, please configure an entry in the device_info.csv lookup file (located in the pack's Knowledge content) to adjust timestamps with the timezone of the firewall. The timezone acts as the offset to adjust the timestamp of the event to UTC with the Auto Timestamp function.

The lookup file expects data in two columns: host and tz.

Host

The host field accepts a regular expression to match the hostname of the firewall. The most specific regex in the lookup will be used to match the timezone.

Consider an example with the following hostnames using a standard naming convention. The format follows this pattern:

Here are some example hostnames:

The first 5 examples are in the US Central time zone. El Paso, Texas (ELP) observes Mountain Time. The final two examples are London and Tokyo, in the Europe/London and Asia/Tokyo time zones, respectively.

A regex of FW-\d+ would match all firewalls, and a specific regex of FW-US-MO-KC-\d+ would only match the firewalls in the Kansas City data center. Matches for FW-US-MO-KC\d+ will take higher precedence over the FW-\d+ regex. This functionality can be used to match specific firewalls or groups of firewalls and provide a timezone for each with increasing precedence. More information about this behavior is provided on the Cribl Documentation Lookup Function page.

Timezone Configuration

Time zones are configured using Olson formatted timezones (e.g. America/Chicago) C.Time.adjustTZ. A listing of time zones can be found here.

Cribl uses a third-party library, timezone-support, to import timezone definitions. As of the time of writing, Cribl uses version 2.0.2 of this package which supports all time zones up to the 2019a release of the IANA Time Zone Database, but may include more up-to-date entries. Please verify before using a specific timezone. All changes to the timezone database since 2016 can be found here.

Example Lookup File

Here is an example lookup file based on the scenario above utilizing increasing regex specificity for timezone matching:

host,tz
FW-US-.*,America/Chicago
FW-US-TX-ELP-.*,America/Denver
FW-JP-.*,Asia/Tokyo
FW-UK-.*,Europe/London

Firewalls not matching any entry in this list would be assumed to currently have timestamps in UTC.

Release Notes


Version 1.1.5 - 2024-09-24

Version 1.1.4 - 2024-07-02

Version 1.1.3 - 2024-07-02

Version 1.1.2 - 2023-09-21

Version 1.1.1 - 2023-03-14

Version 1.1.0 - 2022-04-12

Version 1.0.0 - 2022-03-22

Version 0.7.0 - 2022-03-10

Version 0.6.3 - 2022-03-03

Version 0.6.2 - 2021-11-17

Version 0.6.1 - 2021-11-02

Version 0.6.0 - 2021-09-14

Version 0.5.2 - 2021-08-12

Version 0.5.1 - 2021-07-21

Version 0.5.0 - 2021-07-20

Contributing to the Pack


Discuss this pack on our Community Slack channel #packs.

Contact


The author of this pack is Brendan Dalpe and can be contacted at bdalpe@cribl.io.

License


This Pack uses the following license: Apache 2.0.