Skip to content

Commit e19f589

Browse files
authored
DOCS-845 - Update hasThreatMatch (#5312)
* Update hasThreatMatch * Add descriptions
1 parent 38daebf commit e19f589

File tree

1 file changed

+39
-32
lines changed

1 file changed

+39
-32
lines changed

docs/cse/rules/cse-rules-syntax.md

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ The following expression returns "10.10.1.0":
626626

627627
### hasThreatMatch
628628

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/).
630630

631631
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).
632632

@@ -635,46 +635,31 @@ When an entity is processed by a rule using the `hasThreatMatch` function and is
635635
`hasThreatMatch([<fields>], <filters>, <indicators>)`
636636

637637
Parameters:
638-
* `<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:
651651
* `active_indicators`. Match active indicators only (default).
652652
* `expired_indicators`. Match expired indicators only.
653653
* `all_indicators`. Match all indicators.
654654

655-
**Examples**
656-
657-
* `hasThreatMatch([srcDevice_ip])`
658-
* `hasThreatMatch([srcDevice_ip, dstDevice_ip])`
659-
* `hasThreatMatch([srcDevice_ip], type="ipv4-addr")`
660-
* `hasThreatMatch([srcDevice_ip], confidence > 50)`
661-
* `hasThreatMatch([srcDevice_ip], confidence > 50 AND source="TAXII2Source")`
662-
* `hasThreatMatch([srcDevice_ip], source="s1" OR (source="s2" confidence > 50))`
663-
* `hasThreatMatch([srcDevice_ip], expired_indicators)`
664-
* `hasThreatMatch([srcDevice_ip], confidence > 50, all_indicators)`
665-
666655
#### Best practice
667656

668657
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.
669658

670-
For example:
671-
* `hasThreatMatch([dstDevice_ip], confidence > 1 AND (type="ipv4-addr" OR type="ipv6-addr"))`
672-
* `hasThreatMatch([file_hash_imphash, file_hash_md5, file_hash_pehash, file_hash_ssdeep, file_hash_sha1, file_hash_sha256], confidence > 1 AND type="file:hashes")`
673-
* `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-
676659
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.
678663
* `file`. File name.
679664
* `ipv4-addr`. IPv4 IP address.
680665
* `ipv6-addr`. IPv6 IP address.
@@ -685,6 +670,28 @@ Following are the standard indicator types you can filter on:
685670

686671
For more information about indicator types, see [Upload Formats for Threat Intelligence Indicators](/docs/security/threat-intelligence/upload-formats).
687672

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+
688695
### haversine
689696

690697
Returns the distance between latitude and longitude values of two coordinates in kilometers.

0 commit comments

Comments
 (0)