Compare commits

..
1 Commits
Author SHA1 Message Date
il 5dd38b7e49 fix(crowdsec): update whitelist.yaml to prevent false positive
false positive:
- chunk problems (crowdsecurity/http-crawl-non_statics)
- directory upload 404 problem (crowdsecurity/http-probing)
2026-05-02 20:38:48 +09:00
2 changed files with 15 additions and 7 deletions
@@ -18,6 +18,9 @@ whitelist:
- "evt.Meta.target_fqdn == '{{ services['immich']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/api/assets/' && evt.Meta.http_path contains '/thumbnail'" - "evt.Meta.target_fqdn == '{{ services['immich']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/api/assets/' && evt.Meta.http_path contains '/thumbnail'"
# opencloud chunk request false positive # opencloud chunk request false positive
- "evt.Meta.target_fqdn == '{{ services['opencloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/js/chunks/'" - "evt.Meta.target_fqdn == '{{ services['opencloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/js/chunks/'"
# nextcloud chunk request false positive # nextcloud chunk request false positive (crowdsecurity/http-crawl-non_statics)
- evt.Meta.target_fqdn == '{{ services['opencloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/apps/viewer/js/' - "evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/apps/viewer/js/'"
- "evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/dist/'"
# nextcloud upload directory request 404 error false positive (crowdsecurity/http-probing)
- "evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/remote.php/dav/files/'"
{% endif %} {% endif %}
+10 -5
View File
@@ -14,20 +14,25 @@
- fw ban users' IP address. - fw ban users' IP address.
## Reason ## Reason
- Nextcloud uses chunks when clients uploads or download files to it. - Nextcloud uses chunks for actions, and uploading and downloading
- LAPI decides a ban when a lot of chunks file is uploaded or downloaded from external devices. - chunks on '/apps/viewer/js', '/dist/'
- `crowdsecurity/http-crawl-non_statics` - `crowdsecurity/http-crawl-non_statics`
- Nextcloud keeps checking directory which is uploading
- upload directory '/remote.php/dav/files/'
- `crowdsecurity/http-probing`
## Timeline ## Timeline
- 2026-05-02: Release OpenCloud - 2026-05-02: Release nextcloud
- 2026-05-02: Find the false positive case, and add whitelist - 2026-05-02: Find the false positive case, and add whitelist
## Solution ## Solution
- Access to fw - Access to fw
- Check the ban list with `sudo cscli alerts list` - Check the ban list with `sudo cscli alerts list`
- Read the ban case with `sudo cscli alerts inspect $NUMBER` - Read the ban case with `sudo cscli alerts inspect $NUMBER`
- Add regex on whitelist - Add expressions on whitelist
- evt.Meta.target_fcqdn == '{{ services['opencloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/apps/viewer/js/' - evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/apps/viewer/js/'
- evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/dist/'
- evt.Meta.target_fqdn == '{{ services['nextcloud']['domain']['public'] }}.{{ domain['public'] }}' && evt.Meta.http_path contains '/remote.php/dav/files/'
- Delete false positive decision - Delete false positive decision
- Check false positive decision with `sudo cscli decision list` - Check false positive decision with `sudo cscli decision list`
- Delete false positive decision with `sudo cscli decision delete --id $ID` - Delete false positive decision with `sudo cscli decision delete --id $ID`