Skip to content

Commit 8f97a1b

Browse files
Merge branch 'main' into main
2 parents 764f9c9 + 83ce4b3 commit 8f97a1b

File tree

103 files changed

+966
-504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+966
-504
lines changed

crowdsec-docs/docs/appsec/hooks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ inband_rules:
102102
- crowdsecurity/base-config
103103
- crowdsecurity/vpatch-*
104104
pre_eval:
105-
- filter: IsInBand == true && req.RemoteAddr == "42.42.42.42"
105+
- filter: IsInBand == true && req.RemoteAddr == "192.168.1.1"
106106
apply:
107107
- RemoveInBandRuleByName("my_rule")
108108
```
@@ -188,13 +188,13 @@ inband_rules:
188188
- crowdsecurity/base-config
189189
- crowdsecurity/vpatch-*
190190
post_eval:
191-
- filter: IsInBand == true && req.RemoteAddr == "42.42.42.42"
191+
- filter: IsInBand == true && req.RemoteAddr == "192.168.1.1"
192192
apply:
193193
- CancelAlert()
194194
- CancelEvent()
195195
- filter: |
196196
any( evt.Appsec.MatchedRules, #.name == "crowdsecurity/vpatch-env-access") and
197-
req.RemoteAddr = "42.42.42.42"
197+
req.RemoteAddr = "192.168.1.1"
198198
apply:
199199
- SetRemediation("allow")
200200
- filter: evt.Appsec.MatchedRules.GetURI() contains "/foobar/"

crowdsec-docs/docs/appsec/protocol.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ All requests forwarded by the remediation component must be sent via a `GET` req
4141

4242
For this example:
4343

44-
- A `POST` HTTP request has been made by the IP `1.2.3.4` to a website on `example.com`.
44+
- A `POST` HTTP request has been made by the IP `192.168.1.1` to a website on `example.com`.
4545
- The Application Security Component listen on `http://localhost:4241/`.
4646

4747
<details>
@@ -71,7 +71,7 @@ username=admin' OR '1'='1' -- &password=password
7171
```
7272
POST / HTTP/1.1
7373
Host: localhost:4241
74-
X-Crowdsec-Appsec-ip: 1.2.3.4
74+
X-Crowdsec-Appsec-ip: 192.168.1.1
7575
X-Crowdsec-Appsec-Uri: /login
7676
X-Crowdsec-Appsec-Host: example.com
7777
X-Crowdsec-Appsec-Verb: POST

crowdsec-docs/docs/appsec/quickstart/nginxopenresty.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Please keep this key since you will not be able to retrieve it!
160160
2. Emit a legitimate request to the AppSec Component:
161161

162162
```bash
163-
curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-ip: 42.42.42.42' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
163+
curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
164164
```
165165

166166
Which will give us an answer such as:
@@ -181,7 +181,7 @@ We're trying to access a `.env` file, a [common way to get access to some creden
181181
:::
182182

183183
```bash
184-
curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /.env' -H 'x-crowdsec-appsec-ip: 42.42.42.42' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
184+
curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-uri: /.env' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-host: foobar.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
185185

186186
```
187187

crowdsec-docs/docs/appsec/troubleshooting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cscli bouncers add appsec_test -k this_is_a_bad_password
7575
> Emit a request to the AppSec Component
7676
7777
```bash
78-
curl -I -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password' -H 'x-crowdsec-appsec-ip: 42.42.42.42' -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-host: test.com' -H 'x-crowdsec-appsec-verb: GET'
78+
curl -I -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-host: test.com' -H 'x-crowdsec-appsec-verb: GET'
7979
HTTP/1.1 200 OK
8080
Date: Tue, 05 Dec 2023 19:37:56 GMT
8181
Content-Length: 18
@@ -85,7 +85,7 @@ Content-Type: text/plain; charset=utf-8
8585
If you receive a `200 OK`, you can authenticate to the AppSec Component. If the component is misconfigured or your API key is invalid, you will receive a `401 Unauthorized`:
8686

8787
```bash
88-
curl -I -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-api-key: meeh' -H 'x-crowdsec-appsec-ip: 42.42.42.42' -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-host: test.com' -H 'x-crowdsec-appsec-verb: GET'
88+
curl -I -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-api-key: meeh' -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-uri: /test' -H 'x-crowdsec-appsec-host: test.com' -H 'x-crowdsec-appsec-verb: GET'
8989
HTTP/1.1 401 Unauthorized
9090
Date: Tue, 05 Dec 2023 19:38:51 GMT
9191
Content-Length: 0
@@ -212,7 +212,7 @@ cscli bouncers add appsec_test -k this_is_a_bad_password
212212
We can now query our AppSec Component (we're assuming here that it runs on the default `127.0.0.1:7422`, see the `listen_addr` parameter of the acquisition config):
213213

214214
```bash
215-
▶ curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-ip: 42.42.42.42' -H 'x-crowdsec-appsec-uri: /rpc2' -H 'x-crowdsec-appsec-host: google.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
215+
▶ curl -X POST localhost:7422/ -i -H 'x-crowdsec-appsec-ip: 192.168.1.1' -H 'x-crowdsec-appsec-uri: /rpc2' -H 'x-crowdsec-appsec-host: google.com' -H 'x-crowdsec-appsec-verb: POST' -H 'x-crowdsec-appsec-api-key: this_is_a_bad_password'
216216
HTTP/1.1 403 Forbidden
217217
Date: Tue, 05 Dec 2023 11:17:51 GMT
218218
Content-Length: 16
@@ -225,7 +225,7 @@ And we see the alert appearing in `crowdsec.log` :
225225

226226
```
227227
...
228-
INFO[2023-12-05 12:17:52] (test) alert : crowdsecurity/vpatch-CVE-2023-42793 by ip 42.42.42.42
228+
INFO[2023-12-05 12:17:52] (test) alert : crowdsecurity/vpatch-CVE-2023-42793 by ip 192.168.1.1
229229
...
230230
```
231231

@@ -235,7 +235,7 @@ And in `cscli alerts list` :
235235
╭────┬────────────────┬─────────────────────────────────────┬─────────┬────┬───────────┬───────────────────────────────╮
236236
│ ID │ value │ reason │ country │ as │ decisions │ created_at │
237237
├────┼────────────────┼─────────────────────────────────────┼─────────┼────┼───────────┼───────────────────────────────┤
238-
│ 1 │ Ip:42.42.42.42 │ crowdsecurity/vpatch-CVE-2023-42793 │ │ │ │ 2023-12-05 11:17:51 +0000 UTC │
238+
│ 1 │ Ip:192.168.1.1 │ crowdsecurity/vpatch-CVE-2023-42793 │ │ │ │ 2023-12-05 11:17:51 +0000 UTC │
239239
╰────┴────────────────┴─────────────────────────────────────┴─────────┴────┴───────────┴───────────────────────────────╯
240240
241241
```

crowdsec-docs/docs/central_api/blocklist.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,53 @@ The "Community Blocklist" is a curated list of IP addresses identified as malici
1212
# Community Blocklist Variation and Eligibility
1313

1414
The rules are different for free and paying users:
15-
- Free users that **do not** contribute get the `Community Blocklist (Lite)`
16-
- Free users that **do** contribute get access to the `Community Blocklist`
15+
- Free users that **do not regularly** contribute get the `Community Blocklist (Lite)`
16+
- Free users that **do regularly** contribute get access to the `Community Blocklist`
1717
- Paying users get access to the `Community Blocklist (Premium)`, even if they don't contribute
1818

1919
Regardless of the blocklist "tier" you have access to (`Lite`, `Community`, `Premium`), each Security Engine gets a tailored blocklist based on the kind of behavior you're trying to detect.
2020

21-
# Community Blocklist
21+
## Community Blocklist
2222

2323
Free users that are actively contributing to the network (sending signal on a regular basis) have their Security Engines automatically subscribed to the *Community Blocklist*.
2424

2525
The content of the blocklist is unique to each Security Engine, as it mirrors the behaviours they report. For example, suppose you're running the Security Engine on a web server with WordPress. In that case, you will receive IPs performing generic attacks against web servers *and* IPs engaging in wordpress-specific attacks.
2626

2727
The *Community Blocklist* contains 15 thousand malicious IP's based on your reported scenarios.
2828

29-
# Community Blocklist (Premium)
29+
## Community Blocklist (Premium)
3030

3131
Paying users' Security Engine are automatically subscribed to the *Community Blocklist (Premium)*, which contains IPs that mirror their installed scenarios.
3232
Paying users' do not need to contribute to the network to be eligible to the blocklist.
3333

3434
The *Community Blocklist (Premium)* blocklist content has no size limit, unlike free users.
3535

36-
# Community Blocklist (Lite)
36+
## Community Blocklist (Lite)
3737

3838
Free users that are not actively contributing to the network or that have been flagged as cheating/abusing the system will receive the *Community Blocklist (Lite)*.
3939

4040
This Blocklist is capped at 3 thousand IPs.
41+
42+
### Why is my Security Engine on the Lite Blocklist?
43+
44+
Your Security Engine may be placed on the Lite Blocklist for various reasons, such as:
45+
46+
1. Low Visibility Services
47+
48+
Your services are self-hosted (e.g., for private video or image hosting) and primarily accessed by a small group. As a result, your Security Engine detects less malicious activity compared to public-facing services like blogs or e-commerce sites.
49+
50+
2. Comprehensive Security Setup
51+
52+
Your existing security measures reduce reliance on the Community Blocklist. These may include:
53+
- Geoblocking (restricting access to certain countries)
54+
- IP whitelisting with a default deny-all policy
55+
- VPN-only access
56+
- OAuth authentication (e.g., Authentik, Authelia, Keycloak)
57+
58+
This simply a result of your security model and access requirements, its neither an issue with your setup nor a limitation on our end.
59+
60+
3. Incomplete CrowdSec Configuration
61+
62+
Your Security Engine may not be monitoring all your services.
63+
64+
If you suspect this might be the case, refer to our [post-installation guide](/u/getting_started/next_steps) to ensure full coverage.

crowdsec-docs/docs/cscli/cscli_appsec-configs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Manage hub appsec-configs
1010

1111
```
1212
cscli appsec-configs list -a
13-
cscli appsec-configs install crowdsecurity/vpatch
14-
cscli appsec-configs inspect crowdsecurity/vpatch
15-
cscli appsec-configs upgrade crowdsecurity/vpatch
16-
cscli appsec-configs remove crowdsecurity/vpatch
13+
cscli appsec-configs install crowdsecurity/virtual-patching
14+
cscli appsec-configs inspect crowdsecurity/virtual-patching
15+
cscli appsec-configs upgrade crowdsecurity/virtual-patching
16+
cscli appsec-configs remove crowdsecurity/virtual-patching
1717
1818
```
1919

crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@ cscli appsec-configs inspect [item]... [flags]
1717
### Examples
1818

1919
```
20-
cscli appsec-configs inspect crowdsecurity/vpatch
20+
# Display metadata, state, metrics and ancestor collections of appsec-configs (installed or not).
21+
cscli appsec-configs inspect crowdsecurity/virtual-patching
22+
23+
# Don't collect metrics (avoid error if crowdsec is not running).
24+
cscli appsec-configs inspect crowdsecurity/virtual-patching --no-metrics
25+
26+
# Display difference between a tainted item and the latest one.
27+
cscli appsec-configs inspect crowdsecurity/virtual-patching --diff
28+
29+
# Reverse the above diff
30+
cscli appsec-configs inspect crowdsecurity/virtual-patching --diff --rev
2131
```
2232

2333
### Options

crowdsec-docs/docs/cscli/cscli_appsec-configs_install.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,35 @@ cscli appsec-configs install [item]... [flags]
1717
### Examples
1818

1919
```
20-
cscli appsec-configs install crowdsecurity/vpatch
20+
# Install some appsec-configs.
21+
cscli appsec-configs install crowdsecurity/virtual-patching
22+
23+
# Show the execution plan without changing anything - compact output sorted by type and name.
24+
cscli appsec-configs install crowdsecurity/virtual-patching --dry-run
25+
26+
# Show the execution plan without changing anything - verbose output sorted by execution order.
27+
cscli appsec-configs install crowdsecurity/virtual-patching --dry-run -o raw
28+
29+
# Download only, to be installed later.
30+
cscli appsec-configs install crowdsecurity/virtual-patching --download-only
31+
32+
# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies.
33+
cscli appsec-configs install crowdsecurity/virtual-patching --force
34+
35+
# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
36+
cscli appsec-configs install crowdsecurity/virtual-patching -i
37+
cscli appsec-configs install crowdsecurity/virtual-patching --interactive
2138
```
2239

2340
### Options
2441

2542
```
2643
-d, --download-only Only download packages, don't enable
44+
--dry-run Don't install or remove anything; print the execution plan
2745
--force Force install: overwrite tainted and outdated files
2846
-h, --help help for install
2947
--ignore Ignore errors when installing multiple appsec-configs
48+
-i, --interactive Ask for confirmation before proceeding
3049
```
3150

3251
### Options inherited from parent commands

crowdsec-docs/docs/cscli/cscli_appsec-configs_list.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ cscli appsec-configs list [item... | -a] [flags]
1717
### Examples
1818

1919
```
20+
# List enabled (installed) appsec-configs.
2021
cscli appsec-configs list
22+
23+
# List all available appsec-configs (installed or not).
2124
cscli appsec-configs list -a
22-
cscli appsec-configs list crowdsecurity/vpatch
25+
26+
# List specific appsec-configs (installed or not).
27+
cscli appsec-configs list crowdsecurity/virtual-patching crowdsecurity/generic-rules
2328
```
2429

2530
### Options

crowdsec-docs/docs/cscli/cscli_appsec-configs_remove.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,35 @@ cscli appsec-configs remove [item]... [flags]
1717
### Examples
1818

1919
```
20-
cscli appsec-configs remove crowdsecurity/vpatch
20+
# Uninstall some appsec-configs.
21+
cscli appsec-configs remove crowdsecurity/virtual-patching
22+
23+
# Show the execution plan without changing anything - compact output sorted by type and name.
24+
cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run
25+
26+
# Show the execution plan without changing anything - verbose output sorted by execution order.
27+
cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run -o raw
28+
29+
# Uninstall and also remove the downloaded files.
30+
cscli appsec-configs remove crowdsecurity/virtual-patching --purge
31+
32+
# Remove tainted items.
33+
cscli appsec-configs remove crowdsecurity/virtual-patching --force
34+
35+
# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored.
36+
cscli appsec-configs remove crowdsecurity/virtual-patching -i
37+
cscli appsec-configs remove crowdsecurity/virtual-patching --interactive
2138
```
2239

2340
### Options
2441

2542
```
26-
--all Remove all the appsec-configs
27-
--force Force remove: remove tainted and outdated files
28-
-h, --help help for remove
29-
--purge Delete source file too
43+
--all Remove all the appsec-configs
44+
--dry-run Don't install or remove anything; print the execution plan
45+
--force Force remove: remove tainted and outdated files
46+
-h, --help help for remove
47+
-i, --interactive Ask for confirmation before proceeding
48+
--purge Delete source file too
3049
```
3150

3251
### Options inherited from parent commands

0 commit comments

Comments
 (0)