You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sentinel/hunts-custom-queries.md
+25-26Lines changed: 25 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to create a custom query to hunt for threats.
5
5
author: austinmccollum
6
6
ms.author: austinmc
7
7
ms.topic: how-to
8
-
ms.date: 04/23/2024
8
+
ms.date: 04/24/2024
9
9
appliesto:
10
10
- Microsoft Sentinel in the Azure portal
11
11
- Microsoft Sentinel in the Microsoft Defender portal
@@ -14,7 +14,7 @@ ms.collection: usx-security
14
14
15
15
# Create custom hunting queries in Microsoft Sentinel
16
16
17
-
Create or modify a query and save it as your own query or share it with users who are in the same tenant.
17
+
Hunt for security threats across your organization's data sources with custom hunting queries. Microsoft Sentinel provides built-in hunting queries to help you find issues in the data you have on your network. But you can create your own custom queries. For more information about hunting queries, see [Threat hunting in Microsoft Sentinel](hunting.md).
18
18
19
19
## Create a new query
20
20
@@ -36,37 +36,36 @@ In Microsoft Sentinel, create a custom hunting query from the **Hunting** > **Qu
36
36
37
37
1. When your finished defining your query, select **Create**.
38
38
39
-
**To clone and modify an existing query**:
39
+
## Clone an existing query
40
40
41
-
1. From the table, select the hunting query you want to modify.
42
-
1. Select the ellipsis (...) in the line of the query you want to modify, and select **Clone query**.
41
+
Clone a custom or built-in query and edit it as needed.
42
+
43
+
1. From the **Hunting** > **Queries** tab, select the hunting query you want to clone.
44
+
1. Select the ellipsis (...) in the line of the query you want to modify, and select **Clone**.
1. Edit the query and other fields as appropriate.
52
+
1. Select **Create**.
45
53
46
-
1. Modify the query and select **Create**.
54
+
## Edit an existing custom query
47
55
48
-
**To modify an existing custom query**:
56
+
Only queries that from a custom content source can be edited. Other content sources have to be edited at that source.
49
57
50
-
1. From the table, select the hunting query that you wish to modify. Only queries that from a custom content source can be edited. Other content sources have to be edited at that source.
58
+
1. From the **Hunting** > **Queries** tab, select the hunting query you want to change.
51
59
52
-
1. Select the ellipsis (...) in the line of the query you want to modify, and select **Edit query**.
60
+
1. Select the ellipsis (...) in the line of the query you want to change, and select **Edit**.
53
61
54
-
1. Modify the **Custom query** field with the updated query. You can also modify the entity mapping and techniques as explained in the "**To create a new query**" section of this documentation.
62
+
1. Update the **Query** field with the updated query. You can also change the entity mapping and techniques.
63
+
1. When finished select **Save**.
55
64
56
-
## Sample query
65
+
## Related content
57
66
58
-
A typical query starts with a table or parser name followed by a series of operators separated by a pipe character ("\|").
-[Advanced Security Information Model (ASIM) parser](normalization-about-parsers.md)
69
+
-[Threat hunting in Microsoft Sentinel](hunting.md)
70
+
-[Conduct end-to-end proactive threat hunting in Microsoft Sentinel](hunts.md)
59
71
60
-
In the example above, start with the table name SecurityEvent and add piped elements as needed.
61
-
62
-
1. Define a time filter to review only records from the previous seven days.
63
-
64
-
1. Add a filter in the query to only show event ID 4688.
65
-
66
-
1. Add a filter in the query on the command line to contain only instances of cscript.exe.
67
-
68
-
1. Project only the columns you're interested in exploring and limit the results to 1000 and select **Run query**.
69
-
70
-
1. Select the green triangle and run the query. You can test the query and run it to look for anomalous behavior.
71
-
72
-
We recommend that your query uses an [Advanced Security Information Model (ASIM) parser](normalization-about-parsers.md) and not a built-in table. This ensures that the query will support any current or future relevant data source rather than a single data source.
0 commit comments