Setup Log Triggers | Check Point WAF

CloudGuard WAF Logging Events

CloudGuard WAF protects web servers from attacks. It is possible to trigger a logging event that includes information about the event that was detected or prevented.

Logs can be configured to reach a variety of destinations.

The Default Log Trigger

The default setup of CloudGuard WAF is already configured with a log trigger, and so, to view logs triggered by CloudGuard WAF event detection, no additional action is required.

The default Log Trigger object is configured to log the most interesting events:

The configuration of the default Log Trigger object can be altered, but the object cannot be deleted.

If the default configuration has been altered, it is possible to click " RESET TO DEFAULT VALUES" at the bottom of the edit window to return to the default factory settings of this object as defined by Check Point.

Customizing Log Triggers

Step 1: Create a Log Trigger object

Go to Policy->Triggers and click on the New icon, the select Log:

Configure a new name to the new trigger object:

Step 2: Configure Trigger conditions ("When to Log")

Select the conditions in which logs are issued:

If configuration in CloudGuard WAF is set to "Detect" mode, Log Trigger configuration is the only action CloudGuard WAF will take upon detecting an attack.

Step 3: Configure Trigger additional content ("What to Log")

Select the additional data you want to appear in the log sent upon event.

Additional logging for suspicious events from Severity "X" - Allows conditionally adding the Response Body and Response Code to logs according to the severity of the event reported.

Adding Request Body and Response Body to logs has the potential of substantially impacting the resources and network bandwidth consumed by CloudGuard WAF, depending on the traffic. For this reason:

Step 4: Configure Trigger destination ("Where to send the Log")

This configuration determines the destination of the logs sent from the CloudGuard WAF agent, and multiple options can be selected.

The trigger destination can be:

Syslog Logging Not Supported in SaaS Deployments

When deploying Cloud Guard WAF as SaaS solution, forwarding logs directly to a Syslog server is not supported.

SaaS deployments do not provide direct network access to external Syslog destinations, therefore configuring Syslog logging in this scenario will not work.

Recommended Alternative: Use the Infinity Portal Event Forwarding feature to export events and logs to your external SIEM/SOC systems.

For more details, see the Infinity Portal Event Forwarding documentation.

Step 5: Setup your security practice to use the new Log Trigger object/s

Browse to Policy->Assets and edit the asset you wish to modify.

Go to the relevant practice tab and scroll to the bottom.

Click on the '+' icon next to Triggers and add your new Log Trigger object.

Logs structure to Syslog/CEF

Syslog

Syslog protocol is defined by RFC 5242. The structure starts with a priority value in '<>' followed by a timestamp of the log.

The agent will also send a value in the syslog header for:

Following the syslog header there are space delimited key value pairs in the structure of keyname='value'.

The possible keys and description can be seen in the Events/Logs Schema documentation page.

Syslog Example

<133>1 2022-05-17T05:55:37.623Z cpnano-agent-915faaab-6a40-4b55-be93-872e911397c0 HTTPTransactionHandler - 5 - title='API Request' agentId='915faaab-6a40-4b55-be93-872e911397c0' issuingEngineVersion='1.2228.372599' serviceName='HTTP Transaction Handler' eventReferenceId='eff9c697-d689-46c8-b702-87c92c728164' eventConfidence='Very High' matchedParameter='[readingValue]' matchedSample='[-45]' matchReason='[Value is lower than the minimum allowed value: -45 < 1.000000]' sourceIP='192.168.154.1' httpSourceId='192.168.154.1' sourcePort='64758' httpHostName='192.168.154.129:8080' httpMethod='POST' httpUriPath='/myApp/setParam' httpUriQuery='' ruleId='d8c0fda7-2ad1-e7ab-32bc-d1a6af6a2ca0' securityAction='Prevent' waapOverride='None' practiceType='Threat Prevention' practiceSubType='Web API' assetId='d8c0fda7-2ad1-e7ab-32bc-d1a6af6a2ca0' assetName='Customer Portal' practiceId='08c0fdac-3295-e034-be39-5ab4c2d11a28' practiceName='MY WEB API PROTECTION PRACTICE' waapIncidentType='Schema Validation' waapIncidentDetails='OpenAPI schema validation failed'

CEF

CEF protocol is explained here. The protocol fields are '|' character delimited and the agent will send the value for:

Following the CEF protocol fields there are space delimited key value pairs in the structure of keyname=value.

CEF Example

CEF:0|Check Point|HTTPTransactionHandler||Event Driven|API Request|High|agentId=915faaab-6a40-4b55-be93-872e911397c0 issuingEngineVersion=1.2228.372599 serviceName=HTTP Transaction Handler eventReferenceId=ad7a5181-b5d3-4b54-bd5b-106e180f0c9d eventConfidence=Very High matchedParameter=[readingValue] matchedSample=[-90] matchReason=[Value is lower than the minimum allowed value: -90 < 1.000000] sourceIP=192.168.154.1 httpSourceId=192.168.154.1 sourcePort=56060 httpHostName=192.168.154.129:8000 httpMethod=POST httpUriPath=/myApp/setParam httpUriQuery= ruleId=d8c0fda7-2ad1-e7ab-32bc-d1a6af6a2ca0 securityAction=Prevent waapOverride=None practiceType=Threat Prevention practiceSubType=Web API assetId=d8c0fda7-2ad1-e7ab-32bc-d1a6af6a2ca0 assetName=Customer Portal practiceId=08c0fdac-3295-e034-be39-5ab4c2d11a28 practiceName=MY WEB API PROTECTION PRACTICE waapIncidentType=Schema Validation waapIncidentDetails=OpenAPI schema validation failed

Last updated 4 months ago