File tree 7 files changed +50
-11
lines changed
7 files changed +50
-11
lines changed Original file line number Diff line number Diff line change 1
- SHOREWALL_TCP .*?%{WORD:fwrule}\:%{WORD:fwtarget}\:IN\=%{WORD:fwin} OUT\=\s*MAC\=%{DATA:fwmac} SRC\=%{IPORHOST:fwsrc} DST\=%{IPORHOST:fwdst} .*? PROTO\=%{WORD:fwproto} SPT\=%{INT:fwspt:int} DPT\=%{INT:fwdpt:int} .*?
2
- SHOREWALL_UDP .*?%{WORD:fwrule}\:%{WORD:fwtarget}\:IN\=%{WORD:fwin} OUT\=%{WORD:fwout}.*?SRC\=%{IPORHOST:fwsrc} DST\=%{IPORHOST:fwdst} .*? PROTO\=%{WORD:fwproto} SPT\=%{INT:fwspt:int} DPT\=%{INT:fwdpt:int} .*?
3
- SHOREWALL_ICMP .*?%{WORD:fwrule}\:%{WORD:fwtarget}\:IN\=%{WORD:fwin} OUT\=%{WORD:fwout} SRC\=%{IPORHOST:fwsrc} DST\=%{IPORHOST:fwdst} .*? PROTO\=%{WORD:fwproto} .*?
1
+ SHOREWALL_COMMON %{DATA:fwrule}\:%{DATA:fwtarget}\:IN\=%{DATA:fwin} OUT\=%{DATA:fwout} (?:MAC\=%{DATA:fwmac} )?SRC\=%{IPORHOST:fwsrc} DST\=%{IPORHOST:fwdst}
4
2
5
- SHOREWALL_MSG (?:%{SHOREWALL_TCP}|%{SHOREWALL_UDP}|%{SHOREWALL_ICMP})
3
+ SHOREWALL_TCP_UDP .*?PROTO\=%{DATA:fwproto} SPT\=%{INT:fwspt:int} DPT\=%{INT:fwdpt:int} .*?
4
+ SHOREWALL_ICMP .*?PROTO\=%{DATA:fwproto} TYPE=%{INT:icmp_type:int} CODE=%{INT:icmp_code:int} .*?
5
+
6
+ SHOREWALL_MSG Shorewall:%{SHOREWALL_COMMON} (?:%{SHOREWALL_TCP_UDP}|%{SHOREWALL_ICMP})
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ SSH_SUBSYSTEM .*?subsystem request for (?<subsystem>.*)
10
10
SSH_DISCONNECT_USER .*?Received disconnect from %{IPORHOST:ip}: %{NONNEGINT}: (?<reason>disconnected by user)$
11
11
SSH_DISCONNECT_OTHER Disconnected from %{IPORHOST:ip} port %{NONNEGINT}
12
12
SSH_DISCONNECT %{SSH_DISCONNECT_USER}|%{SSH_DISCONNECT_OTHER}
13
- SSH_VALID_INVALID .*?(?<status>Accepted|Failed|Invalid user)(?: %{WORD:method} for)? %{USERNAME_PAT} from %{IPORHOST:ip}(?: port %{NONNEGINT:port})?
13
+ SSH_VALID_INVALID .*?(?<status>Accepted|Failed|Invalid user)(?: %{WORD:method} for)? %{USERNAME_PAT} from %{IPORHOST:ip}(?: port %{NONNEGINT:port:int})?(?: ssh2: %{NOTSPACE:ssh_key_type} %{GREEDYDATA:ssh_key_fingerprint })?
14
14
SSH_INPUT_USERAUTH .*?input_userauth_request: (?<inputuserauth>invalid user %{USERNAME_PAT})
15
15
SSH_AUTH_REFUSED .*?Authentication refused: bad ownership or modes for file %{PATH:ownerpath}
16
16
Original file line number Diff line number Diff line change 1
1
SU_FAIL (?:(?<su_message>FAILED) SU )?\(to %{NOTSPACE:su_to}\) %{NOTSPACE:su_user} on %{NOTSPACE:su_tty}
2
2
3
- SU_SESSIONS pam_unix\(su(?:-l)?:session\): (?<su_message>session (?:opened|closed)) for user %{NOTSPACE:su_user}(?: by %{USERNAME_PAT}\(uid=%{NUMBER}\))?
3
+ SU_SESSIONS pam_unix\(su(?:-l)?:session\): (?<su_message>session (?:opened|closed)) for user %{NOTSPACE:su_user}(?: by (?: %{USERNAME_PAT})? \(uid=%{NUMBER}\))?
4
4
5
5
SU_MSG %{SU_FAIL}|%{SU_SESSIONS}
Original file line number Diff line number Diff line change 32
32
import glob
33
33
34
34
setup (name = "logstash-patterns" ,
35
- version = "1.2.6 " ,
35
+ version = "1.2.8 " ,
36
36
description = "Grok patterns for logstash" ,
37
37
long_description = """Grok patterns for parsing log messages with logstash.
38
38
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ data = [
21
21
"fwsrc" : "10.0.0.2",
22
22
"fwdst" : "10.0.0.1",
23
23
"fwproto" : "UDP",
24
- u"fwspt" : u" 57002" ,
25
- u"fwdpt" : u"53" ,
24
+ u"fwspt" : 57002,
25
+ u"fwdpt" : 53 ,
26
26
}
27
27
},
28
28
{
@@ -39,4 +39,18 @@ data = [
39
39
"fwdpt" : 22,
40
40
}
41
41
},
42
+ {
43
+ "raw" : "<6>1 2021-02-11T10:06:22.340438+01:00 cerberus kernel: Shorewall:all-all:REJECT:IN=em3 OUT=p2p1 MAC=24:6e:96:78:50:02:94:57:a5:60:53:fb:08:00 SRC=10.148.12.200 DST=134.184.15.95 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=27802 SEQ=0",
44
+ "expected" : {
45
+ "fwrule" : "all-all",
46
+ "fwtarget" : "REJECT",
47
+ "fwin" : "em3",
48
+ "fwproto" : "ICMP",
49
+ "icmp_code": 0,
50
+ "icmp_type": 8,
51
+ "fwsrc": "10.148.12.200",
52
+ "fwdst": "134.184.15.95",
53
+ "fwmac": "24:6e:96:78:50:02:94:57:a5:60:53:fb:08:00",
54
+ }
55
+ },
42
56
]
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ data = [
25
25
"expected" : {
26
26
'method': 'publickey',
27
27
'pid': '44668',
28
- 'port': ' 43493' ,
28
+ 'port': 43493,
29
29
'program': 'sshd',
30
30
'status': 'Accepted',
31
31
'syslog_abspri': '86',
@@ -107,7 +107,7 @@ data = [
107
107
"expected" : {
108
108
'method': 'publickey',
109
109
'pid': '8245',
110
- 'port': ' 55141' ,
110
+ 'port': 55141,
111
111
'program': 'sshd',
112
112
'status': 'Accepted',
113
113
'syslog_abspri': '86',
@@ -132,4 +132,19 @@ data = [
132
132
'username': 'oneadmin',
133
133
}
134
134
},
135
+ {
136
+ "raw": "<86>1 2021-02-08T21:04:11.450531+01:00 login2 sshd[35227]: Accepted publickey for vsc10001 from 109.136.238.10 port 57465 ssh2: RSA SHA256:cz3lwY9mjGfznACfU23BOSY0iYjFFgnp1exj1ijBfQA",
137
+ "expected": {
138
+ 'program': 'sshd',
139
+ 'syslog_abspri': '86',
140
+ 'username': 'vsc10001',
141
+ '@source_host': 'login2',
142
+ 'method': 'publickey',
143
+ 'port': 57465,
144
+ 'status': 'Accepted',
145
+ 'ssh_key_type': 'RSA',
146
+ 'ssh_key_fingerprint': 'SHA256:cz3lwY9mjGfznACfU23BOSY0iYjFFgnp1exj1ijBfQA',
147
+ 'ip': '109.136.238.10',
148
+ }
149
+ },
135
150
]
Original file line number Diff line number Diff line change @@ -59,4 +59,13 @@ data = [
59
59
'su_user': 'vsc43020',
60
60
}
61
61
},
62
+ {
63
+ "raw": "<86>1 2021-02-11T09:58:36.638152+01:00 node056 su: pam_unix(su:session): session opened for user vsc43020 by (uid=0)",
64
+ "expected": {
65
+ 'program': 'su',
66
+ '@source_host': 'node056',
67
+ 'su_message': 'session opened',
68
+ 'su_user': 'vsc43020',
69
+ }
70
+ },
62
71
]
You can’t perform that action at this time.
0 commit comments