Skip to content

Commit 3b44ecf

Browse files
[DOCS] Detection engine wildcard exceptions (#2212)
* Add `matches`, revise condition steps * Various edits * Update API, other adjustments * Consolidate stacked admonitions * Revise ableist language * Revise for new grouped navigation UI * Apply suggestions from Ben's review Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> * Apply suggestions from review Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
1 parent 4ff826e commit 3b44ecf

File tree

2 files changed

+37
-29
lines changed

2 files changed

+37
-29
lines changed

docs/detections/api/exceptions/api-create-exception-item.asciidoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Creates an exception item and associates it with the specified
55
<<exceptions-api-create-container, exception container>>.
66

7-
See <<lists-api-overview>> for information about creating exception items from
7+
Refer to <<lists-api-overview>> for information about creating exception items from
88
lists, such as a list of IP addresses or host names.
99

1010
NOTE: Before creating exception items, you must create an exception container.
@@ -98,10 +98,11 @@ Can be:
9898

9999
* `match`: Must be an exact match of the defined value.
100100
* `match_any`: Matches any of the defined values.
101-
* `exists`: The `field` exists.
101+
* `exists`: The field exists.
102102
* `list`: The field matches values in a list container.
103+
* `wildcard`: Matches `value` using wildcards, such as `C:\path\*\app.exe`. Use `?` to match one character and `*` to match zero or more characters. The `field` data type must be {ref}/keyword.html#keyword-field-type[keyword], {ref}/text.html#text-field-type[text], or {ref}/keyword.html#wildcard-field-type[wildcard].
103104
* `nested`: Array of `entries` objects. Nested conditions are required for
104-
excluding some Endpoint fields (<<nested-field-ex-api, see example below>>).
105+
excluding some Endpoint fields (<<nested-field-ex-api, refer to example below>>).
105106
<<ex-nested-conditions>> lists all Endpoint fields that require the `nested`
106107
type.
107108

@@ -114,7 +115,7 @@ String[]
114115

115116
a|Field value or values:
116117

117-
* String: When the `type` is `match`.
118+
* String: When the `type` is `match` or `wildcard`.
118119
* String[]: When the `type` is `match_any`.
119120

120121
|Yes, except when `type` is `exists` or `list`.

docs/detections/detections-ui-exceptions.asciidoc

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ To view, delete, or export existing value lists:
6767
[role="screenshot"]
6868
image::images/manage-value-list.png[]
6969

70-
TIP: You can also use value lists as the indicator match index when creating an indicator match rule. See <<indicator-value-lists>> for more information.
70+
TIP: You can also use a value list as the indicator match index when creating an indicator match rule. Refer to <<indicator-value-lists>> for more information.
7171

7272
[float]
7373
[[detection-rule-exceptions]]
@@ -77,15 +77,15 @@ You can add exceptions to a rule from the rule details page or the Alerts table.
7777
When you add an exception, you can also close all alerts that meet the
7878
exception's criteria.
7979

80-
IMPORTANT: To ensure an exception is successfully applied, make sure that the fields you've defined for the exception query are correctly and consistently mapped in their respective indices. Refer to {ecs-ref}[ECS] to learn more about supported mappings.
81-
8280
[IMPORTANT]
8381
==============
84-
Be careful when adding exceptions to event correlation rules. Exceptions are evaluated against every event in the sequence, and when the exception matches _all_ event(s) in the sequence, alerts _are not_ generated. If the exception only matches _some_ of the events in the sequence, alerts _are_ generated.
82+
* To ensure an exception is successfully applied, make sure that the fields you've defined for the exception query are correctly and consistently mapped in their respective indices. Refer to {ecs-ref}[ECS] to learn more about supported mappings.
8583
84+
* Be careful when adding exceptions to <<create-eql-rule,event correlation>> rules. Exceptions are evaluated against every event in the sequence, and when the exception matches _all_ event(s) in the sequence, alerts _are not_ generated. If the exception only matches _some_ of the events in the sequence, alerts _are_ generated.
85+
+
8686
To exclude values from a
8787
specific event in the sequence, update the rule's EQL statement. For example:
88-
88+
+
8989
[source,eql]
9090
----
9191
`sequence
@@ -117,27 +117,34 @@ The *Add Rule Exception* flyout opens (the example below was opened from the Ale
117117
+
118118
[role="screenshot"]
119119
image::images/add-exception-ui.png[]
120-
. Add conditions that define when the exception prevents alerts. You can define
121-
multiple conditions with `OR` and `AND` relationships. In the example above,
122-
the exception prevents the rule from generating alerts when the
120+
. Use the following settings to add conditions that define when the exception prevents alerts. In the example above, the exception prevents the rule from generating alerts when the
123121
`svchost.exe` process runs on agent hostname `siem-kibana`.
124-
+
125-
[IMPORTANT]
126-
============
127-
* You can use nested conditions. However, this is only required for
128-
<<nested-field-list, these fields>>. For all other fields, nested conditions
129-
should not be used.
130122

131-
* Wildcards are not supported in rule exceptions or value lists. Values must be literal values.
132-
============
123+
.. *Field*: Select a field to identify the event being filtered.
124+
125+
.. *Operator*: Select an operator to define the condition:
126+
* `is` | `is not` — Must be an exact match of the defined value.
127+
* `is one of` | `is not one of` — Matches any of the defined values.
128+
* `exists` | `does not exist` — The field exists.
129+
* `is in list` | `is not in list` — Matches values in a value list.
133130
+
134-
If you have created value lists, you can use them to exclude or include all
135-
values in a list with `is in list` and `is not in list` operators:
131+
[NOTE]
132+
=======
133+
* An exception defined by a value list must use `is in list` or `is not in list` in all conditions.
134+
* Wildcards are not supported in value lists.
135+
=======
136+
* `matches` | `does not match` — Allows you to use wildcards in *Value*, such as `C:\path\*\app.exe`. Available wildcards are `?` (match one character) and `*` (match zero or more characters). The selected *Field* data type must be {ref}/keyword.html#keyword-field-type[keyword], {ref}/text.html#text-field-type[text], or {ref}/keyword.html#wildcard-field-type[wildcard].
136137
+
137-
[role="screenshot"]
138-
image::images/exceptions-ui-list.png[]
139-
NOTE: When using a list, all exception statements must use `is in list` and
140-
`is not in list` operators.
138+
IMPORTANT: Using wildcards can impact performance. To create a more efficient exception using wildcards, use multiple conditions and make them as specific as possible. For example, adding conditions using `process.name` or `file.name` can help limit the scope of wildcard matching.
139+
140+
.. *Value*: Enter the value associated with the *Field*. To enter multiple values (when using `is one of` or `is not one of`), enter each value, then press **Return**.
141+
142+
. Click *AND* or *OR* to create multiple conditions and define their relationships.
143+
144+
. Click *Add nested condition* to create conditions using nested fields. This is only required for
145+
<<nested-field-list, these nested fields>>. For all other fields, nested conditions should not be used.
146+
147+
. (Optional) Enter a comment describing the exception.
141148

142149
. Select one of the following alert actions:
143150

@@ -197,7 +204,7 @@ The *Add Endpoint Exception* flyout opens, from either the rule details page or
197204
image::images/endpoint-add-exp.png[]
198205
. If required, modify the conditions.
199206
+
200-
NOTE: See <<ex-nested-conditions>> for more information on when nested conditions are required.
207+
NOTE: Refer to <<ex-nested-conditions>> for more information on when nested conditions are required.
201208

202209
. You can select any of the following:
203210

@@ -297,8 +304,8 @@ If no attribute is selected, the app searches the list name by default.
297304
To export or delete an exception list, select the required action button on the appropriate list. Note that:
298305

299306
* Exception lists are exported to `.ndjson` files.
300-
* Exception lists are also exported as part of any exported detection rules configured with exceptions. See <<import-export-rules-ui>>.
301-
* If a list is linked to any rules, you'll see a warning appear that asks you to confirm the deletion. If no rules are linked to a list, it is deleted without confirmation.
307+
* Exception lists are also exported as part of any exported detection rules configured with exceptions. Refer to <<import-export-rules-ui>>.
308+
* If an exception list is linked to any rules, you'll get a warning asking you to confirm the deletion. If no rules are linked, the list is deleted without confirmation.
302309

303310
[role="screenshot"]
304311
image::images/actions-exception-list.png[Detail of Exception lists table with export and delete buttons highlighted,400]

0 commit comments

Comments
 (0)