Skip to content

Commit bcbb852

Browse files
committed
Added PR #4190 changes
1 parent 7047ec8 commit bcbb852

File tree

5 files changed

+39
-35
lines changed

5 files changed

+39
-35
lines changed

docs/integrations/amazon-aws/waf.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ The Sumo Logic app for AWS WAF analyzes traffic flowing through AWS WAF and auto
5959
```sql title="Client IP Threat Info"
6060
_sourceCategory=AWS/WAF {{client_ip}}
6161
| parse "\"httpMethod\":\"*\"," as httpMethod,"\"httpVersion\":\"*\"," as httpVersion,"\"uri\":\"*\"," as uri, "{\"clientIp\":\"*\",\"country\":\"*\"" as clientIp,country, "\"action\":\"*\"" as action, "\"matchingNonTerminatingRules\":[*]" as matchingNonTerminatingRules, "\"rateBasedRuleList\":[*]" as rateBasedRuleList, "\"ruleGroupList\":[*]" as ruleGroupList, "\"httpSourceId\":\"*\"" as httpSourceId, "\"httpSourceName\":\"*\"" as httpSourceName, "\"terminatingRuleType\":\"*\"" as terminatingRuleType, "\"terminatingRuleId\":\"*\"" as terminatingRuleId, "\"webaclId\":\"*\"" as webaclId nodrop
62-
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=clientip
62+
| threatlookup singleIndicator clientip
63+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
6364
```
6465

6566
## Collecting logs for the AWS WAF app

docs/integrations/security-threat-detection/threat-intel-quick-analysis.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Threat Intel Quick Analysis app can be used for any type of logs, regardless
1717

1818
## Installing the Threat Intel Quick Analysis app
1919

20-
This app contains generic regex expressions and thus may not perform well at very large scale. Once you are familiar with Sumo Logic, you can apply performance optimization techniques as described in [Threat Intel Optimization](#threat-intel-optimization). Alternatively, you can run this app on smaller and more specific data streams.
20+
This app contains generic regex expressions and thus may not perform well at very large scale. Once you are familiar with Sumo Logic, you can apply performance optimization techniques as described in [Threat Intel optimization](#threat-intel-optimization). Alternatively, you can run this app on smaller and more specific data streams.
2121

2222
This section provides instructions on how to install the Threat Intel Quick Analysis app, and examples of each of dashboards. The preconfigured searches and dashboards provide easy-to-access visual insights into your data.
2323

@@ -65,7 +65,7 @@ _sourceCategory=<source-category-name>
6565
6666
|sum (ip_count) as threat_count
6767
```
68-
<!--
68+
6969
### Field Extraction Rule
7070

7171
Use [Field Extraction Rules (FER)]((/docs/manage/field-extractions/create-field-extraction-rule)) to parse fields from your log messages at the time the messages are ingested, which eliminates the need to parse fields at the query level. Use these parsed fields along with Threat Intel Lookup operator.
@@ -76,12 +76,10 @@ Use [Field Extraction Rules (FER)]((/docs/manage/field-extractions/create-field-
7676
```
7777
1. Customize your query so you can use parsed fields from the Field Extraction Rule with the [`threatlookup` search operator](/docs/search/search-query-language/search-operators/threatlookup/), where `src_ip` is the parsed field from the FER. For example:
7878
```
79-
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip
80-
| json field=raw "labels[*].name" as label_name
81-
| replace(label_name, "\\/","->") as label_name
82-
| replace(label_name, "\""," ") as label_name
83-
| where type="ip_address" and !isNull(malicious_confidence)
84-
| if (isEmpty(actor), "Unassigned", actor) as Actor
79+
| threatlookup singleIndicator src_ip
80+
| parse regex field=%"_threatlookup.fields" "labels.[^.]+.name\":\"(?<label_name>[^\"]+)\"" multi
81+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
82+
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
8583
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name
8684
| sort by threat_count
8785
```
@@ -92,21 +90,19 @@ Use scheduled views with the threat lookup operator to find threats. Scheduled v
9290

9391
1. Create a scheduled view. For example, for Cylance, create a scheduled view, **cylance_threat**:
9492
```
95-
_sourceCategory=cylance | lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip
96-
| json field=raw "labels[*].name" as label_name
97-
| replace(label_name, "\\/","->") as label_name
98-
| replace(label_name, "\""," ") as label_name
99-
| where type="ip_address" and !isNull(malicious_confidence)
100-
| if (isEmpty(actor), "Unassigned", actor) as Actor
101-
| lookup latitude, longitude, country_code, country_name, region, city, postal_code, area_code, metro_code from geo://default on ip = src_ip
102-
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name, city, country_name, raw
93+
_sourceCategory=cylance
94+
| threatlookup singleIndicator src_ip
95+
| parse regex field=%"_threatlookup.fields" "labels.[^.]+.name\":\"(?<label_name>[^\"]+)\"" multi
96+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
97+
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
98+
| lookup latitude, longitude, country_code, country_name, region, city, postal_code, area_code, metro_code from geo://default on ip = src_ip
99+
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name, city, country_name, raw
103100
```
104101
1. Now, you can run your Threat Intel query on top of this view:
105102
```sql
106103
_view=cylance_threat
107104
| count by src_ip
108105
```
109-
-->
110106

111107
## Threat Intel FAQ
112108

@@ -132,6 +128,18 @@ No. No results in your dashboards can mean that nothing has been identified as a
132128

133129
It could be a case-sensitivity issue. In Sumo Logic, the equal sign (`=`) and the not equal to sign (`!=`) conditions are case-sensitive; when you use them with Sumo Logic operators you may need to convert the string to which the condition is applied to upper or lower case. For more information, see [Using toLowerCase or toUpperCase with an equating condition](/docs/search/search-query-language/search-operators/tolowercase-touppercase).
134130

131+
#### I already have parsed fields such as IPs, domain, URL, Email, or File Name. Can I use them with this App, instead of parsing each log line again?
132+
Yes, you can customize the query with in the App. For example:
133+
134+
```
135+
_sourceCategory= */*/FIREWALL or _sourceCategory=*/*/LB or _sourceCategory=*/*/ROUTER or _sourceCategory=*/*/WINDOWS or _sourceCategory=*/*/SERVER
136+
| where Your_IP != "0.0.0.0" and Your_IP != "127.0.0.1"
137+
| threatlookup singleIndicator Your_IP
138+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
139+
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
140+
| count by Actor
141+
```
142+
135143
#### Should I use all logs (`*`) with this app or subset of logs?
136144
137145
You can use (`*`) to scan all of your ingested logs for threat, but depending on the volume of logs it can impact the performance of the search query and the app.
@@ -140,7 +148,7 @@ For optimal performance, use a subset of the logs. For example:
140148
```
141149
_sourceCategory= */*/FIREWALL or _sourceCategory=*/*/LB or _sourceCategory=*/*/ROUTER or _sourceCategory=*/*/WINDOWS or _sourceCategory=*/*/SERVER
142150
```
143-
<!--
151+
144152
#### I am seeing noisy results in the lookup service, what do I do?
145153
146154
* Use filters to remove as much of the noise as possible (for example, use the `NOT` clause before passing tuples to the lookup operator).
@@ -149,19 +157,17 @@ _sourceCategory= */*/FIREWALL or _sourceCategory=*/*/LB or _sourceCategory=*/*/R
149157
```
150158
| parse regex "(?\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
151159
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
152-
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=ip_address
153-
| json field=raw "labels[*].name" as label_name
154-
| replace(label_name, "\\/","->") as label_name
155-
| replace(label_name, "\""," ") as label_name
156-
| where type="ip_address" and !isNull(malicious_confidence)
160+
| threatlookup singleIndicator ip_address
161+
| parse regex field=%"_threatlookup.fields" "labels.[^.]+.name\":\"(?<label_name>[^\"]+)\"" multi
162+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
157163
| where !(label_name matches "*TorProxy*")
158-
| if (isEmpty(actor), "Unassigned", actor) as Actor
164+
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
165+
| if (_threatlookup.confidence >= 85, "high", if (_threatlookup.confidence >= 50, "medium", if (_threatlookup.confidence >= 15, "low", if (_threatlookup.confidence >= 0, "unverified", "Unknown")))) as malicious_confidence
159166
| count by ip_address, malicious_confidence, Actor, _source, label_name
160167
| sort by _count
161168
```
162169
163170
Threat Intel Quick Analysis app is a good starting point, but you will have to customize the queries powering the app for your own particular use.
164-
-->
165171
166172
#### Can I use Scheduled Search with threat lookup service? If yes, what is the Run Frequency (time) I can use?
167173

docs/observability/aws/integrations/aws-dynamodb.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ _sourceCategory=Labs/AWS/DynamoDB account=* namespace=* "\"eventSource\":\"dynam
6060
| where Region matches "*" and tolowercase(entity) matches "*"
6161
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
6262
| count as ip_count by ip_address
63-
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=ip_address
64-
| json field=raw "labels[*].name" as label_name
65-
| replace(label_name, "\\/","->") as label_name
66-
| replace(label_name, "\""," ") as label_name
67-
| where type="ip_address" and !isNull(malicious_confidence)
68-
| if (isEmpty(actor), "Unassigned", actor) as Actor
63+
| threatlookup singleIndicator ip_address
64+
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
65+
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
6966
| sum (ip_count) as threat_count
7067
```
7168

docs/search/search-query-language/search-operators/tolowercase-touppercase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ which provides results like:
5252
| toLowerCase ("B101CD29E18A515753409AE86CE68A4CEDBE0D640D385EB24B9BBB69CF8186AE") as hash
5353
| count hash
5454
| fields -_count
55-
| lookup raw from sumo://threat/cs on threat = hash{code}
55+
| threatlookup singleIndicator hash{code}
5656
```
5757

5858
### Using toUpperCase with the count operator

docs/search/subqueries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ _sourceCategory=weblogs
385385
| json field=_raw "service.action.networkConnectionAction.connectionDirection" as connectionDirection
386386
| where connectionDirection = "OUTBOUND"
387387
| json field=remoteipdetails "ipAddressV4" as src_ip
388-
| lookup type, actor, raw, threatlevel from sumo://threat/cs on src_ip=threat
389-
| where threatlevel = "high"
388+
| threatlookup singleIndicator threat| if (_threatlookup.confidence >= 85, "high", if (_threatlookup.confidence >= 50, "medium", if (_threatlookup.confidence >= 15, "low", if (_threatlookup.confidence >= 0, "unverified", "Unknown")))) as malicious_confidence
389+
| where malicious_confidence = "high"
390390
| compose src_ip]
391391
```
392392

0 commit comments

Comments
 (0)