Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion parsers/s01-parse/crowdsecurity/appsec-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ statics:
#was the request blocked ?
- meta: log_type
expression: |
evt.Appsec.HasInBandMatches ? "appsec-block" : "appsec-info"
evt.Parsed.source == "crowdsec-appsec-challenge" ?
"appsec-challenge" :
(evt.Appsec.HasInBandMatches ? "appsec-block" : "appsec-info")
- meta: rule_name
expression: evt.Appsec.GetName()
- meta: rule_ids
expression: Sprintf("%+v", evt.Appsec.GetRuleIDs())
- meta: remediation_cmpt_ip
expression: "evt.Parsed.remediation_cmpt_ip"
- meta: challenge_event

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to parsed:

  • positive bot detection flags
  • platform/os
  • Browser family

expression: evt.Parsed.challenge_event
- meta: fsid
expression: evt.Parsed.fsid
20 changes: 20 additions & 0 deletions scenarios/crowdsecurity/challenge-request-with-no-submission.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type: counter
format: 3.0
#debug: true
name: crowdsecurity/appsec-challenge-request-with-no-submission
description: "Client made too many request to challenge page"
Comment on lines +4 to +5
filter: "evt.Meta.log_type == 'appsec-challenge' && (evt.Meta.challenge_event == 'requested' || evt.Meta.challenge_event == 'submitted')"
cancel_on: "evt.Meta.log_type == 'appsec-challenge' && evt.Meta.challenge_event == 'submitted'"
duration: 60s
capacity: -1
cache_size: 1
groupby: evt.Meta.source_ip
blackhole: 10s
labels:
service: http
confidence: 0
spoofable: 0
classification:
- attack.T1110
label: "Blocked by CrowdSec AppSec"
behavior: "http:exploit"
Comment on lines +13 to +20
19 changes: 19 additions & 0 deletions scenarios/crowdsecurity/challenge-too-many-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: leaky
format: 3.0
#debug: true
name: crowdsecurity/appsec-challenge-too-many-requests
description: "Client made too many request to challenge page"
Comment on lines +4 to +5
filter: "evt.Meta.log_type == 'appsec-challenge' && evt.Meta.challenge_event == 'requested'"
leakspeed: "60s"
capacity: 5
groupby: evt.Meta.source_ip
blackhole: 1m
labels:
service: http
confidence: 0
spoofable: 0
classification:
- attack.T1110
label: "Blocked by CrowdSec AppSec"
behavior: "http:exploit"
remediation: true
19 changes: 19 additions & 0 deletions scenarios/crowdsecurity/challenge-too-many-submit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: leaky
format: 3.0
#debug: true
name: crowdsecurity/appsec-challenge-too-many-submissions
description: "Client made too many submissions for challenge"
filter: "evt.Meta.log_type == 'appsec-challenge' && evt.Meta.challenge_event == 'submitted'"
leakspeed: "60s"
capacity: 5
groupby: evt.Meta.source_ip
blackhole: 1m
labels:
service: http
confidence: 0
spoofable: 0
classification:
- attack.T1110
Comment on lines +15 to +16
label: "Blocked by CrowdSec AppSec"
behavior: "http:exploit"
remediation: true
Comment on lines +1 to +19
Loading