open-appsec
WebsiteManagement PortalPlaygroundGitHub
  • open-appsec Documentation
  • What is open-appsec?
  • open-appsec Video Tutorials
  • Release Notes
  • Getting started
    • Getting Started
    • Start With Kubernetes
      • Install Using Interactive CLI Tool (Ingress NGINX)
      • Configuration Using Interactive CLI Tool
      • Install Using Helm
      • Install Using Helm - new flow (beta)
      • Configuration Using CRDs
      • Configuration Using CRDs - v1beta2
      • Configuration using CRDs - special options for Large Scale Deployments
        • Using appsec class for assigning separate custom resources to specific deployments
        • Using namespace-scoped custom resources
      • Monitor Events
    • Start With Linux
      • Install open-appsec for Linux
      • Using the open-appsec-ctl Tool
      • Configuration Using Local Policy File (Linux)
      • Local Policy File (Advanced)
      • Local Policy File v1beta2 (beta)
      • Monitor Events
    • Start with Docker
      • Install With Docker (Centrally Managed)
      • Install With Docker (Locally Managed)
      • Deploy With Docker-Compose (Beta)
      • Configuration Using Local Policy File (Docker)
      • Local Policy File (Advanced)
    • Using the Web UI (SaaS)
      • Sign-Up and Login to Portal
      • Agents Deployment
      • Connect Deployed Agents to SaaS Management Using Tool (K8s & Linux)
      • Connect Deployed Agents to SaaS Management Using Helm (K8s)
      • Connect Deployed Agents to SaaS Management (Docker)
      • Create a Profile
      • Protect Additional Assets
      • Monitor Events
    • Using the Advanced Machine Learning Model
  • Concepts
    • Agents
    • Management & Automation
    • Security Practices
    • Contextual Machine Learning
  • SETUP INSTRUCTIONS
    • Setup Web Application Settings
    • Setup Custom Rules and Exceptions
    • Setup Web User Response Pages
    • Setup Log Triggers
    • Setup Behavior Upon Failure
    • Setup Agent Upgrade Schedule
  • Additional Security Engines
    • Anti-Bot
    • API Schema Enforcement
    • Data Loss Prevention (DLP) Rules
    • File Security
    • Intrusion Prevention System (IPS)
    • Rate Limit
  • Snort Rules
    • Import Snort Rules
    • Write Snort Signatures
  • HOW TO
    • Configuration and Learning
      • Track Learning and Move From Learn/Detect to Prevent
      • Configure Contextual Machine Learning for Best Accuracy
      • Track Learning and Local Tuning in Standalone Deployments
      • Move From Detect to Prevent in K8s With Many Ingress Rules
  • Deployment and Upgrade
    • Load the Attachment in Proxy Configuration
    • Upgrade Your Reverse Proxy/API Gateway When an Agent is Installed
    • Integration in GitOps CD (K8s)
    • Build open-appsec Based on Source Code
  • Management Web UI
    • Track Agent Status
    • Delete or Reset Management Tenant (SaaS)
    • Disconnect an open-appsec agent from Central Management
  • Integrations
    • About Integrations With 3rd Party Solutions
    • CrowdSec
      • CrowdSec Bouncer Support
      • CrowdSec Intelligence Sharing Using open-appsec Parser/Scenario
    • NGINX Proxy Manager
      • Install NGINX Proxy Manager with open-appsec managed from NPM WebUI
      • Install NGINX Proxy Manager with open-appsec managed from central WebUI (SaaS)
      • Frequently Asked Questions
      • How to Migrate from an Existing NGINX Proxy Manager Deployment and Keep Configuration
    • NPMplus
    • Docker SWAG
      • Install Docker SWAG with open-appsec (locally managed)
      • How to connect locally managed Docker SWAG with open-appsec to WebUI
      • Install Docker SWAG with open-appsec (centrally managed)
      • Deploy Docker SWAG with docker-compose (beta)
      • Frequently Asked Questions
  • Troubleshooting
    • Troubleshooting
    • Troubleshooting Guides
      • Configuration contains ingress/asset with URL which already has asset attached to it in your tenant
      • HTTP Request to Port 80 Not Returning as Expected
      • Agent Fails to Recognize HTTP Transactions with NGINX
      • Agent Not Recognizing Initial HTTP Requests
      • Handling Large Requests (413 Responses)
      • open-appsec on Docker HTTP Transaction Handler Is Set To Ready
      • Traffic Recognition Issue on Single-Core Machine/Connection Timed Out
      • Installing open-appsec on CentOS 7
      • SELinux: checking status and disabling
      • Deploy open-appsec directly on the web server hosting the application to protect
      • object is locked or remote, and therefore cannot be modified
      • Failed to Register to Fog
  • references
    • Agent CLI
    • Event Query Language
    • Events/Logs Schema
    • WAF Comparison Project
Powered by GitBook
On this page
  • The Default Log Trigger
  • Customizing Log Triggers
  • Logs structure to Syslog/CEF
  • Syslog
  • CEF

Was this helpful?

  1. SETUP INSTRUCTIONS

Setup Log Triggers

PreviousSetup Web User Response PagesNextSetup Behavior Upon Failure

Last updated 3 months ago

Was this helpful?

appsec-open 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 appsec-open is already configured with a log trigger, and so, to view logs triggered by open-appsec 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.

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 new Log Trigger object

In the Quick Actions menu select New Trigger.

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:

  • Detect/Prevent Events - Logs events caught by appsec-open engines in "Detect" mode or blocked by appsec-open engines in "Prevent" mode in addition to blocking.

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

  • Logging all web requests regardless of appsec-open configuration.

Logging all web requests has a substantial impact on resources and network bandwidth consumed by appsec-open.

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 AppSec, 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 AppSec 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.

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

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

The trigger destination can be:

  • 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).

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

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

Go to each of the practices tabs 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

  • Host name - indicating the host name where the agent is installed

  • Application name - indicating the nano-service issuing the log.

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

  • 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

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

Events are sent to open-appsec AppSec cloud to be visible in the .

Cloud - appsec-open Cloud, to be viewed by the appsec-open Application .

Syslog protocol is defined by . 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 documentation page.

CEF protocol is explained . 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.The possible keys and description can be seen in the documentation page.

events views and dashboards
event views under Monitoring
RFC 5242
Events/Logs Schema
here
Events/Logs Schema