You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/appsec/alerts_and_scenarios.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,33 @@ sidebar_position: 5
6
6
7
7
## Generated Events Layout
8
8
9
-
When HTTP Requests trigger _InBand_ or _OutOfBand_ AppSec/WAF rules, an event is generated. Events can be used to create scenarios that will react (ban, alerts etc.) when AppSec/WAF rules are matched.
9
+
HTTP requests that trigger _In-Band_ or _Out-Of-Band_ AppSec/WAF rules generate events. These events can trigger scenarios that react by banning or alerting when rules are matched.
10
10
11
-
The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is used to parse those events and turn them into events that are easier to process with scenarios.
11
+
The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is designed as a general-purpose tool to convert events into a format that is easier to process with scenarios.
12
12
13
13
14
-
The generated event looks like:
14
+
The generated event looks like this:
15
15
16
16
-`evt.Meta.service` is set to `appsec`
17
17
-`evt.Meta.log_type`:
18
-
-`appsec-block` for blocked requests (_InBand_ rule matched for ex)
19
-
-`appsec-info` for reuqests that triggered _OutOfBand_ rule (not blocked)
18
+
-`appsec-block` for blocked requests (_In-Band_ rule matched, for example)
19
+
-`appsec-info` for requests that triggered _Out-Of-Band_ rule (not blocked)
20
20
-`evt.Meta.source_ip` is set to the source (client) IP
21
21
-`evt.Meta.target_host` is set to the FQDN if present (`Host` header in the HTTP request)
22
-
-`evt.Meta.target_uri` is set to the full URI of the HTTP request
22
+
-`evt.Meta.target_uri` is set to the complete URI of the HTTP request
23
23
-`evt.Meta.rule_name` is set to the name of the triggered rule
24
24
-`evt.Meta.remediation_cmpt_ip` is set to the IP of the Remediation Component (Bouncer) that sent the HTTP request.
25
25
26
26
:::info
27
-
The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is already part of the generic AppSec/WAF collections, and doesn't have to be manually installed.
27
+
The [`crowdsecurity/appsec-logs` parser](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-logs) is already part of the generic AppSec/WAF collections and doesn't have to be manually installed.
28
28
:::
29
29
30
30
31
31
## Creating Scenario Based on AppSec/WAF Events
32
32
33
-
### Triggering on InBand Rules
33
+
### Triggering on _In-Band_ Rules
34
34
35
-
A simple yet effective example is the [`crowdsecurity/appsec-vpatch` scenario](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-vpatch) that will ban IPs triggering two distinct _InBand_ rules:
35
+
A simple yexample is the [`crowdsecurity/appsec-vpatch` scenario](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-vpatch) that will ban IPs triggering two distinct _In-Band_ rules:
The [`crowdsecurity/appsec-vpatch` scenario](https://app.crowdsec.net/hub/author/crowdsecurity/configurations/appsec-vpatch) is already part of the generic AppSec/WAF collections, and doesn't have to be manually installed.
50
50
:::
51
51
52
-
### Triggering on OutOfBand Rules
52
+
### Triggering on Out-Of-Band Rules
53
53
54
54
Let's try to solve an imaginary scenario:
55
55
56
-
> We want to block users enumerating some URLs (`/foobar/*`) when a specific HTTP header is set (`something: *test*`). However, we only want to block/ban users that will try to access 2 or more distinct `/foobar/*` URLs while having this header set.
56
+
> We aim to prevent users from enumerating certain URLs (specifically, those that begin with `/foobar/*`) when a particular HTTP header is present (`something: *test*`). However, we want to impose this restriction only on users attempting to access two or more distinct `/foobar/*` URLs while this header is set.
57
57
58
58
:::info
59
-
Keep in mind that _OutOfBand_ rules will generate an event instead of blocking the HTTP Request.
59
+
Keep in mind that _Out-Of-Band_ rules will generate an event instead of blocking the HTTP Request.
60
60
:::
61
61
62
62
#### The AppSec/WAF Rule
@@ -85,7 +85,7 @@ rules:
85
85
value: test
86
86
```
87
87
88
-
Let ensure it's loaded as an _OutOfBand_ rule, first by creating a new appsec-config:
88
+
Let ensure it's loaded as an _Out-Of-Band_ rule, first by creating a new appsec-config:
The `filter` ensures only OutOfBand events generated by our scenario are picked up, while the `capacity: 1` and `distinct: evt.Meta.target_uri` will ensure that the IP has to trigger the rule on at least 2 distinct URLs to trigger the scenario.
130
+
The `filter` ensures only _Out-Of-Band_ events generated by our scenario are picked up, while the `capacity: 1` and `distinct: evt.Meta.target_uri` will ensure that the IP has to trigger the rule on at least 2 distinct URLs to trigger the scenario.
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/appsec/configuration.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Configuring the AppSec Component usually requires the use of multiple files:
10
10
11
11
-[AppSec rules](/appsec/rules_syntax.md) allow you to write a signature to detect and/or block malevolent requests. [You can find more information about the syntax here](/appsec/rules_syntax.md)
12
12
-[acquisition configuration](/data_sources/appsec.md) indicates which port is the AppSec Component listening on, and which AppSec configuration it will use.
13
-
- AppSec configuration tells which rules are loaded in inband (blocking) and out-of-band (non-blocking)
13
+
- AppSec configuration tells which rules are loaded in in-band (blocking) and out-of-band (non-blocking)
14
14
phases. [it as well allows you to tweak the behavior of the component via the powerful expr bindings](/appsec/rules_syntax.md)
15
15
16
16
@@ -40,11 +40,11 @@ A supplementary list of rules can be loaded during the out-of-band phase. These
40
40
41
41
### `inband_rules`
42
42
43
-
An optional list of rules to be loaded in inband phase. In band rules are blocking and evaluated before answering the remediation component. Useful for virtual patching, rules with no/low false positives.
43
+
An optional list of rules to be loaded in in-band phase. In band rules are blocking and evaluated before answering the remediation component. Useful for virtual patching, rules with no/low false positives.
44
44
45
45
### `default_remediation`
46
46
47
-
An optional remediation for inband rules, defaults to `ban`. If set to `allow`, remediation component won't block the request (even if it matched rules). Any other value (including `captcha`) is passed as-is back to the remediation component.
47
+
An optional remediation for in-band rules, defaults to `ban`. If set to `allow`, remediation component won't block the request (even if it matched rules). Any other value (including `captcha`) is passed as-is back to the remediation component.
48
48
49
49
### `default_pass_action`
50
50
@@ -84,6 +84,6 @@ See the [dedicated doc](/docs/appsec/hooks.md#on_match)
84
84
85
85
### `inband_options` and `outofband_options`
86
86
87
-
Subset of options that can be applied to the inband/outofband rules:
87
+
Subset of options that can be applied to the in-band/out-of-band rules:
88
88
-`disable_body_inspection` : boolean, allows to disable HTTP body inspection
89
89
-`request_body_in_memory_limit` : a number of byes indicating the maximum body size to be loaded in memory
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/appsec/installation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ To have a functional AppSec Component, you need:
24
24
Before diving into the practical steps, it's crucial to familiarize yourself with the core configuration aspects of the AppSec Component:
25
25
26
26
-**acquisition configuration**: Specifies how to acquire the AppSec Component stream of data
27
-
-**AppSec Component configuration**: Tells which rules are loaded in inband (blocking) and out-of-band (non-blocking)
27
+
-**AppSec Component configuration**: Tells which rules are loaded in in-band (blocking) and out-of-band (non-blocking)
28
28
phases, [and allows tweaking the behavior of the component via the powerful expr bindings](/appsec/hooks.md). <!--@sbl we need anchor for the on_whatever and expr helpers -->
29
29
-**rules** allow writing a [signature to detect and/or block malevolent requests](/appsec/rules_syntax.md).
0 commit comments