/
logcollector-localfile.json
199 lines (199 loc) · 5.89 KB
/
logcollector-localfile.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{
"data": {
"localfile": [
{
"logformat": "journald",
"ignore_binaries": "no",
"only-future-events": "no",
"target": ["agent1"],
"filters": [
[
{
"field": "_KERNEL_DEVICE",
"expression": ".kernel1",
"ignore_if_missing": false
}
],
[
{
"field": "_SYSTEMD_UNIT",
"expression": "^cron.service$",
"ignore_if_missing": false
},
{
"field": "CUSTOM",
"expression": "0|1|2",
"ignore_if_missing": true
}
]
],
"filters_disabled": false
},
{
"logformat": "journald",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent2"]
},
{
"logformat": "journald",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent3"],
"filters": [
{
"field": "_KERNEL_DEVICE",
"expression": ".",
"ignore_if_missing": false
}
],
"filters_disabled": false
},
{
"logformat": "macos",
"query": {
"value": "(process == \"sudo\") or (process == \"sessionlogoutd\" and message contains \"logout is complete.\") or (process == \"sshd\") or (process == \"tccd\" and message contains \"Update Access Record\") or (message contains \"SessionAgentNotificationCenter\") or (process == \"screensharingd\" and message contains \"Authentication\") or (process == \"securityd\" and eventMessage contains \"Session\" and subsystem == \"com.apple.securityd\")",
"level": "info",
"type": ["log", "activity", "trace"]
},
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"logformat": "command",
"command": "df -P",
"alias": "df -P",
"ignore_binaries": "no",
"target": ["agent"],
"frequency": 360
},
{
"logformat": "full_command",
"command": "netstat -tulpn | sed 's/\\([[:alnum:]]\\+\\)\\ \\+[[:digit:]]\\+\\ \\+[[:digit:]]\\+\\ \\+\\(.*\\):\\([[:digit:]]*\\)\\ \\+\\([0-9\\.\\:\\*]\\+\\).\\+\\ \\([[:digit:]]*\\/[[:alnum:]\\-]*\\).*/\\1 \\2 == \\3 == \\4 \\5/' | sort -k 4 -g | sed 's/ == \\(.*\\) ==/:\\1/' | sed 1,2d",
"alias": "netstat listening ports",
"ignore_binaries": "no",
"target": ["agent"],
"frequency": 360
},
{
"logformat": "full_command",
"command": "last -n 20",
"alias": "last -n 20",
"ignore_binaries": "no",
"target": ["agent"],
"frequency": 360
},
{
"file": "/var/log/test.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/nginx/access.log",
"logformat": "apache",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/nginx/error.log",
"logformat": "apache",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/ossec/logs/active-responses.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/auth.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/syslog",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/dpkg.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"file": "/var/log/kern.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"channel": "Application",
"logformat": "eventlog",
"ignore_binaries": "no",
"target": ["agent"]
},
{
"channel": "Security",
"logformat": "eventchannel",
"query": {
"value": "Event/System[EventID != 5145 and EventID != 5156 and EventID != 5447 and EventID != 4656 and EventID != 4658 and EventID != 4663 and EventID != 4660 and EventID != 4670 and EventID != 4690 and EventID != 4703 and EventID != 4907]"
},
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"],
"reconnect_time": 5
},
{
"channel": "System",
"logformat": "eventlog",
"ignore_binaries": "no",
"target": ["agent"]
},
{
"file": "active-response\\active-responses.log",
"logformat": "syslog",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
},
{
"channel": "Microsoft-Windows-Sysmon/Operational",
"logformat": "eventchannel",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"],
"reconnect_time": 5
},
{
"channel": "Microsoft-Windows-Windows Defender/Operational",
"logformat": "eventchannel",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"],
"reconnect_time": 5
},
{
"file": "C:\\inetpub\\logs\\LogFiles\\W3SVC1\\u_ex240321.log",
"logformat": "iis",
"ignore_binaries": "no",
"only-future-events": "yes",
"target": ["agent"]
}
]
},
"error": 0
}