Crowdsec AS Number Whitelist

Here is a simple way to create a whitelist for trusted AS Numbers using @Crowd_Security PostOverflows The main advantage of PostOveflow whitelists is they are only triggered once the bucket overflows meaning potentially expensive expressions are evaluated less often. You can also install the crowdsecurity/rdns postoverflow that will be in charge of enriching overflows with reverse DNS information of the offending IP address. Here is the path example where you will need to create a new whitelist: root@gw:/usr/local/etc/crowdsec/postoverflows/s01-whitelist ...

May 16, 2025 · 1 min · 152 words · Flaviu Vlaicu

Crowdsec CTI API Integration with Suricata

Crowdsec CTI Integration python script I’ve been working on an integration between Crowdsec CTI and Suricata, both running on OPNsense. The purpose of the integration is to have Suricata in IPS mode with a set of preferred rules configured to alert only. All triggered alerts are logged in the fast.log format. A CrowdSec CTI script made in python parses the fast.log file and queries all entries in the log. If an IP is marked as Malicious or Suspicious by the CrowdSec CTI, it is added to a new log called filtered-fast.log and subsequently blocked based on the Suricata collection. The script implements a TTL cache mechanism with a 1-hour duration to avoid excessive queries and conserve allocated API requests when an IP triggers multiple alerts. IPs marked as Benign, Safe, Known, or Unknown are skipped and not added to filtered-fast.log. The public IP of the gateway (in my case, the WAN/PPPoE interface) is also explicitly excluded from queries. In this version of the script I am also sending Benign IP’s to the filterd-fast.log and filtering out Nmap alerts. You can define in the script if there is anything that you want to exclude from the query search. The script also maintains its own logs for informational and debugging purposes, stored at /usr/local/bin/crowdsec/crowdsec_cti.log and /usr/local/bin/crowdsec/crowdsec_cti_debug.log. The script handles API errors (e.g., 429 rate limits with exponential back off, 404 for unknown IPs)and caches “Unknown” responses for failed queries. Before having the CTI integration functional, have a look on how to Integrate Crowdsec with Suricata and push the logs to fast.log In order for this integration to work you also need the Crowdsec for Suricata Collection installed ...

May 16, 2025 · 5 min · 878 words · Flaviu Vlaicu

Crowdsec Integration with Suricata

Crowdsec integration with Suricata and Pushover notifications In this post I will walk you through the steps of integrating Suricata with Crowdsec, having the alerting and detection made in Suricata and the decision making in Crowdsec. Since Crowdsec also has a nice Cloud Console we can further visualize the alerts / decisions made, there. I will also show you how to integrate Crowdsec with Pushover so you get notified each time the Crowdsec Engine makes a decision. ...

January 18, 2025 · 7 min · 1355 words · Flaviu Vlaicu