Skip to content

Commit 6dfa1e2

Browse files
committed
Final updates
1 parent 34c7d48 commit 6dfa1e2

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

docs/cse/rules/before-writing-custom-rule.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,6 @@ In this step, we’ll create the query that will serve as the rule expression wh
8585

8686
Now that we’ve sorted out the usernames formats and values we want to exclude, we’ve removed `| count by user_username` from the query.
8787

88-
1. Let’s say there is a field of interest in our raw messages—`EventData.ProcessName`—that isn’t mapped to a Cloud SIEM schema attribute. We want to parse that field out of the message so we can use it in our logic as well. We only want our rule to fire if a user with an anomalous logon ran an .exe process after successfully logging in. You can see all of the fields in the raw message in the **Messages** tab of your search results.
89-
90-
<img src={useBaseUrl('img/cse/messages-tab.png')} alt="Messages tab" width="800"/>
91-
92-
We update the query to parse out `EventData.ProcessName`, naming it `process_name`, and filtering to only fire on `.exe` files: 
93-
94-
```sql
95-
_index=sec_record_*
96-
| where metadata_vendor = "Microsoft" and metadata_product = "Windows" and metadata_deviceEventId = "Security-4624" and !(user_username matches /^[a-zA-Z]*$/ or user_username matches "*-*$") and user_username != "anonymous logon" and fields["EventData.ProcessName"] matches "*.exe"
97-
```
98-
9988
1. Now we have a query we can use as the basis of an expression for our rule. Note that when you paste it into the rules editor, you should remove the first portion of the query (`_index=sec_record_*` and `| where`), which is only necessary when you are querying records in Sumo Logic. The expression is then as follows:
10089

10190
```sql
@@ -104,7 +93,6 @@ In this step, we’ll create the query that will serve as the rule expression wh
10493
and metadata_deviceEventId = "Security-4624"
10594
and !(user_username matches /^[a-zA-Z]*$/ or user_username matches "*-*$")
10695
and user_username != "anonymous logon"
107-
and fields["EventData.ProcessName"] matches "*.exe"
10896
```
10997

11098
Also ensure that the syntax of the expression matches what is needed by the [Cloud SIEM rules syntax](/docs/cse/rules/cse-rules-syntax/). Once you are satisfied that the expression is ready, click **Test Rule Expression** to verify that the expression returns expected results.
-19.5 KB
Loading

0 commit comments

Comments
 (0)