Skip to content

Commit 9bc5869

Browse files
Add event type
1 parent b3b34d7 commit 9bc5869

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

filter-ssh.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,36 @@ filter {
44
match => ["message", "%{WORD:[ssh][auth][result]} %{WORD:[ssh][auth][method]} for (invalid user )?%{USERNAME:[user][name]} from %{IPORHOST:[client][address]} port %{NUMBER:[client][port]} %{WORD:[ssh][protocol]}(: %{GREEDYDATA:[ssh][signature]})?"]
55
id => "ssh_login"
66
tag_on_failure => ["_grokparsefaillure","ssh_login_grok_failed"]
7+
add_field => {
8+
"[ssh][eventtype]" => "ssh_authentication"
9+
}
710
}
811
} else if [message] =~ /^Invalid/ {
912
grok {
1013
match => ["message","%{DATA:[ssh][auth][event]} user %{USERNAME:[user][name]} from %{IPORHOST:[client][address]}"]
1114
id => "ssh_login_suspection"
1215
tag_on_failure => ["_grokparsefaillure","ssh_login_suspection_grok_failed"]
16+
add_field => {
17+
"[ssh][eventtype]" => "ssh_invalid_login"
18+
}
1319
}
1420
} else if [message] =~ /pam_unix/ {
1521
grok {
1622
match => ["message","pam_unix\(%{DATA:[session][type]}\:session\)\: session %{DATA:[ssh][session][status]} for user %{USERNAME:[user][name]}( by (.*)?\(uid\=%{NUMBER:[uid]}\))?"]
1723
id => "pam_unix_session"
1824
tag_on_failure => ["_grokparsefaillure","pam_unix_session_grok_failed"]
25+
add_field => {
26+
"[ssh][eventtype]" => "ssh_session_status"
27+
}
1928
}
2029
} else if [message] =~ /^Did not receive identification string/ {
2130
grok {
2231
match => ["message","Did not receive identification string from %{IPORHOST:[client][ip]} port %{NUMBER:[client][port]}"]
2332
id => "ssh_monitoring_noidentstring"
2433
tag_on_failure => ["_grokparsefaillure","ssh_monitoring_noidentstring_grok_failed"]
34+
add_field => {
35+
"[ssh][eventtype]" => "ssh_noidentstring"
36+
}
2537
}
2638
}
2739

0 commit comments

Comments
 (0)