| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
| informatique:securite:crowdsec [09/11/2025 12:24] – [Test env] cyrille | informatique:securite:crowdsec [17/06/2026 07:36] (Version actuelle) – [No Wordpress Here] cyrille |
|---|
| |
| "Average Malevolent Duration (In Days) of Most Reported AS" page 11 sur [[https://majorityreport.crowdsec.net/hubfs/CrowdSec_Majority_Report.pdf|CrowdSec Majority Report]] | "Average Malevolent Duration (In Days) of Most Reported AS" page 11 sur [[https://majorityreport.crowdsec.net/hubfs/CrowdSec_Majority_Report.pdf|CrowdSec Majority Report]] |
| | |
| | * [[https://blog.stephane-robert.info/docs/securiser/reseaux/crowdsec/|CrowdSec : détection et blocage collaboratif des attaques] par Stéphane Robert 2026-02 |
| | * [[https://github.com/wolffcatskyy/awesome-crowdsec|Awesome CrowdSec resources curated list]] |
| | |
| | |
| |
| ===== Installer crowdsec ===== | ===== Installer crowdsec ===== |
| remediation: true | remediation: true |
| </code> | </code> |
| | |
| | ==== Wordfence to Crowdsec ==== |
| | |
| | https://github.com/Cyrille37/wordfence-blockings-log |
| |
| ===== Technique ===== | ===== Technique ===== |
| * https://discourse.crowdsec.net/t/ban-ips-via-api/1679/5 | * https://discourse.crowdsec.net/t/ban-ips-via-api/1679/5 |
| |
| ===== Test env ===== | ===== Développement - Test env ===== |
| | |
| | [[https://doc.crowdsec.net/docs/contributing/contributing_test_env/|Crowdsec Test Env]] pour développer un parser et ses scénarios. Utile aussi pour la démonstration d'un bug pour argumenter une Issue. |
| | * [[https://docs.crowdsec.net/docs/next/log_processor/parsers/create|Creating parser]] |
| | * [[https://docs.crowdsec.net/docs/next/log_processor/scenarios/create|Creating scenario]] |
| |
| Un p'tit docker dans lequel créé l'environnement de test pour crowdsec | Un p'tit docker dans lequel créé l'environnement de test pour crowdsec |
| -v ./tests-sympa_ww-http-scan:$DEST_HUB/.tests/sympa_ww-http-scan \ | -v ./tests-sympa_ww-http-scan:$DEST_HUB/.tests/sympa_ww-http-scan \ |
| -v ./hub-cyrille37/cyrille37-sympa_ww-logs.yaml:$DEST_HUB/parsers/s01-parse/cyrille37/sympa_ww-logs.yaml \ | -v ./hub-cyrille37/cyrille37-sympa_ww-logs.yaml:$DEST_HUB/parsers/s01-parse/cyrille37/sympa_ww-logs.yaml \ |
| | -v ./hub-cyrille37/cyrille37-sympa_ww-logs.md:$DEST_HUB/parsers/s01-parse/cyrille37/sympa_ww-logs.md \ |
| -v ./hub-cyrille37/cyrille37-sympa_ww-http-scan.yaml:$DEST_HUB/scenarios/cyrille37/sympa_ww-http-scan.yaml \ | -v ./hub-cyrille37/cyrille37-sympa_ww-http-scan.yaml:$DEST_HUB/scenarios/cyrille37/sympa_ww-http-scan.yaml \ |
| | -v ./hub-cyrille37/cyrille37-sympa_ww-http-scan.md:$DEST_HUB/scenarios/cyrille37/sympa_ww-http-scan.md \ |
| crowdsec_test_environnement bash | crowdsec_test_environnement bash |
| |
| <code bash> | <code bash> |
| # in crowdsec-v1.7.2/tests/hub | # in crowdsec-v1.7.2/tests/hub |
| cscli -c ../dev.yaml hubtest run sympa-logs --clean | |
| | cscli -c ../dev.yaml hubtest run sympa_ww-logs --clean |
| | |
| | cscli -c ../dev.yaml hubtest run sympa_ww-http-scan --clean |
| | |
| | # Options |
| | # --clean : supprime automatiquement les dossiers `results` et `runtime` en cas d'erreur |
| | # --no-clean : désactive la suppression dossiers `results` et `runtime` quand pas d'erreur |
| | # --trace : pour avoir le debug des opérations, 📢 indispensable pour le dev |
| </code> | </code> |
| |
| <code bash> | <code bash> |
| # in crowdsec-v1.7.2/tests/hub | # in crowdsec-v1.7.2/tests/hub |
| rm -rf .tests/sympa-logs/results .tests/sympa-logs/runtime | rm -rf .tests/sympa-logs/results .tests/sympa_ww-logs/runtime |
| rm -rf .tests/sympa-http-scan/results .tests/sympa-http-scan/runtime | rm -rf .tests/sympa-http-scan/results .tests/sympa_ww-http-scan/runtime |
| </code> | </code> |
| | |
| | J'ai fait un ''parser'' et ''scenario'' pour "sympa" (service "wwsympa) : https://github.com/crowdsecurity/hub/pull/1580 |
| | |
| | Autres documentations: |
| | * Les [[https://github.com/crowdsecurity/grokky/blob/master/base.go|Patterns Grok prédéfinies]] |
| | * [[https://expr-lang.org/docs/language-definition|Expr language-definition]] a simple, fast and extensible expression language for Go |
| |