forked from NextronSystems/sysmon-config
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsysmonconfig-Linux.xml
More file actions
174 lines (165 loc) · 9.55 KB
/
sysmonconfig-Linux.xml
File metadata and controls
174 lines (165 loc) · 9.55 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
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
<!--
SysmonForLinux
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom th
e Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISI
NG FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
LAST CHANGE: 04.02.2025
MAINTAINED BY: @THE_VER1TAS
-->
<Sysmon schemaversion="4.81">
<EventFiltering>
<!-- Event ID 1 == ProcessCreate -->
<RuleGroup name="" groupRelation="or">
<ProcessCreate onmatch="include">
<Rule name="TechniqueID=T1021.004,TechniqueName=Remote Services: SSH" groupRelation="and">
<Image condition="end with">ssh</Image>
<CommandLine condition="contains">ConnectTimeout=</CommandLine>
<CommandLine condition="contains">BatchMode=yes</CommandLine>
<CommandLine condition="contains">StrictHostKeyChecking=no</CommandLine>
<CommandLine condition="contains any">wget;curl</CommandLine>
</Rule>
<Rule name="TechniqueID=T1027.001,TechniqueName=Obfuscated Files or Information: Binary Padding" groupRelation="and">
<Image condition="is">/bin/dd</Image>
<CommandLine condition="contains all">dd;if=</CommandLine>
</Rule>
<Rule name="TechniqueID=T1033,TechniqueName=System Owner/User Discovery" groupRelation="or">
<CommandLine condition="contains">/var/run/utmp</CommandLine>
<CommandLine condition="contains">/var/log/btmp</CommandLine>
<CommandLine condition="contains">/var/log/wtmp</CommandLine>
</Rule>
<Rule name="TechniqueID=T1053.003,TechniqueName=Scheduled Task/Job: Cron" groupRelation="or">
<Image condition="end with">crontab</Image>
</Rule>
<Rule name="TechniqueID=T1059.004,TechniqueName=Command and Scripting Interpreter: Unix Shell" groupRelation="or">
<Image condition="end with">/bin/bash</Image>
<Image condition="end with">/bin/dash</Image>
<Image condition="end with">/bin/sh</Image>
</Rule>
<Rule name="TechniqueID=T1070.006,TechniqueName=Indicator Removal on Host: Timestomp" groupRelation="and">
<Image condition="is">/bin/touch</Image>
<CommandLine condition="contains any">-r;--reference;-t;--time</CommandLine>
</Rule>
<Rule name="TechniqueID=T1087.001,TechniqueName=Account Discovery: Local Account" groupRelation="or">
<CommandLine condition="contains">/etc/passwd</CommandLine>
<CommandLine condition="contains">/etc/sudoers</CommandLine>
</Rule>
<Rule name="TechniqueID=T1105,TechniqueName=Ingress Tool Transfer" groupRelation="or">
<Image condition="end with">wget</Image>
<Image condition="end with">curl</Image>
<Image condition="end with">ftpget</Image>
<Image condition="end with">tftp</Image>
<Image condition="end with">lwp-download</Image>
</Rule>
<Rule name="TechniqueID=T1123,TechniqueName=Audio Capture" groupRelation="and">
<Image condition="contains">/bin/aplay</Image>
<CommandLine condition="contains">arecord</CommandLine>
</Rule>
<Rule name="TechniqueID=T1136.001,TechniqueName=Create Account: Local Account" groupRelation="or">
<Image condition="end with">useradd</Image>
<Image condition="end with">adduser</Image>
</Rule>
<Rule name="TechniqueID=T1203,TechniqueName=Exploitation for Client Execution" groupRelation="and">
<User condition="is">root</User>
<LogonId condition="is">0</LogonId>
<CurrentDirectory condition="is">/var/opt/microsoft/scx/tmp</CurrentDirectory>
<CommandLine condition="contains">/bin/sh</CommandLine>
</Rule>
<Rule name="TechniqueID=T1485,TechniqueName=Data Destruction" groupRelation="and">
<Image condition="is">/bin/dd</Image>
<CommandLine condition="contains all">dd;of=;if=</CommandLine>
<CommandLine condition="contains any">if=/dev/zero;if=/dev/null</CommandLine>
</Rule>
<Rule name="TechniqueID=T1505.003,TechniqueName=Server Software Component: Web Shell" groupRelation="and">
<Image condition="contains any">whoami;ifconfig;/usr/bin/ip;/bin/uname</Image>
<ParentImage condition="contains any">httpd;lighttpd;nginx;apache2;node;dash</ParentImage>
</Rule>
<Rule name="TechniqueID=T1543.002,TechniqueName=Create or Modify System Process: Systemd Service" groupRelation="or">
<Image condition="end with">systemd</Image>
</Rule>
<Rule name="TechniqueID=T1548.001,TechniqueName=Abuse Elevation Control Mechanism: Setuid and Setgid" groupRelation="or">
<Image condition="end with">chmod</Image>
<Image condition="end with">chown</Image>
<Image condition="end with">fchmod</Image>
<Image condition="end with">fchmodat</Image>
<Image condition="end with">fchown</Image>
<Image condition="end with">fchownat</Image>
<Image condition="end with">fremovexattr</Image>
<Image condition="end with">fsetxattr</Image>
<Image condition="end with">lchown</Image>
<Image condition="end with">lremovexattr</Image>
<Image condition="end with">lsetxattr</Image>
<Image condition="end with">removexattr</Image>
<Image condition="end with">setuid</Image>
<Image condition="end with">setgid</Image>
<Image condition="end with">setreuid</Image>
<Image condition="end with">setregid</Image>
</Rule>
</ProcessCreate>
</RuleGroup>
<!-- Event ID 3 == NetworkConnect Detected -->
<RuleGroup name="" groupRelation="or">
<NetworkConnect onmatch="include">
<Rule name="TechniqueID=T1105,TechniqueName=Ingress Tool Transfer" groupRelation="or">
<Image condition="end with">wget</Image>
<Image condition="end with">curl</Image>
<Image condition="end with">ftpget</Image>
<Image condition="end with">tftp</Image>
<Image condition="end with">lwp-download</Image>
</Rule>
</NetworkConnect>
</RuleGroup>
<!-- Event ID 5 == ProcessTerminate -->
<RuleGroup name="" groupRelation="or">
<ProcessTerminate onmatch="include" />
</RuleGroup>
<!-- Event ID 9 == RawAccessRead -->
<RuleGroup name="" groupRelation="or">
<RawAccessRead onmatch="include" />
</RuleGroup>
<!-- Event ID 11 == FileCreate -->
<RuleGroup name="" groupRelation="or">
<FileCreate onmatch="include">
<Rule name="TechniqueID=T1037,TechniqueName=Boot or Logon Initialization Scripts" groupRelation="or">
<TargetFilename condition="begin with">/etc/init/</TargetFilename>
<TargetFilename condition="begin with">/etc/init.d/</TargetFilename>
<TargetFilename condition="begin with">/etc/rc.d/</TargetFilename>
</Rule>
<Rule name="TechniqueID=T1053.003,TechniqueName=Scheduled Task/Job: Cron" groupRelation="or">
<TargetFilename condition="is">/etc/cron.allow</TargetFilename>
<TargetFilename condition="is">/etc/cron.deny</TargetFilename>
<TargetFilename condition="is">/etc/crontab</TargetFilename>
<TargetFilename condition="begin with">/etc/cron.d/</TargetFilename>
<TargetFilename condition="begin with">/etc/cron.daily/</TargetFilename>
<TargetFilename condition="begin with">/etc/cron.hourly/</TargetFilename>
<TargetFilename condition="begin with">/etc/cron.monthly/</TargetFilename>
<TargetFilename condition="begin with">/etc/cron.weekly/</TargetFilename>
<TargetFilename condition="begin with">/var/spool/cron/crontabs/</TargetFilename>
</Rule>
<Rule name="TechniqueID=T1105,TechniqueName=Ingress Tool Transfer" groupRelation="or">
<Image condition="end with">wget</Image>
<Image condition="end with">curl</Image>
<Image condition="end with">ftpget</Image>
<Image condition="end with">tftp</Image>
<Image condition="end with">lwp-download</Image>
</Rule>
<Rule name="TechniqueID=T1543.002,TechniqueName=Create or Modify System Process: Systemd Service" groupRelation="or">
<TargetFilename condition="begin with">/etc/systemd/system</TargetFilename>
<TargetFilename condition="begin with">/usr/lib/systemd/system</TargetFilename>
<TargetFilename condition="begin with">/run/systemd/system/</TargetFilename>
<TargetFilename condition="contains">/systemd/user/</TargetFilename>
</Rule>
</FileCreate>
</RuleGroup>
<!--Event ID 23 == FileDelete -->
<RuleGroup name="" groupRelation="or">
<FileDelete onmatch="include" />
</RuleGroup>
</EventFiltering>
</Sysmon>