hub icon indicating copy to clipboard operation
hub copied to clipboard

False positive http-crawl-non_statics with Nextcloud desktop client

Open Signum opened this issue 1 year ago • 13 comments

What happened?

When setting up the Nextcloud desktop client it will sync a lot of files with the Nextcloud server. This quickly triggers crowdsecurity/http-crawl-non_statics and blocks the client.

What did you expect to happen?

Allow the sync to run through without triggering the crowdsecurity/http-crawl-non_statics

How can we reproduce it (as minimally and precisely as possible)?

Install the Nextcloud desktop client from https://nextcloud.com/install/ Put a couple of files in the sync directory and start syncing.

Anything else we need to know?

No response

Crowdsec version

$ cscli version
2023/03/03 10:21:01 version: v1.4.6-debian-pragmatic-5f71037b40c498045e1b59923504469e2b8d0140
2023/03/03 10:21:01 Codename: alphaga
2023/03/03 10:21:01 BuildDate: 2023-02-09_14:34:10
2023/03/03 10:21:01 GoVersion: 1.19.2
2023/03/03 10:21:01 Platform: linux
2023/03/03 10:21:01 Constraint_parser: >= 1.0, <= 2.0
2023/03/03 10:21:01 Constraint_scenario: >= 1.0, < 3.0
2023/03/03 10:21:01 Constraint_api: v1
2023/03/03 10:21:01 Constraint_acquis: >= 1.0, < 2.0

OS version

# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
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 tron 5.10.0-21-amd64 crowdsecurity/crowdsec#1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

Enabled collections and parsers

$ cscli hub list -o raw
crowdsecurity/apache2,enabled,0.1,apache2 support : parser and generic http scenarios ,collections
crowdsecurity/base-http-scenarios,enabled,0.6,http common : scanners detection,collections
crowdsecurity/dovecot,enabled,0.1,dovecot support : parser and spammer detection,collections
crowdsecurity/http-cve,enabled,1.9,,collections
crowdsecurity/linux,enabled,0.2,core linux support : syslog+geoip+ssh,collections
crowdsecurity/nextcloud,enabled,0.3,Nextcloud support : parser and brute-force detection,collections
crowdsecurity/postfix,enabled,0.2,postfix support : parser and spammer detection,collections
crowdsecurity/sshd,enabled,0.2,sshd support : parser and brute-force detection,collections
crowdsecurity/apache2-logs,enabled,1.3,Parse Apache2 access and error logs,parsers
crowdsecurity/dateparse-enrich,enabled,0.2,,parsers
crowdsecurity/dovecot-logs,enabled,0.6,Parse dovecot logs,parsers
crowdsecurity/geoip-enrich,enabled,0.2,"Populate event with geoloc info : as, country, coords, source range.",parsers
crowdsecurity/http-logs,enabled,1.1,"Parse more Specifically HTTP logs, such as HTTP Code, HTTP path, HTTP args and if its a static ressource",parsers
crowdsecurity/nextcloud-logs,enabled,0.2,Parse nextcloud logs,parsers
crowdsecurity/nextcloud-whitelist,enabled,0.3,Whitelist events from nextcloud,parsers
crowdsecurity/postfix-logs,enabled,0.4,Parse postfix logs,parsers
crowdsecurity/postscreen-logs,enabled,0.2,Parse postscreen logs,parsers
crowdsecurity/sshd-logs,enabled,2.0,Parse openSSH logs,parsers
crowdsecurity/syslog-logs,enabled,0.8,,parsers
crowdsecurity/whitelists,enabled,0.2,Whitelist events from private ipv4 addresses,parsers
crowdsecurity/CVE-2022-26134,enabled,0.1,Detect CVE-2022-26134 exploits,scenarios
crowdsecurity/CVE-2022-35914,enabled,0.1,Detect CVE-2022-35914 exploits,scenarios
crowdsecurity/CVE-2022-37042,enabled,0.1,Detect CVE-2022-37042 exploits,scenarios
crowdsecurity/CVE-2022-40684,enabled,0.2,Detect cve-2022-40684 exploitation attempts,scenarios
crowdsecurity/CVE-2022-41082,enabled,0.3,Detect CVE-2022-41082 exploits,scenarios
crowdsecurity/CVE-2022-41697,enabled,0.1,Detect CVE-2022-41697 enumeration,scenarios
crowdsecurity/CVE-2022-42889,enabled,0.2,Detect CVE-2022-42889 exploits (Text4Shell),scenarios
crowdsecurity/CVE-2022-44877,enabled,0.2,Detect CVE-2022-44877 exploits,scenarios
crowdsecurity/CVE-2022-46169,enabled,0.1,Detect CVE-2022-46169 brute forcing,scenarios
crowdsecurity/apache_log4j2_cve-2021-44228,enabled,0.4,Detect cve-2021-44228 exploitation attemps,scenarios
crowdsecurity/dovecot-spam,enabled,0.3,detect errors on dovecot,scenarios
crowdsecurity/f5-big-ip-cve-2020-5902,enabled,0.1,Detect cve-2020-5902 exploitation attemps,scenarios
crowdsecurity/fortinet-cve-2018-13379,enabled,0.2,Detect cve-2018-13379 exploitation attemps,scenarios
crowdsecurity/grafana-cve-2021-43798,enabled,0.1,Detect cve-2021-43798 exploitation attemps,scenarios
crowdsecurity/http-backdoors-attempts,enabled,0.3,Detect attempt to common backdoors,scenarios
crowdsecurity/http-bad-user-agent,enabled,0.7,Detect bad user-agents,scenarios
crowdsecurity/http-crawl-non_statics,enabled,0.3,Detect aggressive crawl from single ip,scenarios
crowdsecurity/http-cve-2021-41773,enabled,0.1,cve-2021-41773,scenarios
crowdsecurity/http-cve-2021-42013,enabled,0.1,cve-2021-42013,scenarios
crowdsecurity/http-generic-bf,enabled,0.4,Detect generic http brute force,scenarios
crowdsecurity/http-open-proxy,enabled,0.3,Detect scan for open proxy,scenarios
crowdsecurity/http-path-traversal-probing,enabled,0.2,Detect path traversal attempt,scenarios
crowdsecurity/http-probing,enabled,0.2,Detect site scanning/probing from a single ip,scenarios
crowdsecurity/http-sensitive-files,enabled,0.2,"Detect attempt to access to sensitive files (.log, .db ..) or folders (.git)",scenarios
crowdsecurity/http-sqli-probing,enabled,0.2,A scenario that detects SQL injection probing with minimal false positives,scenarios
crowdsecurity/http-xss-probing,enabled,0.2,A scenario that detects XSS probing with minimal false positives,scenarios
crowdsecurity/jira_cve-2021-26086,enabled,0.1,Detect Atlassian Jira CVE-2021-26086 exploitation attemps,scenarios
crowdsecurity/nextcloud-bf,enabled,0.2,Detect Nextcloud bruteforce,scenarios
crowdsecurity/postfix-spam,enabled,0.2,Detect spammers,scenarios
crowdsecurity/pulse-secure-sslvpn-cve-2019-11510,enabled,0.2,Detect cve-2019-11510 exploitation attemps,scenarios
crowdsecurity/spring4shell_cve-2022-22965,enabled,0.2,Detect cve-2022-22965 probing,scenarios
crowdsecurity/ssh-bf,enabled,0.1,Detect ssh bruteforce,scenarios
crowdsecurity/ssh-slow-bf,enabled,0.2,Detect slow ssh bruteforce,scenarios
crowdsecurity/thinkphp-cve-2018-20062,enabled,0.3,Detect ThinkPHP CVE-2018-20062 exploitation attemps,scenarios
crowdsecurity/vmware-cve-2022-22954,enabled,0.2,Detect Vmware CVE-2022-22954 exploitation attempts,scenarios
crowdsecurity/vmware-vcenter-vmsa-2021-0027,enabled,0.1,Detect VMSA-2021-0027 exploitation attemps,scenarios
ltsich/http-w00tw00t,enabled,0.1,detect w00tw00t,scenarios

Acquisition config

```console # On Linux: $ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/* Feb 13 01:21:28 tron crowdsec-firewall-bouncer[627091]: time="2023-02-13T01:21:28+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:21:28 tron crowdsec-firewall-bouncer[627091]: time="2023-02-13T01:21:28+01:00" level=info msg="config is valid" Feb 13 01:21:28 tron crowdsec-firewall-bouncer[627098]: time="2023-02-13T01:21:28+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:21:28 tron systemd[1]: crowdsec-firewall-bouncer.service: Failed with result 'protocol'. ░░ The unit crowdsec-firewall-bouncer.service has entered the 'failed' state with result 'protocol'. ░░ Subject: A start job for unit crowdsec-firewall-bouncer.service has failed ░░ A start job for unit crowdsec-firewall-bouncer.service has finished with a failure. ░░ Subject: A start job for unit crowdsec-firewall-bouncer.service has begun execution ░░ A start job for unit crowdsec-firewall-bouncer.service has begun execution. Feb 13 01:23:34 tron crowdsec-firewall-bouncer[627136]: time="2023-02-13T01:23:34+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:23:34 tron crowdsec-firewall-bouncer[627136]: time="2023-02-13T01:23:34+01:00" level=info msg="config is valid" Feb 13 01:23:34 tron crowdsec-firewall-bouncer[627143]: time="2023-02-13T01:23:34+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:23:34 tron systemd[1]: crowdsec-firewall-bouncer.service: Failed with result 'protocol'. ░░ The unit crowdsec-firewall-bouncer.service has entered the 'failed' state with result 'protocol'. ░░ Subject: A start job for unit crowdsec-firewall-bouncer.service has failed ░░ A start job for unit crowdsec-firewall-bouncer.service has finished with a failure. ░░ Subject: A start job for unit crowdsec-firewall-bouncer.service has begun execution ░░ A start job for unit crowdsec-firewall-bouncer.service has begun execution. Feb 13 01:27:22 tron crowdsec-firewall-bouncer[627282]: time="2023-02-13T01:27:22+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:27:22 tron crowdsec-firewall-bouncer[627282]: time="2023-02-13T01:27:22+01:00" level=info msg="config is valid" Feb 13 01:27:22 tron crowdsec-firewall-bouncer[627289]: time="2023-02-13T01:27:22+01:00" level=info msg="crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780" Feb 13 01:27:22 tron systemd[1]: crowdsec-firewall-bouncer.service: Failed with result 'protocol'. ░░ The unit crowdsec-firewall-bouncer.service has entered the 'failed' state with result 'protocol'. ░░ Subject: A start job for unit crowdsec-firewall-bouncer.service has failed ░░ A start job for unit crowdsec-firewall-bouncer.service has finished with a failure.

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              : file
Crowdsec:
  - Acquisition File        : /etc/crowdsec/acquis.yaml
  - Parsers routines        : 1
  - Acquisition Folder      : /etc/crowdsec/acquis.d
cscli:
  - Output                  : human
  - Hub Branch              : 
  - Hub Folder              : /etc/crowdsec/hub
Local API Server:
  - Listen URL              : 127.0.0.1:8080
  - 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
[empty]

Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.

Signum avatar Mar 03 '23 09:03 Signum

@Signum: Thanks for opening an issue, it is currently awaiting triage.

In the meantime, you can:

  1. Check Crowdsec Documentation to see if your issue can be self resolved.
  2. You can also join our Discord.
  3. 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.

github-actions[bot] avatar Mar 03 '23 09:03 github-actions[bot]

Moving issue over to the hub as it best place over there

LaurenceJJones avatar Mar 03 '23 09:03 LaurenceJJones

To be able to create a whitelist for this issue, I am going to need the output of cscli alerts inspect -d <alert_id> you can find the alert_id by running cscli alerts list and take the ID on the far left. There may be your IP address within there so make sure to redact but the key bits of information is:

  • http_status
  • http_path
  • http_verb

LaurenceJJones avatar Mar 03 '23 09:03 LaurenceJJones

Thanks for the swift response.

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

 - ID         : 2435
 - Date       : 2023-03-03T09:06:19Z
 - Machine    : 760882fc9a9b49719e0f631a1c3181b72IX0kvPJzmRxkQXx
 - Simulation : false
 - Reason     : crowdsecurity/http-crawl-non_statics
 - Events Count : 46
 - Scope:Value: Ip:91.106.190.76
 - Country    : DE
 - AS         : Vereinigte Stadtwerke Media GmbH
 - Begin      : 2023-03-03 09:06:07.386705213 +0000 UTC
 - End        : 2023-03-03 09:06:19.12559318 +0000 UTC


 - Events  :

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------------+
|       Key       |                            Value                             |
+-----------------+--------------------------------------------------------------+
| ASNNumber       | 198930                                                       |
+-----------------+--------------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                             |
+-----------------+--------------------------------------------------------------+
| IsInEU          | true                                                         |
+-----------------+--------------------------------------------------------------+
| IsoCode         | DE                                                           |
+-----------------+--------------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                              |
+-----------------+--------------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                            |
+-----------------+--------------------------------------------------------------+
| datasource_type | file                                                         |
+-----------------+--------------------------------------------------------------+
| http_args_len   | 0                                                            |
+-----------------+--------------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/…                           |
+-----------------+--------------------------------------------------------------+
| http_status     | 200                                                          |
+-----------------+--------------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,              |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture:       |
|                 | x86_64 OsArchitecture: x86_64)                               |
+-----------------+--------------------------------------------------------------+
| http_verb       | GET                                                          |
+-----------------+--------------------------------------------------------------+
| log_type        | http_access-log                                              |
+-----------------+--------------------------------------------------------------+
| service         | http                                                         |
+-----------------+--------------------------------------------------------------+
| source_ip       | 91.106.190.76                                                |
+-----------------+--------------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                                    |
+-----------------+--------------------------------------------------------------+

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------------+
|       Key       |                            Value                             |
+-----------------+--------------------------------------------------------------+
| ASNNumber       | 198930                                                       |
+-----------------+--------------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                             |
+-----------------+--------------------------------------------------------------+
| IsInEU          | true                                                         |
+-----------------+--------------------------------------------------------------+
| IsoCode         | DE                                                           |
+-----------------+--------------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                              |
+-----------------+--------------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                            |
+-----------------+--------------------------------------------------------------+
| datasource_type | file                                                         |
+-----------------+--------------------------------------------------------------+
| http_args_len   | 0                                                            |
+-----------------+--------------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/…                           |
+-----------------+--------------------------------------------------------------+
| http_status     | 200                                                          |
+-----------------+--------------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,              |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture:       |
|                 | x86_64 OsArchitecture: x86_64)                               |
+-----------------+--------------------------------------------------------------+
| http_verb       | GET                                                          |
+-----------------+--------------------------------------------------------------+
| log_type        | http_access-log                                              |
+-----------------+--------------------------------------------------------------+
| service         | http                                                         |
+-----------------+--------------------------------------------------------------+
| source_ip       | 91.106.190.76                                                |
+-----------------+--------------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                                    |
+-----------------+--------------------------------------------------------------+

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------------+
|       Key       |                            Value                             |
+-----------------+--------------------------------------------------------------+
| ASNNumber       | 198930                                                       |
+-----------------+--------------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                             |
+-----------------+--------------------------------------------------------------+
| IsInEU          | true                                                         |
+-----------------+--------------------------------------------------------------+
| IsoCode         | DE                                                           |
+-----------------+--------------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                              |
+-----------------+--------------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                            |
+-----------------+--------------------------------------------------------------+
| datasource_type | file                                                         |
+-----------------+--------------------------------------------------------------+
| http_args_len   | 0                                                            |
+-----------------+--------------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/…                           |
+-----------------+--------------------------------------------------------------+
| http_status     | 200                                                          |
+-----------------+--------------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,              |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture:       |
|                 | x86_64 OsArchitecture: x86_64)                               |
+-----------------+--------------------------------------------------------------+
| http_verb       | GET                                                          |
+-----------------+--------------------------------------------------------------+
| log_type        | http_access-log                                              |
+-----------------+--------------------------------------------------------------+
| service         | http                                                         |
+-----------------+--------------------------------------------------------------+
| source_ip       | 91.106.190.76                                                |
+-----------------+--------------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                                    |
+-----------------+--------------------------------------------------------------+

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------------+
|       Key       |                            Value                             |
+-----------------+--------------------------------------------------------------+
| ASNNumber       | 198930                                                       |
+-----------------+--------------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                             |
+-----------------+--------------------------------------------------------------+
| IsInEU          | true                                                         |
+-----------------+--------------------------------------------------------------+
| IsoCode         | DE                                                           |
+-----------------+--------------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                              |
+-----------------+--------------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                            |
+-----------------+--------------------------------------------------------------+
| datasource_type | file                                                         |
+-----------------+--------------------------------------------------------------+
| http_args_len   | 0                                                            |
+-----------------+--------------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/perfmedia/…                 |
+-----------------+--------------------------------------------------------------+
| http_status     | 200                                                          |
+-----------------+--------------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,              |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture:       |
|                 | x86_64 OsArchitecture: x86_64)                               |
+-----------------+--------------------------------------------------------------+
| http_verb       | GET                                                          |
+-----------------+--------------------------------------------------------------+
| log_type        | http_access-log                                              |
+-----------------+--------------------------------------------------------------+
| service         | http                                                         |
+-----------------+--------------------------------------------------------------+
| source_ip       | 91.106.190.76                                                |
+-----------------+--------------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                                    |
+-----------------+--------------------------------------------------------------+

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------------+
|       Key       |                            Value                             |
+-----------------+--------------------------------------------------------------+
| ASNNumber       | 198930                                                       |
+-----------------+--------------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                             |
+-----------------+--------------------------------------------------------------+
| IsInEU          | true                                                         |
+-----------------+--------------------------------------------------------------+
| IsoCode         | DE                                                           |
+-----------------+--------------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                              |
+-----------------+--------------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                            |
+-----------------+--------------------------------------------------------------+
| datasource_type | file                                                         |
+-----------------+--------------------------------------------------------------+
| http_args_len   | 0                                                            |
+-----------------+--------------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/…                           |
+-----------------+--------------------------------------------------------------+
| http_status     | 200                                                          |
+-----------------+--------------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,              |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture:       |
|                 | x86_64 OsArchitecture: x86_64)                               |
+-----------------+--------------------------------------------------------------+
| http_verb       | GET                                                          |
+-----------------+--------------------------------------------------------------+
| log_type        | http_access-log                                              |
+-----------------+--------------------------------------------------------------+
| service         | http                                                         |
+-----------------+--------------------------------------------------------------+
| source_ip       | 91.106.190.76                                                |
+-----------------+--------------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                                    |
+-----------------+--------------------------------------------------------------+

- Date: 2023-03-03 10:06:18 +0100 +0100
+-----------------+--------------------------------------------------------+
|       Key       |                         Value                          |
+-----------------+--------------------------------------------------------+
| ASNNumber       | 198930                                                 |
+-----------------+--------------------------------------------------------+
| ASNOrg          | Vereinigte Stadtwerke Media GmbH                       |
+-----------------+--------------------------------------------------------+
| IsInEU          | true                                                   |
+-----------------+--------------------------------------------------------+
| IsoCode         | DE                                                     |
+-----------------+--------------------------------------------------------+
| SourceRange     | 91.106.128.0/18                                        |
+-----------------+--------------------------------------------------------+
| datasource_path | /var/log/apache2/cloud-access.log                      |
+-----------------+--------------------------------------------------------+
| datasource_type | file                                                   |
+-----------------+--------------------------------------------------------+
| http_args_len   | 0                                                      |
+-----------------+--------------------------------------------------------+
| http_path       | /remote.php/dav/files/chaas/SYNC/…                     |
+-----------------+--------------------------------------------------------+
| http_status     | 200                                                    |
+-----------------+--------------------------------------------------------+
| http_user_agent | Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud,        |
|                 | org.kde.Platform-5.15.0-60-generic ClientArchitecture: |
|                 | x86_64 OsArchitecture: x86_64)                         |
+-----------------+--------------------------------------------------------+
| http_verb       | GET                                                    |
+-----------------+--------------------------------------------------------+
| log_type        | http_access-log                                        |
+-----------------+--------------------------------------------------------+
| service         | http                                                   |
+-----------------+--------------------------------------------------------+
| source_ip       | 91.106.190.76                                          |
+-----------------+--------------------------------------------------------+
| timestamp       | 2023-03-03T10:06:18+01:00                              |
+-----------------+--------------------------------------------------------+

Signum avatar Mar 03 '23 10:03 Signum

This is similar to an issue raised by a user in discord yesterday? Just checking your not the same person if not I can surely issue a fix by today. We just need to make the last whitelist item within nextcloud-whitelist a regex that can match /dav/ and /webdav/

however, noted your are GET so maybe this is different user sorry. 👋🏻

LaurenceJJones avatar Mar 03 '23 10:03 LaurenceJJones

I'm afraid I'm not the person from Discord. :)

Signum avatar Mar 03 '23 10:03 Signum

I have the same issue when browsing through my photos.

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

  • ID : 1452

  • Date : 2023-03-09T10:13:24Z

  • Machine : N/A

  • Simulation : false

  • Reason : crowdsecurity/http-probing

  • Events Count : 12

  • Scope:Value: Ip:193.173.45.87

  • Country : NL

  • AS : KPN B.V.

  • Begin : 2023-03-09 10:13:02 +0000 UTC

  • End : 2023-03-09 10:13:16 +0000 UTC

  • Events :

  • Date: 2023-03-09 10:13:01 +0000 UTC ╭─────────────────────┬─────────────────────────────────────────────╮ │ Key │ Value │ ├─────────────────────┼─────────────────────────────────────────────┤ │ ASNNumber │ 1136 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ ASNOrg │ KPN B.V. │ ├─────────────────────┼─────────────────────────────────────────────┤ │ IsInEU │ true │ ├─────────────────────┼─────────────────────────────────────────────┤ │ IsoCode │ NL │ ├─────────────────────┼─────────────────────────────────────────────┤ │ SourceRange │ 193.173.0.0/18 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ datasource_path │ /logs/traefik/access.log │ ├─────────────────────┼─────────────────────────────────────────────┤ │ datasource_type │ file │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_args_len │ 9 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_path │ /apps/photos/api/v1/preview/28131?x=64&y=64 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_status │ 404 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ log_type │ http_access-log │ ├─────────────────────┼─────────────────────────────────────────────┤ │ service │ http │ ├─────────────────────┼─────────────────────────────────────────────┤ │ source_ip │ 193.173.45.87 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ timestamp │ 2023-03-09T10:13:01Z │ ├─────────────────────┼─────────────────────────────────────────────┤ │ traefik_router_name │ nextcloud-secure@docker │ ├─────────────────────┼─────────────────────────────────────────────┤ │ user │ - │ ╰─────────────────────┴─────────────────────────────────────────────╯

thyeestes avatar Mar 13 '23 09:03 thyeestes

I have the same issue when browsing through my photos.

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

  • ID : 1452
  • Date : 2023-03-09T10:13:24Z
  • Machine : N/A
  • Simulation : false
  • Reason : crowdsecurity/http-probing
  • Events Count : 12
  • Scope:Value: Ip:193.173.45.87
  • Country : NL
  • AS : KPN B.V.
  • Begin : 2023-03-09 10:13:02 +0000 UTC
  • End : 2023-03-09 10:13:16 +0000 UTC
  • Events :
  • Date: 2023-03-09 10:13:01 +0000 UTC ╭─────────────────────┬─────────────────────────────────────────────╮ │ Key │ Value │ ├─────────────────────┼─────────────────────────────────────────────┤ │ ASNNumber │ 1136 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ ASNOrg │ KPN B.V. │ ├─────────────────────┼─────────────────────────────────────────────┤ │ IsInEU │ true │ ├─────────────────────┼─────────────────────────────────────────────┤ │ IsoCode │ NL │ ├─────────────────────┼─────────────────────────────────────────────┤ │ SourceRange │ 193.173.0.0/18 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ datasource_path │ /logs/traefik/access.log │ ├─────────────────────┼─────────────────────────────────────────────┤ │ datasource_type │ file │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_args_len │ 9 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_path │ /apps/photos/api/v1/preview/28131?x=64&y=64 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ http_status │ 404 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ log_type │ http_access-log │ ├─────────────────────┼─────────────────────────────────────────────┤ │ service │ http │ ├─────────────────────┼─────────────────────────────────────────────┤ │ source_ip │ 193.173.45.87 │ ├─────────────────────┼─────────────────────────────────────────────┤ │ timestamp │ 2023-03-09T10:13:01Z │ ├─────────────────────┼─────────────────────────────────────────────┤ │ traefik_router_name │ nextcloud-secure@docker │ ├─────────────────────┼─────────────────────────────────────────────┤ │ user │ - │ ╰─────────────────────┴─────────────────────────────────────────────╯

Have you installed the whitelist? https://hub.crowdsec.net/author/crowdsecurity/configurations/nextcloud-whitelist

Photos is already covered but doesnt come with nextcloud collection you must install it optionally

LaurenceJJones avatar Mar 13 '23 09:03 LaurenceJJones

No I didn´t sorry I missed it. So ignore my message.

thyeestes avatar Mar 13 '23 14:03 thyeestes

I'm afraid but the problem occurs again despite having the whitelist installed. I suspect that the whitelist does not cover response code 200 while the desktop client syncs its files.

Here is a new alert:

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

 - ID           : 140374
 - Date         : 2023-07-25T21:01:43Z
 - Machine      : 760882fc9a9b49719e0f631a1c3181b72IX0kvPJzmRxkQXx
 - Simulation   : false
 - Reason       : crowdsecurity/http-crawl-non_statics
 - Events Count : 58
 - Scope:Value  : Ip:91…
 - Country      : DE
 - AS           : Vereinigte Stadtwerke Media GmbH
 - Begin        : 2023-07-25 21:01:08.472402989 +0000 UTC
 - End          : 2023-07-25 21:01:43.181514656 +0000 UTC
 - UUID         : 597836b8-a72a-4037-b01d-b66b0374eb27

 - Active Decisions  :
╭──────────┬──────────────────┬────────┬────────────────────┬──────────────────────╮
│    ID    │   scope:value    │ action │     expiration     │      created_at      │
├──────────┼──────────────────┼────────┼────────────────────┼──────────────────────┤
│ 29691493 │ Ip:91.106.190.76 │ ban    │ 1h50m22.051219345s │ 2023-07-25T21:01:43Z │
╰──────────┴──────────────────┴────────┴────────────────────┴──────────────────────╯

 - Events  :

- Date: 2023-07-25 23:01:42 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/02-Februar/21_Fr.md                                                           │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.106.190.76                                                                                                                         │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:42+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

- Date: 2023-07-25 23:01:42 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/02-Februar/20_Do.md                                                           │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.106.190.76                                                                                                                         │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:42+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

- Date: 2023-07-25 23:01:42 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/02-Februar/25_Di.md                                                           │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.…
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:42+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

- Date: 2023-07-25 23:01:42 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/02-Februar/24_Mo.md                                                           │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.106.190.76                                                                                                                         │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:42+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

- Date: 2023-07-25 23:01:42 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/02-Februar/27_Do.md                                                           │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.…                                                                                                                         │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:42+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

- Date: 2023-07-25 23:01:43 +0200 +0200
╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│       Key       │                                                                 Value                                                                 │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ 198930                                                                                                                                │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ Vereinigte Stadtwerke Media GmbH                                                                                                      │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ DE                                                                                                                                    │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ 91.106.128.0/18                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/apache2/cloud-access.log                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                                                                                     │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/files/chaas/SYNC/obsidian-piamedia/2020/03-M%C3%A4rz/10_Di.md                                                         │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 200                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Mozilla/5.0 (Linux) mirall/3.9.0git (Nextcloud, org.kde.Platform-5.15.0-47-generic ClientArchitecture: x86_64 OsArchitecture: x86_64) │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ GET                                                                                                                                   │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                                                                                       │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                                                                                  │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ 91.…
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2023-07-25T23:01:43+02:00                                                                                                             │
╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Signum avatar Jul 25 '23 23:07 Signum

I suspect that the whitelist does not cover response code 200 while the desktop client syncs its files.

Yeah that is the issue here is the line

- evt.Meta.http_status == '404' && evt.Meta.http_verb in ['PROPFIND', 'GET'] && evt.Meta.http_path matches '^/remote.php/(web)?dav/'

We can update it to

- evt.Meta.http_status in ['404', '200'] && evt.Meta.http_verb in ['PROPFIND', 'GET'] && evt.Meta.http_path matches '^/remote.php/(web)?dav/'

LaurenceJJones avatar Jul 26 '23 07:07 LaurenceJJones

I suspect that the whitelist does not cover response code 200 while the desktop client syncs its files.

Yeah that is the issue here is the line

- evt.Meta.http_status == '404' && evt.Meta.http_verb in ['PROPFIND', 'GET'] && evt.Meta.http_path matches '^/remote.php/(web)?dav/'

We can update it to

- evt.Meta.http_status in ['404', '200'] && evt.Meta.http_verb in ['PROPFIND', 'GET'] && evt.Meta.http_path matches '^/remote.php/(web)?dav/'

Is there a Pull Request for this yet? Seems to work fine so far. -> i didnt find one, so created one :) Another false positive: When deleting lots of files in the trashbin i get blocked too.

UnknownHiker avatar Nov 23 '23 23:11 UnknownHiker

Another false positive (LePresidente/http-generic-403-bf) I get is when synchronizing CalDAV calendars with Gnome Evolution 3.50. I also have to exclude HTTP POST requests resulting in 403 errors. Here are the alert details:

- Date: 2024-02-19 15:01:01 +0100 +0100
╭─────────────────┬────────────────────────────────────────────────────────────────────────╮
│       Key       │                                 Value                                  │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ASNNumber       │ ****                                                                   │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ASNOrg          │ ***************                                                        │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ IsInEU          │ true                                                                   │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ IsoCode         │ AT                                                                     │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ SourceRange     │ ***.***.*.*/**                                                         │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ datasource_path │ /var/log/nginx/access.log                                              │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ datasource_type │ file                                                                   │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ http_args_len   │ 0                                                                      │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ http_path       │ /remote.php/dav/calendars/************************************/outbox/ │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ http_status     │ 403                                                                    │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ http_user_agent │ Evolution/3.50.4                                                       │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ http_verb       │ POST                                                                   │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ log_type        │ http_access-log                                                        │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ service         │ http                                                                   │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ source_ip       │ ***.***.**.***                                                         │
├─────────────────┼────────────────────────────────────────────────────────────────────────┤
│ timestamp       │ 2024-02-19T15:01:01+01:00                                              │
╰─────────────────┴────────────────────────────────────────────────────────────────────────╯

flortsch avatar Feb 19 '24 17:02 flortsch