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

Was this helpful?

  1. Integrations
  2. CrowdSec

CrowdSec Intelligence Sharing Using open-appsec Parser/Scenario

PreviousCrowdSec Bouncer SupportNextNGINX Proxy Manager

Last updated 22 days ago

Was this helpful?

When using CrowdSec alongside open-appsec to consume CrowdSec Threat Intelligence you might also want to have the CrowdSec security engine parse the security logs created by open-appsec's multiple security layers to add additional security indicators to your local CrowdSec "ecosystem" and share intelligence with CrowdSec Threat Intelligence to contribute to their Community Blocklist. To achieve this you can use our open-appsec collection available from the .

Required Parsers and Collections

In order to parse open-appsec logs within CrowdSec the following parsers require installation:

The following Collections must be installed:

Required CrowdSec Configuration for Parsing open-appsec Logs

For CrowdSec and open-appsec both deployed on Kubernetes:

For information on how to deploy CrowdSec on Kubernetes with Helm see here: Make sure to add the following configuration to your helm chart's crowdsec-values.yaml file:

  1. Set the container_runtime value to “containerd”.

  2. Set the following docker image values in the "image" section:

    repository = crowdsecurity/crowdsec
    pullPolicy = IfNotPresent
    tag = "v1.4.6"
    # mandatory to use CrowdSec container version v1.4.6 or later
  3. Under the "agent" section, add an entry in the "acquisition" array and configure in with the following namespace, pod name and program values:

    namespace = "<namespace-of-your-open-appsec-agent>"
    podName = "appsec-open-appsec-*"
    # make sure this query matches the names of the deployed open-appsec pods, especially if you adjusted the name-template parameter for the open-appsec deployment
    program = "openappsec"
  4. Under the "agent" section, add 2 entries in the "env" array:

    - name: PARSERS
      value: "crowdsecurity/cri-logs crowdsecurity/dateparse-enrich"
    - name: COLLECTIONS
      value: "crowdsecurity/nginx openappsec/openappsec"

For CrowdSec and open-appsec both deployed on Linux:

  1. Make sure to have a CrowdSec version >= 1.4.6 installed on your Linux machine, see

  2. Configure the acquisition for consuming the open-appsec log-files in CrowdSec's main yaml configuration file /etc/crowdsec/config.yaml as follows:

    source: file
    filenames:
      - /var/log/nano_agent/cp-nano-http-transaction-handler.log*
    labels:
      type: openappsec
  3. Edit the following configuration file /etc/crowdsec/collections/linux.yaml and add the relevant parsers and collections as shown below:

    parsers:
      - crowdsecurity/cri-logs
      - crowdsecurity/dateparse-enrich
    
    collections:
      - crowdsecurity/nginx
      - openappsec/openappsec
  4. Restart crowdsec to apply the changes by running sudo systemctl restart crowdsec Alternatively you can use CrowdSec's cscli command to apply the changes: sudo cscli capi update

For CrowdSec and open-appsec both deployed on Docker:

  1. Configure the acquisition for consuming the open-appsec log-files in CrowdSec's main yaml configuration file /etc/crowdsec/config.yaml mounted into your crowdsec docker container as follows:

    source: docker
    container_name:
     - open-appsec-agent
    labels:
      type: openappsec
  2. Edit the following configuration file /etc/crowdsec/collections/linux.yaml mounted into your crowdsec docker container and add the required parsers and collections as shown below:

    parsers:
      - crowdsecurity/cri-logs
      - crowdsecurity/dateparse-enrich
    
    collections:
      - crowdsecurity/nginx
      - openappsec/openappsec
  3. Restart your CrowdSec docker container to apply the changed configuration.

CrowdSec version needs to be above or equal to 1.4.6 for open-appsec log parsing integration to work. Note that if you use specify "latest" as tag you might still get an older version below v1.4.6.

If you didn't configure open-appsec to bounce malicious source IP addresses based on CrowdSec's Threat Intelligence using the Community Blocklist you can follow the steps explained here to configure this in couple easy steps:

Make sure to have a CrowdSec container version >= 1.4.6 installed on Docker, see

For further details on this please consult the CrowdSec documentation available here:

CrowdSec Hub
crowdsecurity/cri-logs
crowdsecurity/dateparse-enrich
crowdsecurity/nginx
openappsec/openappsec
https://artifacthub.io/packages/helm/crowdsec/crowdsec
https://docs.crowdsec.net/docs/getting_started/install_crowdsec/
https://hub.docker.com/r/crowdsecurity/crowdsec
https://docs.crowdsec.net
CrowdSec Bouncer Support