#Selfblocking with unknown Reason

1 messages ยท Page 1 of 1 (latest)

fathom kraken
#

Good evening everyone,
I have been using CrowdSec on a server for quite a while now.
Crowdsec runs in a container in combination with traefik and the corresponding bouncer. Supplemented with the bouncer for the host's firewall.

For a few days now, legitimate users of the server have been blocked by mistake and I have to unblock them manually.
When I tried to find the reason, the Alert and Decision List always showed LePresidente/http-generic-403-bf or LePresidente/http-generic-401-bf as the reason.

Unfortunately I could not find out where it comes from. I have not installed such a scenario, parser or collection. Does anyone know how to fix this?

Thank you very much

blissful rivetBOT
#
Important Information

Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.

Log Files

If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.

Guide Followed (CrowdSec Official)

If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.

Screenshots

Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.

blissful rivetBOT
#

This has now been resolved. If you think this is a mistake please run /unresolve

blissful rivetBOT
#

This has now been unresolved.

fathom kraken
#

Here is some more input:

old pecan
#

Hi,
I have the exact same issue. All started about 3 days ago, with the same list. Is is even banning one of my internal address, despite being whitelisted !

delicate maple
#

So we updated the following LePresidente/http-generic-403-bf and LePresidente/http-generic-401-bf to cover all verb instead of just POST this means GET requests also fall into the bucket now because technically speaking 401 and 403 requests should inform the client they need to reauthenticate or simply they are not allowed to request the resource.

However, note not all application use status codes correctly. From what I can see OP the ID 90999 is the first to trigger so would be good if we can get the context from cscli alerts inspect 90999 -d

delicate maple
old pecan
old pecan
delicate maple
old pecan
#

Sorry...

old pecan
delicate maple
#

all good if you provide some alert details we can go through them, however, to keep it cleaner might be best if you open a new thread.

old pecan
delicate maple
old pecan
delicate maple
#

and this machine weboth_crowdsec is the machine that you are currently on?

old pecan
#

It is the machine where CrowdSec and Swag are installed on (docker installation). 192.168.1.254 is the IP of my router.

delicate maple
#

and if you exec into the container and run cscli parsers list you see the default crowdsecurity/whitelists? Please note if you have loaded a custom whitelist using the same name key then this may cause an issue as it will override the default LAN whitelist.

old pecan
delicate maple
old pecan
#

So I renamed it differently to avoid confusion now, but still have the same file content as the crowdsecurity/whitelist file. Guess I don't need to duplicate by adding the "official" file too, correct ? Or would it be better to remove the local one and reinstate the clean crowdsecurity/whitelist one ?

fathom kraken
#

Tanks for the Responses

#

I can not inspect these old events. But i blocked now ๐Ÿ˜‰

#

If i inspect he first event today i get this output:
crowdsec:/# cscli alerts inspect 95732

################################################################################################

  • ID : 95732

  • Date : 2024-12-30T14:27:15Z

  • Machine : localhost

  • Simulation : true

  • Remediation : true

  • Reason : crowdsecurity/http-crawl-non_statics

  • Events Count : 63

  • Scope:Value : Ip:84.152.228.140

  • Country : DE

  • AS : Deutsche Telekom AG

  • Begin : 2024-12-30 14:27:02.525805936 +0000 UTC

  • End : 2024-12-30 14:27:15.148205688 +0000 UTC

  • UUID : 71cd87bf-edf1-4735-b5ed-013af6b0db1e

  • Active Decisions :
    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    โ”‚ ID โ”‚ scope:value โ”‚ action โ”‚ expiration โ”‚ created_at โ”‚
    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
    โ”‚ 37436798 โ”‚ Ip:84.152.228.140 โ”‚ ban โ”‚ 3h54m40s โ”‚ 2024-12-30T14:27:15Z โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

  • Context :
    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    โ”‚ Key โ”‚ Value โ”‚
    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
    โ”‚ method โ”‚ GET โ”‚
    โ”‚ status โ”‚ 200 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/157 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/136 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/123 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/129 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/77 โ”‚
    โ”‚ target_uri โ”‚ /api/v1/request/147 โ”‚
    โ”‚ user_agent โ”‚ - โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

#

This is the result of today's latest event.
I don't quite understand the problem, because the answers are all in the 200s.

I assume the application here is Overseer and the amount of API calls at this point are normal.

delicate maple
fathom kraken
fathom kraken
delicate maple
#

here some resources:
https://docs.crowdsec.net/docs/next/log_processor/whitelist/create_expr
https://app.crowdsec.net/hub/author/crowdsecurity/log-parsers/nextcloud-whitelist

The former is the docs, and the latter is an example showing how people whitelisted expressions in nextcloud

Let's whitelist a specific user-agent (of course, it's just an example, don't do this in production !).

CrowdSec Console

Use CrowdSec Console to visualize security data, manage dynamic blocklists, and gain real-time intelligence on IPs. Enhance your threat response capabilities.

fathom kraken
#

Thanks

rough orbit
# delicate maple So we updated the following `LePresidente/http-generic-403-bf` and `LePresidente...

This caused a lot of false positives here with git UIs that use challenge-response flows like Fork because those flows always start with a 401 and the client resends the request with proper authorization headers resulting in a successful 200 (which crowdsec ignores). The false positive blocks by crowdsec happen about every 10 minutes when using a git client with ~10 background fetched repos.

Whitelisting the IP is not an option because the blocked IP isn't static.

#

What other options do I have?

#

Would you consider a more sensible default (like ignoring a 401 if it is succeeded by a 200)?

delicate maple
# rough orbit This caused a lot of false positives here with git UIs that use challenge-respon...

The bucket is filering down to 401 codes only so it doesnt know it was succeeded by a 200, the other option you have is to whitelist the expression of the request sort of similar to how we did nextcloud: https://app.crowdsec.net/hub/author/crowdsecurity/log-parsers/nextcloud-whitelist

CrowdSec Console

Use CrowdSec Console to visualize security data, manage dynamic blocklists, and gain real-time intelligence on IPs. Enhance your threat response capabilities.

rough orbit