Setup Log Triggers
Last updated
Last updated
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 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:
Malicious events.
High severity (and above) suspicious events.
Most important identifying data from the request.
Events are sent to CloudGuard WAF cloud to be visible in the events views and dashboards.
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.
Go to Policy->Triggers and click on the New icon, the select Log:
Configure a new name to the new trigger object:
Select the conditions in which logs are issued:
Detect/Prevent Events - Logs events caught by CloudGuard WAF engines in "Detect" mode or blocked by CloudGuard WAF engines in "Prevent" mode in addition to blocking.
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.
Logging all web requests regardless of CloudGuard WAF configuration.
Logging all web requests has a substantial impact on resources and network bandwidth consumed by CloudGuard WAF.
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:
The response body is conditional to the severity of the suspicious event.
Either body content will not appear in the log if CloudGuard WAF blocked the request prior to reading their values (for example, upon blocking a request based on its URL). In the case of response body, it will be logged only if the action is set to "Detect" and not "Prevent" as no response will ever arrive, if the request is blocked.
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:
Cloud - CloudGuard WAF Cloud, to be viewed by the CloudGuard Application event views under Monitor.
Gateway/agent - Logging will be saved locally when possible in the folder /var/log/nano_agent.
Syslog service and/or CEF service - Log to an external Syslog/CEF service by adding:
A destination address
Port (Usually 514 in both cases)
Either selecting UDP (common for syslog) or TCP (common for CEF).
Browse to Policy->Assets and edit the asset you wish to modify.
Go to the Threat Prevention tab and scroll to the bottom.
Click on the '+' icon next to Triggers and add your new Log Trigger object.
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:
Host name - indicating the host name where the agent is installed
Application name - indicating the nano-service issuing the log.
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.
CEF protocol is explained here. The protocol fields are '|' character delimited and the agent will send the value for:
Device Vendor - Check Point.
Device Product - indicating the nano-service issuing the log.
Event Name - This field will appear in the log structure but is not sent in the key-value pair system.
Severity
Following the CEF protocol fields 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.