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: docs/cse/rules/cse-rules-syntax.md
+39-32Lines changed: 39 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -626,7 +626,7 @@ The following expression returns "10.10.1.0":
626
626
627
627
### hasThreatMatch
628
628
629
-
The `hasThreatMatch` Cloud SIEM rules function matches incoming records in Cloud SIEM to [threat intelligence indicators](/docs/security/threat-intelligence/threat-indicators-in-cloud-siem/#hasthreatmatch-cloud-siem-rules-language-function). It can also match values in [custom threat intelligence sources in Cloud SIEM](/docs/cse/administration/create-custom-threat-intel-source/).
629
+
Use the `hasThreatMatch` Cloud SIEM rules function to match incoming records in Cloud SIEM to [threat intelligence sources](/docs/security/threat-intelligence/about-threat-intelligence/). The function uses all sources in the **Threat Intelligence** tab, unless you specify a specific source. `hasThreatMatch` can also match values in [custom threat intelligence sources in Cloud SIEM](/docs/cse/administration/create-custom-threat-intel-source/).
630
630
631
631
When an entity is processed by a rule using the `hasThreatMatch` function and is a match, the entity is associated with a known indicator that has a threat type attribute. The entity can be associated with either `threatType` (in normalized JSON format and CSV format), or `indicator_types` (in STIX format).
632
632
@@ -635,46 +635,31 @@ When an entity is processed by a rule using the `hasThreatMatch` function and is
*`<fields>` is a list of comma-separated [field names](https://github.com/SumoLogic/cloud-siem-content-catalog/blob/master/schema/full_schema.md). At least one field name is required.
639
-
*`<filters>` is a logical expression using [indicator attributes](/docs/security/threat-intelligence/upload-formats/#normalized-json-format). Allowed in the filtering are parentheses `()`; `OR` and `AND` boolean operators; and comparison operators `=`, `<`, `>`, `=<`, `=>`, `!=`. <br/>You can filter on the following indicator attributes:
640
-
*`actors`
641
-
*`confidence`
642
-
*`id`
643
-
*`indicator`
644
-
*`killChain`
645
-
*`source`
646
-
*`threatType`
647
-
*`type`
648
-
*`validFrom`
649
-
*`validUntil`
650
-
*`<indicators>` is an optional case insensitive option that describes how indicators should be matched with regard to their validity. Accepted values are:
638
+
***`<fields>`**. A list of comma-separated [field names](https://github.com/SumoLogic/cloud-siem-content-catalog/blob/master/schema/full_schema.md). At least one field name is required.
639
+
***`<filters>`**. A logical expression using [indicator attributes](/docs/security/threat-intelligence/upload-formats/#normalized-json-format). Allowed in the filtering are parentheses `()`; `OR` and `AND` boolean operators; and comparison operators `=`, `<`, `>`, `=<`, `=>`, `!=`. <br/>You can filter on the following indicator attributes:
640
+
*`actors`. An identified threat actor such as an individual, organization, or group.
641
+
*`confidence` Confidence that the data represents a valid threat, where 100 is highest. Malicious confidence scores from different sources are normalized and mapped to a 0-100 numerical value.
642
+
*`id`. ID of the indicator.
643
+
*`indicator`. Value of the indicator, such as an IP address, file name, email address, etc.
644
+
*`killChain`. The various phases an attacker may undertake to achieve their objectives (for example, `reconnaissance`, `weaponization`, `delivery`, `exploitation`, `installation`, `command-and-control`, `actions-on-objectives`).
645
+
*`source`. The source in the Sumo Logic datastore displayed in the **Threat Intelligence** tab.
646
+
*`threatType`. The threat type of the indicator (for example, `anomalous-activity`, `anonymization`, `benign`, `compromised`, `malicious-activity`, `attribution`, `unknown`).
647
+
*`type`. The indicator type (for example, `ipv4-addr`, `domain-name`, `'file:hashes`, etc.)
648
+
*`validFrom`. Beginning time this indicator is valid.
649
+
*`validUntil`. Ending time this indicator is valid.
650
+
***`<indicators>`**. An optional case insensitive option that describes how indicators should be matched with regard to their validity. Accepted values are:
651
651
*`active_indicators`. Match active indicators only (default).
652
652
*`expired_indicators`. Match expired indicators only.
As a best practice, always include filtering to narrow your match to just the types desired (that is, `type=`). This will ensure that your match expressions are not overly broad.
669
658
670
-
For example:
671
-
*`hasThreatMatch([dstDevice_ip], confidence > 1 AND (type="ipv4-addr" OR type="ipv6-addr"))`
*`hasThreatMatch([http_url], confidence > 1 AND type="url")`
674
-
*`hasThreatMatch([dstDevice_ip, srcDevice_ip], (confidence >1 AND confidence <50) AND (type='ipv4-addr' OR type='ipv6-addr'))`
675
-
676
659
Following are the standard indicator types you can filter on:
677
-
*`file:hashes`. File hash. (If you want to add the hash algorithm, enter `file:hashes.<HASH-TYPE>`. For example, `[file:hashes.MD5 = '5d41402abc4b2a76b9719d911017c592']` or `[file:hashes.'SHA-256' = '50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c']`.)
660
+
*`domain-name`. Domain.
661
+
*`email-addr`. Email.
662
+
*`file:hashes`. File hash.
678
663
*`file`. File name.
679
664
*`ipv4-addr`. IPv4 IP address.
680
665
*`ipv6-addr`. IPv6 IP address.
@@ -685,6 +670,28 @@ Following are the standard indicator types you can filter on:
685
670
686
671
For more information about indicator types, see [Upload Formats for Threat Intelligence Indicators](/docs/security/threat-intelligence/upload-formats).
687
672
673
+
**Examples**
674
+
675
+
:::tip
676
+
For standard rules that use the `hasThreatMatch` function, refer to the [Rules page in the Cloud SIEM Content Catalog](https://github.com/SumoLogic/cloud-siem-content-catalog/blob/master/rules/README.md) and search for rules with "Threat Intel" in the name. To see examples of how these rules use `hasThreatMatch`, open and view the rules in Cloud SIEM.
677
+
:::
678
+
679
+
*`hasThreatMatch([srcDevice_ip], confidence > 1 AND (type='ipv4-addr' OR type='ipv6-addr'))`
680
+
*`hasThreatMatch([device_ip], source="unit_42" AND confidence > 50) AND accountId="testing"`
681
+
*`hasThreatMatch([device_hostname], confidence > 1 AND (type='domain-name' OR type='url'))`
682
+
*`hasThreatMatch([dstDevice_hostname], confidence > 1 AND (type='domain-name' OR type='url'))`
683
+
*`hasThreatMatch([file_hash_md5], confidence > 1 AND type='file:hashes.MD5')`
684
+
*`hasThreatMatch([file_hash_sha1], confidence > 1 AND type="file:hashes.'SHA-1'")`
685
+
*`hasThreatMatch([file_hash_sha256], confidence > 1 AND type="file:hashes.'SHA-256'")`
686
+
*`hasThreatMatch([file_hash_ssdeep], confidence > 1 AND type='file:hashes.ssdeep')`
687
+
*`hasThreatMatch([http_url_rootDomain], confidence > 1 AND (type='domain-name' OR type='url'))`
688
+
*`hasThreatMatch([user_email,targetUser_email], confidence > 1 AND source = "s_global_feed_1")`
689
+
690
+
You can exclude matches from allowlists such as [standard match lists](/docs/cse/match-lists-suppressed-lists/standard-match-lists/#standard-match-lists). For example:
691
+
```text
692
+
hasThreatMatch([dstDevice_ip], confidence > 74 AND (type='ipv4-addr' OR type='ipv6-addr')) AND NOT (array_contains(listMatches, 'business_asns') OR array_contains(listMatches, 'business_domains') OR array_contains(listMatches, 'business_hostnames') OR array_contains(listMatches, 'business_ips') OR array_contains(listMatches, 'sandbox_ips') OR array_contains(listMatches, 'verified_domains') OR array_contains(listMatches, 'verified_hostnames') OR array_contains(listMatches, 'verified_ips'))
693
+
```
694
+
688
695
### haversine
689
696
690
697
Returns the distance between latitude and longitude values of two coordinates in kilometers.
0 commit comments