-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnxlog.conf
More file actions
94 lines (77 loc) · 2.38 KB
/
nxlog.conf
File metadata and controls
94 lines (77 loc) · 2.38 KB
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
# This configuration file for NXLog will forward AppLocker events from Windows Event Log to a Graylog server
# be sure to change the IP address ('Host' field in the <Output> tag) to the IP of the server that Graylog is running on
# note that this is using a GELF TCP Input configuration running on 12201 in Graylog
Panic Soft
#NoFreeOnExit TRUE
define ROOT C:\Program Files\nxlog
define CERTDIR %ROOT%\cert
define CONFDIR %ROOT%\conf\nxlog.d
define LOGDIR %ROOT%\data
include %CONFDIR%\\*.conf
define LOGFILE %LOGDIR%\nxlog.log
LogFile %LOGFILE%
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension _charconv>
Module xm_charconv
AutodetectCharsets iso8859-2, utf-8, utf-16, utf-32
</Extension>
<Extension _exec>
Module xm_exec
</Extension>
<Extension _fileop>
Module xm_fileop
# Check the size of our log file hourly, rotate if larger than 5MB
<Schedule>
Every 1 hour
Exec if (file_exists('%LOGFILE%') and \
(file_size('%LOGFILE%') >= 5M)) \
file_cycle('%LOGFILE%', 8);
</Schedule>
# Rotate our log file every week on Sunday at midnight
<Schedule>
When @weekly
Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
</Schedule>
</Extension>
# Snare compatible example configuration
# Collecting event log
<Extension _xml>
Module xm_xml
</Extension>
<Extension gelf>
Module xm_gelf
ShortMessageLength 65536
</Extension>
<Input in>
Module im_msvistalog
<QueryXML>
<QueryList>
<Query Id="0">
<Select Path="Microsoft-Windows-AppLocker/MSI and Script">
*</Select>
<Select Path="Microsoft-Windows-AppLocker/EXE and DLL">
*</Select>
<Select Path="Microsoft-Windows-AppLocker/Packaged app-Deployment">
*</Select>
<Select Path="Microsoft-Windows-AppLocker/Packaged app-Execution">
*</Select>
</Query>
</QueryList>
</QueryXML>
Exec if $UserData parse_xml($UserData);
</Input>
<Output out>
Module om_tcp
Host localhost
Port 12201
OutputType GELF_TCP
</Output>
<Route 1>
Path in => out
</Route>