Skip to content

Commit 6ac7e23

Browse files
committed
Add comments for DOCS-643
1 parent 4ad6852 commit 6ac7e23

File tree

7 files changed

+126
-15
lines changed

7 files changed

+126
-15
lines changed
File renamed without changes.

docs/integrations/amazon-aws/waf.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,20 @@ The Sumo Logic app for AWS WAF analyzes traffic flowing through AWS WAF and auto
5454
}
5555
```
5656

57-
## Sample queries
58-
57+
## Sample queries
58+
```sql title="Client IP Threat Info"
59+
_sourceCategory=AWS/WAF {{client_ip}}
60+
| 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
61+
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=clientip
62+
```
63+
<!-- Replace code example with this after `sumo://threat/cs` is replaced by `threatlookup`:
5964
```sql title="Client IP Threat Info"
6065
_sourceCategory=AWS/WAF {{client_ip}}
6166
| 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
6267
| threatlookup singleIndicator clientip
6368
| where (_threatlookup.type="ipv4-addr:value" or _threatlookup.type="ipv6-addr:value") and !isNull(_threatlookup.confidence)
6469
```
70+
-->
6571

6672
## Collecting logs for the AWS WAF app
6773

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

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
99

1010
<img src={useBaseUrl('img/integrations/security-threat-detection/threatintel.png')} alt="thumbnail icon" width="75"/>
1111

12-
The Threat Intel Quick Analysis app correlates [threat intelligence](/docs/security/threat-intelligence/) data with your own log data, providing security analytics that helps you to detect threats in your environment, while also protecting against sophisticated and persistent cyber-attacks. The Threat Intel Quick Analysis app scans selected logs for threats based on **IP**, **URL**, **domain, Hash 256,** and **email**.
12+
The Threat Intel Quick Analysis app correlates [threat intelligence](/docs/security/threat-intelligence/) data with your own log data, providing security analytics that helps you to detect threats in your environment, while also protecting against sophisticated and persistent cyber-attacks. The Threat Intel Quick Analysis app scans selected logs for threats based on IP, URL, domain, SHA-256 hashes, and email.
1313

1414
## Log types
1515

16-
The Threat Intel Quick Analysis app can be used for any type of logs, regardless of format. Ideal log sources should include **IP**, **URL**, **domain**, **Hash 256**, and/or **email** information.
16+
The Threat Intel Quick Analysis app can be used for any type of logs, regardless of format. Ideal log sources should include IP, URL, domain, SHA-256 hashes, and/or email information.
1717

1818
## Installing the Threat Intel Quick Analysis app
1919

@@ -27,6 +27,24 @@ import AppInstall from '../../reuse/apps/app-install.md';
2727

2828
## Threat Intel optimization
2929

30+
The Threat Intel Quick Analysis App provides baseline queries. You can further optimize and enhance these queries for the log and events types being scanned for threats. Use the following guidelines to customize your Threat Intel queries:
31+
32+
Filter out unwanted logs before you use lookup operator
33+
* Use keywords
34+
* Use the where operator
35+
* Use general search optimization rules
36+
37+
For example:
38+
```
39+
_sourceCategory=cylance "IP Address"
40+
| parse regex "(?<ip_address>\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
41+
| where !isNull(ip_address)
42+
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
43+
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=ip_address
44+
```
45+
46+
<!-- Replace section content with this after `sumo://threat/cs` is replaced by `threatlookup`:
47+
3048
The app provides baseline queries that utilize the [`threatlookup` search operator](/docs/search/search-query-language/search-operators/threatlookup/) to look for threat intelligence data. To see the queries, open a [dashboard in the app](#viewing-threat-intel-quick-analysis-dashboards), click the three-dot kebab in the upper-right corner of the dashboard panel, and select **Open in Log Search**.
3149
3250
You can further optimize and enhance these queries for the log and events types being scanned for threats. Use the following guidelines to customize your threat intel queries:
@@ -67,15 +85,28 @@ _sourceCategory=<source-category-name>
6785
6886
|sum (ip_count) as threat_count
6987
```
88+
-->
7089

7190
### Field Extraction Rule
7291

73-
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.
92+
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 lookup operator.
7493

7594
1. Create the FER For example, for Cylance Security Events, create and use the following Field Extraction Rule:
7695
```sql
7796
parse "Event Type: *, Event Name: *, Device Name: *, IP Address: (*, *), File Name: *, Path: *, Drive Type: *, SHA256: *, MD5: *, Status: *, Cylance Score: *, Found Date: *, File Type: *, Is Running: *, Auto Run: *, Detected By: *" as event_type,event_name,device_name,src_ip,dest_ip,file_name,path,drive_type,sha,md5,status,score,found,file_type,isRunning,autoRun,detected
7897
```
98+
1. Customize your query so you can use parsed fields from FER with the lookup operator, where src_ip is the parsed field from FER (see step # 1). For example:
99+
```
100+
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip
101+
| json field=raw "labels[*].name" as label_name
102+
| replace(label_name, "\\/","->") as label_name
103+
| replace(label_name, "\""," ") as label_name
104+
| where type="ip_address" and !isNull(malicious_confidence)
105+
| if (isEmpty(actor), "Unassigned", actor) as Actor
106+
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name
107+
| sort by threat_count
108+
```
109+
<!-- Replace the preceding step with the following after `sumo://threat/cs` is replaced by `threatlookup`:
79110
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:
80111
```
81112
| threatlookup singleIndicator src_ip
@@ -85,12 +116,24 @@ Use [Field Extraction Rules (FER)](/docs/manage/field-extractions/create-field-e
85116
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name
86117
| sort by threat_count
87118
```
119+
-->
88120

89121
### Scheduled view
90122

91123
Use scheduled views with the threat lookup operator to find threats. Scheduled view reduces aggregate data down to the bare minimum, so they contain only the raw results that you need to generate your data. Queries that run against scheduled views return search results much faster because the data is pre-aggregated before the query is run. And a scheduled view query runs continuously, once per minute.
92124

93125
1. Create a scheduled view. For example, for Cylance, create a scheduled view, **cylance_threat**:
126+
```
127+
_sourceCategory=cylance | lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip
128+
| json field=raw "labels[*].name" as label_name
129+
| replace(label_name, "\\/","->") as label_name
130+
| replace(label_name, "\""," ") as label_name
131+
| where type="ip_address" and !isNull(malicious_confidence)
132+
| if (isEmpty(actor), "Unassigned", actor) as Actor
133+
| lookup latitude, longitude, country_code, country_name, region, city, postal_code, area_code, metro_code from geo://default on ip = src_ip
134+
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name, city, country_name, raw
135+
```
136+
<!-- Replace the preceding code with the following after `sumo://threat/cs` is replaced by `threatlookup`:
94137
```
95138
_sourceCategory=cylance
96139
| threatlookup singleIndicator src_ip
@@ -100,12 +143,15 @@ Use scheduled views with the threat lookup operator to find threats. Scheduled v
100143
| lookup latitude, longitude, country_code, country_name, region, city, postal_code, area_code, metro_code from geo://default on ip = src_ip
101144
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name, city, country_name, raw
102145
```
146+
-->
103147
1. Now, you can run your Threat Intel query on top of this view:
104148
```sql
105149
_view=cylance_threat
106150
| count by src_ip
107151
```
108152

153+
<!-- Hide this FAQ section until after `sumo://threat/cs` is replaced by `threatlookup`:
154+
109155
## Threat Intel FAQ
110156

111157
#### What does the Threat Intel Quick Analysis app do?
@@ -131,7 +177,7 @@ No. No results in your dashboards can mean that nothing has been identified as a
131177
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).
132178

133179
#### 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?
134-
Yes, you can customize the query with in the App. For example:
180+
Yes, you can customize the query in the app. For example:
135181

136182
```
137183
_sourceCategory= */*/FIREWALL or _sourceCategory=*/*/LB or _sourceCategory=*/*/ROUTER or _sourceCategory=*/*/WINDOWS or _sourceCategory=*/*/SERVER
@@ -179,6 +225,8 @@ Yes, you can run scheduled searches that can be set up with a run frequency of R
179225
180226
You can further investigate bad IP triggers by updating your query to check the port as well and see if it is also identified as a malicious port.
181227
228+
-->
229+
182230
## Viewing Threat Intel Quick Analysis dashboards
183231
184232
All dashboards include filters that you can use in Interactive Mode for further analysis of your Threat Intel Quick Analysis data. Because the Threat Intel Quick Analysis has the most bearing on recent threats, most panels are set to the 15 minute time range. You can adjust time ranges as needed.
@@ -259,14 +307,14 @@ See the frequency of URL threats by Actor, Log Source, Malicious Confidence, and
259307
260308
### Hash 256
261309
262-
See the frequency of Hash 256 threats by Actor, Log Source, Malicious Confidence, and view trends over time.
310+
See the frequency of SHA-256 threats by Actor, Log Source, Malicious Confidence, and view trends over time.
263311
264312
<img src={useBaseUrl('img/integrations/security-threat-detection/TIQA_Hash256_Dashboard.png')} alt="Threat Intel Dashboard" />
265313
266-
* **Threat Count.** Count of total Hash 256 threats over the last 15 minutes.
267-
* **Threats by Malicious Confidence.** Qualifies Hash 256 threats for the last 60 minutes into High, Medium, Low, Unverified, according to Sumo Logic's machine learning engine and displayed as a pie chart.
268-
* **Threat Breakdown by Sources.** Pie chart of Hash 256 threats over the last 60 minutes broken down by source.
269-
* **Threats Over Time.** Line chart of the number of Hash 256 threats over the last 60 minutes.
270-
* **Threat Breakdown by Source.** Line chart of the number of Hash 256 threats over the last 60 minutes, broken down by source.
271-
* **Threats by Actor.** Identifies Actors, if any, that can be attributed to Hash 256 threats over the last 15 minutes. Actors are identified individuals, groups or nation-states associated to threats.
272-
* **Threat Table.** Aggregation Table of Hash 256 threats over the last 15 minutes.
314+
* **Threat Count.** Count of total SHA-256 threats over the last 15 minutes.
315+
* **Threats by Malicious Confidence.** Qualifies SHA-256 threats for the last 60 minutes into High, Medium, Low, Unverified, according to Sumo Logic's machine learning engine and displayed as a pie chart.
316+
* **Threat Breakdown by Sources.** Pie chart of SHA-256 threats over the last 60 minutes broken down by source.
317+
* **Threats Over Time.** Line chart of the number of SHA-256 threats over the last 60 minutes.
318+
* **Threat Breakdown by Source.** Line chart of the number of SHA-256 threats over the last 60 minutes, broken down by source.
319+
* **Threats by Actor.** Identifies Actors, if any, that can be attributed to SHA-256 threats over the last 15 minutes. Actors are identified individuals, groups or nation-states associated to threats.
320+
* **Threat Table.** Aggregation Table of SHA-256 threats over the last 15 minutes.

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ The Sumo Logic app for AWS Observability DynamoDB is a unified logs and metrics
5454

5555
### Sample queries
5656

57+
```sql title="All IP Threat Count"
58+
_sourceCategory=Labs/AWS/DynamoDB account=* namespace=* "\"eventSource\":\"dynamodb.amazonaws.com\""
59+
| json "eventName", "awsRegion", "requestParameters.tableName", "sourceIPAddress", "userIdentity.userName" as event_name, Region, entity, ip_address, user
60+
| where Region matches "*" and tolowercase(entity) matches "*"
61+
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
62+
| 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
69+
| sum (ip_count) as threat_count
70+
```
71+
72+
<!-- Replace code example with this after `sumo://threat/cs` is replaced by `threatlookup`:
5773
```sql title="All IP Threat Count"
5874
_sourceCategory=Labs/AWS/DynamoDB account=* namespace=* "\"eventSource\":\"dynamodb.amazonaws.com\""
5975
| json "eventName", "awsRegion", "requestParameters.tableName", "sourceIPAddress", "userIdentity.userName" as event_name, Region, entity, ip_address, user
@@ -65,6 +81,7 @@ _sourceCategory=Labs/AWS/DynamoDB account=* namespace=* "\"eventSource\":\"dynam
6581
| if (isEmpty(_threatlookup.actors), "Unassigned", _threatlookup.actors) as Actor
6682
| sum (ip_count) as threat_count
6783
```
84+
-->
6885
6986
## Viewing AWS DynamoDB dashboards
7087

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ which provides results like:
4646

4747
**toLowerCase** and **toUpperCase** are useful when you use the equal to sign (`=`) or the not equal to sign (`!=`) with Sumo operators. These conditions are case-sensitive in Sumo Logic. The following example uses **toLowerCase** to convert the hash value to lower case before performing the lookup. 
4848

49+
```sql
50+
*
51+
| limit 1
52+
| toLowerCase ("B101CD29E18A515753409AE86CE68A4CEDBE0D640D385EB24B9BBB69CF8186AE") as hash
53+
| count hash
54+
| fields -_count
55+
| lookup raw from sumo://threat/cs on threat = hash{code}
56+
```
57+
58+
<!-- Replace code example with this after `sumo://threat/cs` is replaced by `threatlookup`:
4959
```sql
5060
*
5161
| limit 1
@@ -54,6 +64,7 @@ which provides results like:
5464
| fields -_count
5565
| threatlookup singleIndicator hash{code}
5666
```
67+
-->
5768

5869
### Using toUpperCase with the count operator
5970

docs/search/subqueries.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,18 @@ _sourceCategory=search "error while retrying to deploy index"
378378

379379
The following search allows a security analyst how to track logs related to a malicious IP address that was flagged by Amazon GuardDuty and also by a CrowdStrike Threat feed. The subquery is returning the field `src_ip` with the IP addresses deemed as threats to the parent query, note that the keywords option was not used so the parent query will expect a field src_ip to exist. The results will include logs from the weblogs sourceCategory that have a `src_ip` value that was deemed a threat from the subquery.
380380

381+
```sql
382+
_sourceCategory=weblogs
383+
[subquery:_sourceCategory="Labs/SecDemo/guardduty" "EC2 Instance" "communicating on an unusual server port 22"
384+
| json field=_raw "service.action.networkConnectionAction.remoteIpDetails" as remoteIpDetails
385+
| json field=_raw "service.action.networkConnectionAction.connectionDirection" as connectionDirection
386+
| where connectionDirection = "OUTBOUND"
387+
| 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"
390+
| compose src_ip]
391+
```
392+
<!-- Replace code example with this after `sumo://threat/cs` is replaced by `threatlookup`:
381393
```sql
382394
_sourceCategory=weblogs
383395
[subquery:_sourceCategory="Labs/SecDemo/guardduty" "EC2 Instance" "communicating on an unusual server port 22"
@@ -389,6 +401,7 @@ _sourceCategory=weblogs
389401
| where malicious_confidence = "high"
390402
| compose src_ip]
391403
```
404+
-->
392405

393406
### Reference data from child query using save and lookup
394407

docs/security/additional-security-features/threat-detection-and-investigation.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,22 @@ We need a way to see if any of the IP addresses we have logged are known threats
284284
285285
1. Click **Add Panel** and **Time Series**.<br/><img src={useBaseUrl('img/csa/add-time-series-panel.png')} alt="Add a time series panel" style={{border: '1px solid gray'}} width="300"/>
286286
1. Type or paste the following code into the query window. (Replace `Labs/AWS/CloudTrail` with a valid source category for AWS CloudTrail logs in your environment.)
287-
```
287+
```
288+
_sourceCategory=Labs/AWS/CloudTrail
289+
| parse regex "(?<ip_address>\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" multi
290+
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
291+
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=ip_address
292+
| where type="ip_address" and !isNull(malicious_confidence)
293+
| if (isEmpty(actor), "Unassigned", actor) as Actor
294+
| parse field=raw "\"ip_address_types\":[\"*\"]" as ip_address_types nodrop
295+
| parse field=raw "\"kill_chains\":[\"*\"]" as kill_chains nodrop
296+
| timeslice 1m
297+
| count _timeslice, ip_address, malicious_confidence, actor, kill_chains, ip_address_types, _sourceCategory, _source
298+
| fields - ip_address,malicious_confidence,actor,kill_chains,ip_address_types,_sourceCategory,_source | count by _timeslice
299+
| outlier _count window=5,threshold=3,consecutive=1,direction=+-
300+
```
301+
<!-- Replace code example with this after `sumo://threat/cs` is replaced by `threatlookup`:
302+
```
288303
_sourceCategory=Labs/AWS/CloudTrail
289304
| parse regex "(?<ip_address>\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
290305
| where ip_address != "0.0.0.0" and ip_address != "127.0.0.1"
@@ -313,6 +328,7 @@ We need a way to see if any of the IP addresses we have logged are known threats
313328

314329
|sum (ip_count) as threat_count
315330
```
331+
-->
316332
1. Click the magnifying glass icon to perform a search. If results do not display, select a longer time frame.
317333
1. Under **Chart Type**, select **Line Chart**.
318334
1. Rename this panel **IP Threat Count**.

0 commit comments

Comments
 (0)