Skip to content

CrowdSec: detect WebTop login brute force #8288

Description

@stephdl

CrowdSec does not block brute force attacks against the WebTop login page. A failed login is not visible to any installed CrowdSec collection, so an attacker can try passwords without being banned.

There are two reasons. First, the web server answers a failed login with HTTP 200, the same code as a normal page, so the generic HTTP brute force scenarios (which look for 401/403) never trigger. Second, the web server log only shows the reverse proxy address (Traefik), not the real client, so even a scenario on the access log would ban the proxy itself.

WebTop now writes a dedicated authentication line with the real client address and an explicit result:

Success:

node webapp[1700806]: webtop-auth: [webtop][webtop:core] <SESSION_ID>: client=203.0.113.10 profile=alice@NethServer action=LOGIN_SUCCESS
node apache[1700412]: 10.0.2.100 - - [04/Nov/2026:08:04:27 +0000] "POST /webtop/login HTTP/1.1" 302 -

Failure:

node webapp[1700806]: webtop-auth: [webtop][webtop:core] null: client=203.0.113.10 profile=alice@? action=LOGIN_FAILURE
node apache[1700412]: 10.0.2.100 - - [04/Nov/2026:08:05:44 +0000] "POST /webtop/login HTTP/1.1" 200 4053

Proposed solution

Add a custom parser and a brute force scenario to ns8-crowdsec, like the ones already shipped for NethVoice and Nextcloud. The parser reads the webtop-auth: lines from the webapp program in the journal and extracts the client address, the user and the action. The scenario bans a client address after several LOGIN_FAILURE events in a short time.

Before release, confirm that the client= value always comes from the address set by Traefik and cannot be forged by the client with an X-Forwarded-For header. Otherwise an attacker could get any address banned.

Alternative solutions

A scenario on the web server access log matching POST /webtop/login with status 200. I discarded it: it is fragile and it only sees the proxy address.

Additional context

No WebTop parser exists in the CrowdSec hub.

See also

https://github.com/NethServer/ns8-crowdsec

Activity

  1. added this to the NethServer 8.11 milestone on Nov 4, 2026
  2. added theissue type on Nov 4, 2026
  3. self-assigned this
    on Nov 4, 2026
  4. moved this from ToDo to In Progress in NethServeron Nov 4, 2026
  5. stephdl commented on Nov 4, 2026

    @stephdl
    Author

    QA: CrowdSec bans WebTop brute force

    Needs CrowdSec 1.4.3-dev.2 and WebTop 1.5.17 or later.

    1. Install WebTop and CrowdSec.
    2. Testing from a local IP? Enable "Local network blocking" in CrowdSec Settings.
    3. Fail the WebTop login 6 times within 1 minute.
    4. Expected: your IP is banned (the page stops answering), and the CrowdSec Detections page shows nethserver/webtop-bf.
    5. A correct login must never trigger a ban.

    Unban:

    runagent -m crowdsec1 podman exec crowdsec cscli decisions delete --ip <YOUR_IP>
    
  6. moved this from In Progress to Testing in NethServeron Nov 4, 2026
  7. added
    testingPackages are available from testing repositories
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testingPackages are available from testing repositories

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions