crowdsec
crowdsec copied to clipboard
False positives when proxying Immich
What happened?
time="2025-04-04T16:08:49Z" level=info msg="Ban for IPV4 whitelisted, reason [Immich whitelisted]" id=late-wood name=user/whitelist_immich stage=s01-whitelist
time="2025-04-04T16:08:49Z" level=info msg="Ip IPV4 performed 'crowdsecurity/http-crawl-non_statics' (57 events over 8.425247495s) at 2025-04-04 16:08:48.97766958 +0000 UTC"
time="2025-04-04T16:08:49Z" level=info msg="[Ip IPV4 performed 'crowdsecurity/http-crawl-non_statics' (57 events over 8.425247495s) at 2025-04-04 16:08:48.97766958 +0000 UTC] is whitelisted, skip."
From the ban logs, the tagged action appears to be the /api/albums/6f798dd0-83a8-4dd1-b395-8f4b8a3c31b8 endpoints (various UUIDs)
I am not sure if this is the correct place to report, let me know if it needs to go somewhere else. I do have a whitelist setup to prevent this at home, but was getting banned before this.
What did you expect to happen?
Legitimate traffic should not be blocked.
How can we reproduce it (as minimally and precisely as possible)?
Install Immich with multiple albums. Scroll through the albums, go into some albums with many assets, and scrub the timeline.
Anything else we need to know?
N/A
Crowdsec version
$ cscli version
version: v1.6.8-f209766e
Codename: alphaga
BuildDate: 2025-03-25_15:56:53
GoVersion: 1.24.1
Platform: docker
libre2: C++
User-Agent: crowdsec/v1.6.8-f209766e-docker
Constraint_parser: >= 1.0, <= 3.0
Constraint_scenario: >= 1.0, <= 3.0
Constraint_api: v1
Constraint_acquis: >= 1.0, < 2.0
Built-in optional components: cscli_setup, datasource_appsec, datasource_cloudwatch, datasource_docker, datasource_file, datasource_http, datasource_journalctl, datasource_k8s-audit, datasource_kafka, datasource_kinesis, datasource_loki, datasource_s3, datasource_syslog, datasource_victorialogs, datasource_wineventlog
OS version
# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -a
Linux opti 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64 GNU/Linux
Enabled collections and parsers
$ cscli hub list -o raw
crowdsecurity/apache2-logs,enabled,1.4,Parse Apache2 access and error logs,parsers
crowdsecurity/cri-logs,enabled,0.1,CRI logging format parser,parsers
crowdsecurity/dateparse-enrich,enabled,0.2,,parsers
crowdsecurity/docker-logs,enabled,0.1,docker json logs parser,parsers
crowdsecurity/geoip-enrich,enabled,0.5,"Populate event with geoloc info : as, country, coords, source range.",parsers
crowdsecurity/http-logs,enabled,1.3,"Parse more Specifically HTTP logs, such as HTTP Code, HTTP path, HTTP args and if its a static ressource",parsers
crowdsecurity/nginx-logs,enabled,1.7,Parse nginx access and error logs,parsers
crowdsecurity/sshd-logs,enabled,2.9,Parse openSSH logs,parsers
crowdsecurity/syslog-logs,enabled,0.8,,parsers
crowdsecurity/whitelists,enabled,0.3,Whitelist events from private ipv4 addresses,parsers
user/nginx-custom-hostname,"enabled,local",,,parsers
user/whitelist-asn,"enabled,local",,,parsers
user/whitelist-vpns,"enabled,local",,,parsers
user/FQDN-whitlists,"enabled,local",,,postoverflows
user/whitelist_immich,"enabled,local",,,postoverflows
crowdsecurity/apache_log4j2_cve-2021-44228,enabled,0.6,Detect cve-2021-44228 exploitation attemps,scenarios
crowdsecurity/CVE-2017-9841,enabled,0.2,Detect CVE-2017-9841 exploits,scenarios
crowdsecurity/CVE-2019-18935,enabled,0.2,Detect Telerik CVE-2019-18935 exploitation attempts,scenarios
crowdsecurity/CVE-2022-26134,enabled,0.2,Detect CVE-2022-26134 exploits,scenarios
crowdsecurity/CVE-2022-35914,enabled,0.2,Detect CVE-2022-35914 exploits,scenarios
crowdsecurity/CVE-2022-37042,enabled,0.2,Detect CVE-2022-37042 exploits,scenarios
crowdsecurity/CVE-2022-40684,enabled,0.3,Detect cve-2022-40684 exploitation attempts,scenarios
crowdsecurity/CVE-2022-41082,enabled,0.4,Detect CVE-2022-41082 exploits,scenarios
crowdsecurity/CVE-2022-41697,enabled,0.2,Detect CVE-2022-41697 enumeration,scenarios
crowdsecurity/CVE-2022-42889,enabled,0.3,Detect CVE-2022-42889 exploits (Text4Shell),scenarios
crowdsecurity/CVE-2022-44877,enabled,0.3,Detect CVE-2022-44877 exploits,scenarios
crowdsecurity/CVE-2022-46169,enabled,0.2,Detect CVE-2022-46169 brute forcing,scenarios
crowdsecurity/CVE-2023-22515,enabled,0.1,Detect CVE-2023-22515 exploitation,scenarios
crowdsecurity/CVE-2023-22518,enabled,0.2,Detect CVE-2023-22518 exploits,scenarios
crowdsecurity/CVE-2023-49103,enabled,0.3,Detect owncloud CVE-2023-49103 exploitation attempts,scenarios
crowdsecurity/CVE-2024-0012,enabled,0.1,Detect CVE-2024-0012 exploitation attempts,scenarios
crowdsecurity/CVE-2024-38475,enabled,0.1,Detect CVE-2024-38475 exploitation attempts,scenarios
crowdsecurity/CVE-2024-9474,enabled,0.1,Detect CVE-2024-9474 exploitation attempts,scenarios
crowdsecurity/f5-big-ip-cve-2020-5902,enabled,0.2,Detect cve-2020-5902 exploitation attemps,scenarios
crowdsecurity/fortinet-cve-2018-13379,enabled,0.3,Detect cve-2018-13379 exploitation attemps,scenarios
crowdsecurity/grafana-cve-2021-43798,enabled,0.2,Detect cve-2021-43798 exploitation attemps,scenarios
crowdsecurity/http-admin-interface-probing,enabled,0.4,Detect generic HTTP admin interface probing,scenarios
crowdsecurity/http-backdoors-attempts,enabled,0.6,Detect attempt to common backdoors,scenarios
crowdsecurity/http-bad-user-agent,enabled,1.2,Detect usage of bad User Agent,scenarios
crowdsecurity/http-crawl-non_statics,enabled,0.7,Detect aggressive crawl on non static resources,scenarios
crowdsecurity/http-cve-2021-41773,enabled,0.3,Apache - Path Traversal (CVE-2021-41773),scenarios
crowdsecurity/http-cve-2021-42013,enabled,0.3,Apache - Path Traversal (CVE-2021-42013),scenarios
crowdsecurity/http-cve-probing,enabled,0.6,Detect generic HTTP cve probing,scenarios
crowdsecurity/http-generic-bf,enabled,0.9,Detect generic http brute force,scenarios
crowdsecurity/http-open-proxy,enabled,0.5,Detect scan for open proxy,scenarios
crowdsecurity/http-path-traversal-probing,enabled,0.4,Detect path traversal attempt,scenarios
crowdsecurity/http-probing,enabled,0.4,Detect site scanning/probing from a single ip,scenarios
crowdsecurity/http-sensitive-files,enabled,0.4,"Detect attempt to access to sensitive files (.log, .db ..) or folders (.git)",scenarios
crowdsecurity/http-sqli-probing,enabled,0.4,A scenario that detects SQL injection probing with minimal false positives,scenarios
crowdsecurity/http-wordpress-scan,enabled,0.2,Detect WordPress scan: vuln hunting,scenarios
crowdsecurity/http-xss-probing,enabled,0.4,A scenario that detects XSS probing with minimal false positives,scenarios
crowdsecurity/jira_cve-2021-26086,enabled,0.3,Detect Atlassian Jira CVE-2021-26086 exploitation attemps,scenarios
crowdsecurity/netgear_rce,enabled,0.4,Detect Netgear RCE DGN1000/DGN220 exploitation attempts,scenarios
crowdsecurity/nginx-req-limit-exceeded,enabled,0.3,Detects IPs which violate nginx's user set request limit.,scenarios
crowdsecurity/pulse-secure-sslvpn-cve-2019-11510,enabled,0.3,Detect cve-2019-11510 exploitation attemps,scenarios
crowdsecurity/spring4shell_cve-2022-22965,enabled,0.3,Detect cve-2022-22965 probing,scenarios
crowdsecurity/ssh-bf,enabled,0.3,Detect ssh bruteforce,scenarios
crowdsecurity/ssh-cve-2024-6387,enabled,0.2,Detect exploitation attempt of CVE-2024-6387,scenarios
crowdsecurity/ssh-slow-bf,enabled,0.4,Detect slow ssh bruteforce,scenarios
crowdsecurity/thinkphp-cve-2018-20062,enabled,0.6,Detect ThinkPHP CVE-2018-20062 exploitation attemps,scenarios
crowdsecurity/vmware-cve-2022-22954,enabled,0.3,Detect Vmware CVE-2022-22954 exploitation attempts,scenarios
crowdsecurity/vmware-vcenter-vmsa-2021-0027,enabled,0.2,Detect VMSA-2021-0027 exploitation attemps,scenarios
ltsich/http-w00tw00t,enabled,0.2,detect w00tw00t,scenarios
crowdsecurity/bf_base,enabled,0.1,,contexts
crowdsecurity/http_base,enabled,0.3,,contexts
crowdsecurity/apache2,enabled,0.1,apache2 support : parser and generic http scenarios,collections
crowdsecurity/base-http-scenarios,enabled,1.0,http common : scanners detection,collections
crowdsecurity/http-cve,enabled,2.9,Detect CVE exploitation in http logs,collections
crowdsecurity/linux,enabled,0.2,core linux support : syslog+geoip+ssh,collections
crowdsecurity/nginx,enabled,0.2,nginx support : parser and generic http scenarios,collections
crowdsecurity/sshd,enabled,0.5,sshd support : parser and brute-force detection,collections
Acquisition config
# On Linux:
$ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/*
filenames:
- /var/log/nginx/*.log
labels:
type: nginx
---
filenames:
- /var/log/auth.log
- /var/log/syslog
labels:
type: syslog
---
filename: /var/log/apache2/*.log
labels:
type: apache2
cat: can't open '/etc/crowdsec/acquis.d/*': No such file or directory
Config show
$ cscli config show
Global:
- Configuration Folder : /etc/crowdsec
- Data Folder : /var/lib/crowdsec/data
- Hub Folder : /etc/crowdsec/hub
- Simulation File : /etc/crowdsec/simulation.yaml
- Log Folder : /var/log
- Log level : info
- Log Media : stdout
Crowdsec:
- Acquisition File : /etc/crowdsec/acquis.yaml
- Parsers routines : 1
- Acquisition Folder : /etc/crowdsec/acquis.d
cscli:
- Output : human
- Hub Branch :
API Client:
- URL : http://0.0.0.0:8080/
- Login : localhost
- Credentials File : /etc/crowdsec/local_api_credentials.yaml
Local API Server:
- Listen URL : 0.0.0.0:8080
- Listen Socket :
- Profile File : /etc/crowdsec/profiles.yaml
- Trusted IPs:
- 127.0.0.1
- ::1
- Database:
- Type : sqlite
- Path : /var/lib/crowdsec/data/crowdsec.db
- Flush age : 7d
- Flush size : 5000
Prometheus metrics
$ cscli metrics
+--------------------------------------------------------------------------------------------------------------------------+
| Acquisition Metrics |
+--------------------------------+------------+--------------+----------------+------------------------+-------------------+
| Source | Lines read | Lines parsed | Lines unparsed | Lines poured to bucket | Lines whitelisted |
+--------------------------------+------------+--------------+----------------+------------------------+-------------------+
| : | - | - | - | - | 2 |
| file:/var/log/auth.log | 164 | 4 | 160 | - | 4 |
| file:/var/log/nginx/access.log | 5.14k | 5.14k | - | 178 | 3.93k |
| file:/var/log/nginx/error.log | 18 | - | 18 | - | - |
| file:/var/log/syslog | 1.07k | - | 1.07k | - | - |
+--------------------------------+------------+--------------+----------------+------------------------+-------------------+
+----------------------------------------------+
| Local API Alerts |
+--------------------------------------+-------+
| Reason | Count |
+--------------------------------------+-------+
| crowdsecurity/CVE-2017-9841 | 10 |
| crowdsecurity/CVE-2019-18935 | 3 |
| crowdsecurity/CVE-2022-41082 | 3 |
| crowdsecurity/http-bad-user-agent | 4 |
| crowdsecurity/http-probing | 2 |
| crowdsecurity/http-crawl-non_statics | 6 |
| crowdsecurity/http-cve-2021-41773 | 10 |
| crowdsecurity/http-cve-2021-42013 | 9 |
| crowdsecurity/http-open-proxy | 4 |
| crowdsecurity/http-sensitive-files | 22 |
| crowdsecurity/jira_cve-2021-26086 | 7 |
+--------------------------------------+-------+
+-----------------------------------------------------------------------+
| Bouncer Metrics (opti-iptables) since 2025-03-28 16:17:07 +0000 UTC |
+--------+------------------+-------------------+-----------------------+
| Origin | active_decisions | dropped | processed |
| | IPs | bytes | packets | bytes | packets |
+--------+------------------+---------+---------+-----------+-----------+
| ipset | 38.01k | 2.32M | 35.53k | - | - |
+--------+------------------+---------+---------+-----------+-----------+
| Total | 38.01k | 2.32M | 35.53k | 4.18T | 1.77G |
+--------+------------------+---------+---------+-----------+-----------+
+------------------------------------------------------+
| Local API Decisions |
+----------------------------+--------+--------+-------+
| Reason | Origin | Action | Count |
+----------------------------+--------+--------+-------+
| http:scan | CAPI | ban | 4667 |
| firehol_cruzit_web_attacks | lists | ban | 13226 |
| firehol_cybercrime | lists | ban | 1396 |
| free_proxies | lists | ban | 8669 |
| http:crawl | CAPI | ban | 49 |
| http:exploit | CAPI | ban | 10363 |
+----------------------------+--------+--------+-------+
+--------------------------------------+
| Local API Metrics |
+----------------------+--------+------+
| Route | Method | Hits |
+----------------------+--------+------+
| /v1/decisions/stream | GET | 71 |
| /v1/heartbeat | GET | 11 |
| /v1/usage-metrics | POST | 2 |
| /v1/watchers/login | POST | 1 |
+----------------------+--------+------+
+------------------------------------------------------+
| Local API Bouncers Metrics |
+---------------+----------------------+--------+------+
| Bouncer | Route | Method | Hits |
+---------------+----------------------+--------+------+
| opti-iptables | /v1/decisions/stream | GET | 71 |
+---------------+----------------------+--------+------+
+-------------------------------------------+
| Local API Machines Metrics |
+-----------+---------------+--------+------+
| Machine | Route | Method | Hits |
+-----------+---------------+--------+------+
| localhost | /v1/heartbeat | GET | 11 |
+-----------+---------------+--------+------+
+-------------------------------------------------------------------+
| Parser Metrics |
+--------------------------------------+--------+--------+----------+
| Parsers | Hits | Parsed | Unparsed |
+--------------------------------------+--------+--------+----------+
| child-crowdsecurity/http-logs | 15.41k | 13.98k | 1.42k |
| child-crowdsecurity/nginx-logs | 5.19k | 5.14k | 54 |
| child-crowdsecurity/sshd-logs | 1.08k | 4 | 1.07k |
| child-crowdsecurity/syslog-logs | 1.24k | 1.24k | - |
| child-user/nginx-custom-hostname | 10.28k | 9.61k | 672 |
| crowdsecurity/dateparse-enrich | 5.14k | 5.14k | - |
| crowdsecurity/geoip-enrich | 5.13k | 5.13k | - |
| crowdsecurity/http-logs | 5.14k | 5.14k | - |
| crowdsecurity/nginx-logs | 5.15k | 5.14k | 18 |
| crowdsecurity/non-syslog | 5.15k | 5.15k | - |
| crowdsecurity/sshd-logs | 79 | 4 | 75 |
| crowdsecurity/syslog-logs | 1.24k | 1.24k | - |
| crowdsecurity/whitelists | 5.14k | 5.14k | - |
| user/FQDN-whitlists | 2 | 2 | - |
| user/nginx-custom-hostname | 5.14k | 5.14k | - |
| user/whitelist-uphs | 5.14k | 5.14k | - |
| user/whitelist-vpns | 5.14k | 5.14k | - |
| user/whitelist_immich | 2 | 2 | - |
+--------------------------------------+--------+--------+----------+
+----------------------------------------------------------------------------------------------------+
| Scenario Metrics |
+--------------------------------------+---------------+-----------+--------------+--------+---------+
| Scenario | Current Count | Overflows | Instantiated | Poured | Expired |
+--------------------------------------+---------------+-----------+--------------+--------+---------+
| crowdsecurity/http-crawl-non_statics | 1 | 2 | 13 | 178 | 10 |
+--------------------------------------+---------------+-----------+--------------+--------+---------+
+------------------------------------------------------------------------------+
| Whitelist Metrics |
+---------------------------+-----------------------------+------+-------------+
| Whitelist | Reason | Hits | Whitelisted |
+---------------------------+-----------------------------+------+-------------+
| crowdsecurity/whitelists | private ipv4/ipv6 ip/ranges | 5139 | 5 |
| user/FQDN-whitlists | do whitelistings by FQDN | 2 | - |
| user/whitelist-asn | Whitelisted because ASN | 5139 | 5 |
| user/whitelist-vpns | Momjian custom | 5139 | 3922 |
| user/whitelist_immich | Immich whitelisted | 2 | 2 |
+---------------------------+-----------------------------+------+-------------+
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
@mmomjian: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
- Check Crowdsec Documentation to see if your issue can be self resolved.
- You can also join our Discord.
- Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
Hey @mmomjian, looks like we logged the same issue. Could you try my temporarily solution and see if that fixes it for you?
https://github.com/crowdsecurity/crowdsec/issues/3656#issuecomment-2929395157