sudo cscli scenarios install crowdsecurity/ban-defcon-drop_rangeThen reload CrowdSec: sudo systemctl reload crowdsec
Sign in to see which of your engines run it →Hover a line or a note to see what each field does.
#TAP IT TWICE : if more than 5 unique IPs of a range are being banned, drop the rangetype: leaky#debug: truename: crowdsecurity/ban-defcon-drop_rangedescription: "Ban a range if more than 5 ips from it are banned at a time"#it's an overflow from a scenario that triggered a remediation ;)filter: "evt.GetType() == 'overflow' && evt.Overflow.Alert.Remediation == true && evt.Overflow.Alert.Source.Range != nil && evt.Overflow.Alert.Source.Range != ''"groupby: "evt.Overflow.Alert.Source.Range"distinct: "evt.Overflow.Alert.Source.IP"capacity: 5leakspeed: "1m"blackhole: 5mlabels:remediation: truescope:type: Range
Sign in to see the Security Engines that run this attack scenario, the version they run and whether it was modified locally.
Scenario to ban a range if more than 5 IPs from said range are banned less than 1 minute apart.
For this to work, two non-default things must be set:
/etc/crowdsec/profiles.yaml
1#...2---3name: default_range_remediation4filters:5 - Alert.Remediation == true && Alert.GetScope() == "Range"6decisions:7 - type: ban8 duration: 4h9on_success: break
true: This is needed for the events (generated by the scenarios) to be processed again by CrowdSec so they can trigger our crowdsecurity/ban-defcon-drop_range scenario. Most scenarios do not have this option enabled by default.