-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathsigma-correlation-rules-schema.json
274 lines (274 loc) · 8.64 KB
/
sigma-correlation-rules-schema.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Sigma Meta rule specification V2.0.1 (2024-09-03)",
"type": "object",
"required": [
"title",
"correlation"
],
"properties": {
"title": {
"type": "string",
"maxLength": 256,
"description": "A brief title for the rule that should contain what the rule is supposed to detect"
},
"id": {
"type": "string",
"description": "A globally unique identifier for the Sigma rule. This is recommended to be a UUID v4, but not mandatory.",
"format": "uuid"
},
"status": {
"type": "string",
"oneOf": [
{
"const": "stable",
"description": "The rule didn't produce any obvious false positives in multiple environments over a long period of time"
},
{
"const": "test",
"description": "The rule doesn't show any obvious false positives on a limited set of test systems"
},
{
"const": "experimental",
"description": "A new rule that hasn't been tested outside of lab environments and could lead to many false positives"
},
{
"const": "deprecated",
"description": "The rule was replaced or is now covered by another one. The link between both rules is made via the `related` field"
},
{
"const": "unsupported",
"description": "The rule can not be used in its current state (special correlation log, home-made fields, etc.)"
}
]
},
"description": {
"type": "string",
"description": "A short description of the rule and the malicious activity that can be detected",
"maxLength": 65535
},
"author": {
"type": "string",
"description": "Creator of the rule. (can be a name, nickname, twitter handle, etc.)"
},
"references": {
"type": "array",
"description": "References to the source that the rule was derived from. These could be blog articles, technical papers, presentations or even tweets",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"date": {
"type": "string",
"description": "Creation date of the meta rule. Use the ISO 8601 format YYYY-MM-DD",
"pattern": "^\\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"
},
"modified": {
"type": "string",
"description": "Last modification date of the meta rule. Use the ISO 8601 format YYYY-MM-DD",
"pattern": "^\\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"
},
"correlation": {
"type": "object",
"required": [
"type",
"rules",
"timespan",
"condition"
],
"description": "Represents the correlation searched for on the log data",
"properties": {
"type": {
"type": "string",
"maxLength": 16,
"description": "Defines the correlation type",
"oneOf": [
{
"const": "event_count"
},
{
"const": "temporal"
},
{
"const": "temporal_ordered"
},
{
"const": "value_count"
}
]
},
"rules": {
"description": "Refers to one or multiple Sigma or Correlations rules",
"uniqueItems": true,
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"minLength": 2
},
{
"type": "string",
"format": "uuid"
}
]
}
}
]
},
"aliases": {
"type": "object",
"description": "Defines field name aliases that are applied to correlated Sigma rules",
"additionalProperties": {
"anyOf": [
{
"type": "object",
"items": {
"type": "string"
}
}
]
}
},
"group-by": {
"type": "array",
"description": "Defines one or multiple fields which should be treated as separate event occurrence scope",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"timespan": {
"type": "string",
"maxLength": 10,
"description": "Defines a time period in which the correlation should be applied. Used: `number + letter (in lowercase)`"
},
"condition": {
"type": "object",
"description": "The condition defines when a correlation matches",
"uniqueItems": true,
"minItems": 1,
"maxItems": 3,
"anyOf": [
{
"gt": {
"description": "The count must be greater than the given value",
"type": "integer"
}
},
{
"gte": {
"description": "The count must be greater than or equal to the given value",
"type": "integer"
}
},
{
"lt": {
"description": "The count must be lesser than the given value",
"type": "integer"
}
},
{
"lte": {
"description": "The count must be lesser than or equal to the given value",
"type": "integer"
}
},
{
"eq": {
"description": "The count must be equal to the given value",
"type": "integer"
}
},
{
"field": {
"description": "Name of the field(s) to count values",
"anyOf": [
{
"type": "string",
"maxLength": 256
},
{
"type": "array",
"items": {
"type": "string",
"maxLength": 256
}
}
]
}
}
]
}
},
"allOf": [
{
"if": { "properties": {"type": {"const": "event_count"}}},
"then": {"required": ["condition", "group-by", "timespan"]}
},
{
"if": { "properties": {"type": {"const": "temporal"}}},
"then": {"required": ["group-by", "timespan"]}
},
{
"if": { "properties": {"type": {"const": "temporal_ordered"}}},
"then": {"required": ["group-by", "timespan"]}
},
{
"if": { "properties": {"type": {"const": "value_count"}}},
"then": {"required": ["condition", "field", "group-by", "timespan"]}
}
]
},
"falsepositives": {
"description": "A list of known false positives that may occur",
"uniqueItems": true,
"anyOf": [
{
"type": "string",
"minLength": 2
},
{
"type": "array",
"items": {
"type": "string",
"minLength": 2
}
}
]
},
"level": {
"type": "string",
"description": "The criticality of a triggered rule",
"oneOf": [
{
"const": "informational",
"description": "Rule is intended for enrichment of events, e.g. by tagging them. No case or alerting should be triggered by such rules because it is expected that a huge amount of events will match these rules"
},
{
"const": "low",
"description": "Notable event but rarely an incident. Low-rated events can be relevant in high numbers or in combination with others. Immediate reaction shouldn't be necessary, but a regular review is recommended"
},
{
"const": "medium",
"description": "Relevant event that should be reviewed manually on a more frequent basis"
},
{
"const": "high",
"description": "Relevant event that should trigger an internal alert and requires a prompt review"
},
{
"const": "critical",
"description": "Highly relevant event that indicates an incident. Critical events should be reviewed immediately. It is used only for cases in which probability borders certainty"
}
]
},
"generate": {
"type": "boolean",
"description": "Defines if the rules referred to by the correlation rule should be converted into stand-alone rules"
}
}
}