-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect SSH authentication timeouts (CVE-2024-6387) (#1067)
- Loading branch information
Showing
13 changed files
with
174 additions
and
9 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
parsers: | ||
- ./parsers/s01-parse/crowdsecurity/sshd-logs.yaml | ||
- crowdsecurity/syslog-logs | ||
- crowdsecurity/dateparse-enrich | ||
scenarios: | ||
- ./scenarios/crowdsecurity/ssh-cve-2024-6387.yaml | ||
log_file: ssh-timeout.log | ||
log_type: syslog | ||
ignore_parsers: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
len(results) == 1 | ||
"192.168.9.212" in results[0].Overflow.GetSources() | ||
results[0].Overflow.Sources["192.168.9.212"].IP == "192.168.9.212" | ||
results[0].Overflow.Sources["192.168.9.212"].Range == "" | ||
results[0].Overflow.Sources["192.168.9.212"].GetScope() == "Ip" | ||
results[0].Overflow.Sources["192.168.9.212"].GetValue() == "192.168.9.212" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "ssh-timeout.log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "ssh_auth_timeout" | ||
results[0].Overflow.Alert.Events[0].GetMeta("machine") == "usbkey" | ||
results[0].Overflow.Alert.Events[0].GetMeta("service") == "ssh" | ||
results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "192.168.9.212" | ||
results[0].Overflow.Alert.Events[0].GetMeta("timestamp") == "2024-07-01T09:30:56Z" | ||
results[0].Overflow.Alert.Events[1].GetMeta("datasource_path") == "ssh-timeout.log" | ||
results[0].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[1].GetMeta("log_type") == "ssh_auth_timeout" | ||
results[0].Overflow.Alert.Events[1].GetMeta("machine") == "usbkey" | ||
results[0].Overflow.Alert.Events[1].GetMeta("service") == "ssh" | ||
results[0].Overflow.Alert.Events[1].GetMeta("source_ip") == "192.168.9.212" | ||
results[0].Overflow.Alert.Events[1].GetMeta("timestamp") == "2024-07-01T09:31:26Z" | ||
results[0].Overflow.Alert.Events[2].GetMeta("datasource_path") == "ssh-timeout.log" | ||
results[0].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[2].GetMeta("log_type") == "ssh_auth_timeout" | ||
results[0].Overflow.Alert.Events[2].GetMeta("machine") == "usbkey" | ||
results[0].Overflow.Alert.Events[2].GetMeta("service") == "ssh" | ||
results[0].Overflow.Alert.Events[2].GetMeta("source_ip") == "192.168.9.212" | ||
results[0].Overflow.Alert.Events[2].GetMeta("timestamp") == "2024-07-01T09:31:56Z" | ||
results[0].Overflow.Alert.Events[3].GetMeta("datasource_path") == "ssh-timeout.log" | ||
results[0].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[3].GetMeta("log_type") == "ssh_auth_timeout" | ||
results[0].Overflow.Alert.Events[3].GetMeta("machine") == "usbkey" | ||
results[0].Overflow.Alert.Events[3].GetMeta("service") == "ssh" | ||
results[0].Overflow.Alert.Events[3].GetMeta("source_ip") == "192.168.9.212" | ||
results[0].Overflow.Alert.Events[3].GetMeta("timestamp") == "2024-07-01T09:32:26Z" | ||
results[0].Overflow.Alert.GetScenario() == "crowdsecurity/ssh-cve-2024-6387" | ||
results[0].Overflow.Alert.Remediation == true | ||
results[0].Overflow.Alert.GetEventsCount() == 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Jul 1 09:30:56 usbkey sshd[8807]: fatal: Timeout before authentication for 192.168.9.212 port 47056 | ||
Jul 1 09:31:26 usbkey sshd[8807]: fatal: Timeout before authentication for 192.168.9.212 port 47056 | ||
Jul 1 09:31:56 usbkey sshd[8807]: fatal: Timeout before authentication for 192.168.9.212 port 47056 | ||
Jul 1 09:32:26 usbkey sshd[8807]: fatal: Timeout before authentication for 192.168.9.212 port 47056 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Detect exploitation attempts of CVE-2024-6387 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ssh bruteforce | ||
type: leaky | ||
name: crowdsecurity/ssh-cve-2024-6387 | ||
description: "Detect exploitation attempt of CVE-2024-6387" | ||
filter: "evt.Meta.log_type == 'ssh_auth_timeout'" | ||
leakspeed: "180s" | ||
capacity: 3 | ||
groupby: evt.Meta.source_ip | ||
blackhole: 1m | ||
reprocess: true | ||
labels: | ||
service: ssh | ||
confidence: 3 | ||
spoofable: 0 | ||
classification: | ||
- attack.T1190 | ||
- cve.CVE-2024-6387 | ||
label: "SSH CVE-2024-6387" | ||
behavior: "ssh:exploit" | ||
remediation: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters