sudo cscli collections install corvese/apache-guacamoleInstalls 2 parsers and 2 scenarios.
View Apache Guacamole - Bruteforce Protection →sudo cscli parsers install corvese/apache-guacamole-logsThen reload CrowdSec: sudo systemctl reload crowdsec
Sign in to see which of your engines run it →Hover a line or a note to see what each field does.
name: corvese/apache-guacamole-logsdescription: "Parses Apache Guacamole logs"filter: "evt.Parsed.program == 'apache-guacamole'"onsuccess: next_stagepattern_syntax:GUAC_CUSTOMUSER: "(%{EMAILADDRESS}|%{USERNAME})"nodes:- grok:pattern: '%{TIMESTAMP_ISO8601:timestamp}.*Authentication attempt from \[?%{IP:source_ip}.*for user "%{GUAC_CUSTOMUSER:username}" failed'apply_on: messagestatics:- meta: log_typevalue: apache-guacamole_failed_auth- meta: target_userexpression: evt.Parsed.usernamestatics:- meta: servicevalue: apache-guacamole- meta: source_ipexpression: evt.Parsed.source_ip- target: evt.StrTimeexpression: evt.Parsed.timestamp
Sign in to see the Security Engines that run this log parser, the version they run and whether it was modified locally.
A parser that will search for failed authentication attempts.
acquis.yaml configuraiton file. The type MUST be exactly as shown here or the parser will never be successful.1filenames:2 - /path/to/apache-guacamole.log3labels:4 type: apache-guacamole
❗ The type MUST be apache-guacamole ❗
The default log format used by quacamole is not supported by crowdsec as there is no date in the log line you will need to do the following to make it compatible, these are examples and should be changed to reflect your setup.
1<configuration>2 <!-- Default appender -->3 <appender name="GUAC-DEFAULT" class="ch.qos.logback.core.ConsoleAppender">4 <encoder>5 <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC} [%thread] %-5level %logger{36} - %msg%n</pattern>6 </encoder>7 </appender>89 <!-- Log at INFO level -->10 <root level="WARN">11 <appender-ref ref="GUAC-DEFAULT" />12 </root>1314</configuration>
FILE:
1<configuration>2 <!-- Default appender -->3 <appender name="GUAC-DEFAULT" class="ch.qos.logback.core.FileAppender">4 <file>/var/log/guacamole.log</file>5 <encoder>6 <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC} [%thread] %-5level %logger{36} - %msg%n</pattern>7 </encoder>8 </appender>910 <!-- Log at INFO level -->11 <root level="WARN">12 <appender-ref ref="GUAC-DEFAULT" />13 </root>1415</configuration>
If using docker you will need to mount the following volume that links to the logback.xml file and set the GUACAMOLE_HOME variable
1 volumes:2 - ./logback.xml:/home/guacamole/temp/logback.xml:ro3 environment:4 GUACAMOLE_HOME: /home/guacamole/temp/