cscli collections install crowdsecurity/laurel⚠️ This version requires crowdsec version >= 1.5 ⚠️
A collection for laurel a post-processing plugin for auditd:
detect a process calling wget/curl and executing the download script/binary very quickly after
detect invocation of obfuscated payloads (ie. base64 decode | interpreter)
detect invocation of scripts/binaries from hidden directories
detect backdoors trying to "kill competitors" :
rmkill / pkillExample acquisition for this collection :
1filenames:2 - /var/log/laurel/*.log3labels:4 type: laurel
The scenario's effectiveness relies on your auditd configuration logging EXECVE :
1auditctl -a exit,always -F arch=b64 -S execve2auditctl -a exit,always -F arch=b32 -S execve
As an example, you canrestrict it to a specific uid (ie -F euid=33) if you want to monitor only your web server.
As an example, see Florian Roth's example auditd config.
To have nice-looking notifications on auditd alerts, you can use the following format template:
1format: |2 {{ range . -}}3 {{$alert := . }}4 *{{$alert.Scenario}}*5 {{ range .Events }}6 `{{.GetMeta "exe"}}` invoked by parent process `{{.GetMeta "parent_progname"}}` (uid={{.GetMeta "uid"}})7 {{ end -}}8 {{- end }}
You shouldn't use an existing notification template, as it will not display the full information as it is tailored to IP base alerts.
Once you have setup your notification template, you MUST add a profile to either profiles.yaml or profiles.yaml.local
1name: pid_alert2filters:3 - Alert.GetScope() == "pid"4decisions: []5notifications:6 - slack_default7## Please edit the above line to match your notification name8on_success: break9---