Skip to content

Commit ff624b0

Browse files
committed
change to supported sourcetype
1 parent e342920 commit ff624b0

File tree

2 files changed

+54
-51
lines changed

2 files changed

+54
-51
lines changed

detections/cloud/gsuite_drive_share_in_external_email.yml

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,83 +5,86 @@ date: '2025-06-10'
55
author: Teoderick Contreras, Splunk
66
status: production
77
type: Anomaly
8-
description: The following analytic detects Google Drive or Google Docs files shared
8+
description:
9+
The following analytic detects Google Drive or Google Docs files shared
910
externally from an internal domain. It leverages GSuite Drive logs, extracting and
1011
comparing the source and destination email domains to identify external sharing.
1112
This activity is significant as it may indicate potential data exfiltration by an
1213
attacker or insider. If confirmed malicious, this could lead to unauthorized access
1314
to sensitive information, data leakage, and potential compliance violations. Monitoring
1415
this behavior helps in early detection and mitigation of data breaches.
1516
data_source:
16-
- G Suite Drive
17+
- G Suite Drive
1718
search: |
1819
`gsuite_drive` NOT (email IN("", "null"))
1920
| spath path=parameters.owner output=owner
2021
| rex field=owner "[^@]+@(?<src_domain>[^@]+)"
21-
| rex field=email "[^@]+@(?<dest_domain>[^@]+)"
22-
| where src_domain = "internal_test_email.com" and not dest_domain = "internal_test_email.com"
23-
| eval phase="plan"
22+
| rex field=email "[^@]+@(?<dest_domain>[^@]+)"
23+
| where src_domain = "internal_test_email.com" and not dest_domain = "internal_test_email.com"
24+
| eval phase="plan"
2425
| eval severity="low"
25-
| stats values(parameters.doc_title) as doc_title,
26-
values(parameters.doc_type) as doc_types,
27-
values(email) as dst_email_list,
26+
| stats values(parameters.doc_title) as doc_title,
27+
values(parameters.doc_type) as doc_types,
28+
values(email) as dst_email_list,
2829
values(parameters.visibility) as visibility,
29-
values(parameters.doc_id) as doc_id,
30-
count min(_time) as firstTime max(_time) as lastTime
31-
by parameters.owner ip_address phase severity
32-
| rename parameters.owner as user ip_address as src_ip
33-
| `security_content_ctime(firstTime)`
30+
values(parameters.doc_id) as doc_id,
31+
count min(_time) as firstTime max(_time) as lastTime
32+
by parameters.owner ip_address phase severity
33+
| rename parameters.owner as user ip_address as src_ip
34+
| `security_content_ctime(firstTime)`
3435
| `security_content_ctime(lastTime)`
3536
| `gsuite_drive_share_in_external_email_filter`
36-
how_to_implement: To successfully implement this search, you need to be ingesting
37+
how_to_implement:
38+
To successfully implement this search, you need to be ingesting
3739
logs related to gsuite having the file attachment metadata like file type, file
3840
extension, source email, destination email, num of attachment and etc. In order
3941
for the search to work for your environment, please edit the query to use your company
4042
specific email domain instead of `internal_test_email.com`.
41-
known_false_positives: network admin or normal user may share files to customer and
43+
known_false_positives:
44+
network admin or normal user may share files to customer and
4245
external team.
4346
references:
44-
- https://www.redhat.com/en/topics/devops/what-is-devsecops
47+
- https://www.redhat.com/en/topics/devops/what-is-devsecops
4548
drilldown_searches:
46-
- name: View the detection results for - "$dest$"
47-
search: '%original_detection_search% | search dest = "$dest$"'
48-
earliest_offset: $info_min_time$
49-
latest_offset: $info_max_time$
50-
- name: View risk events for the last 7 days for - "$dest$"
51-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
52-
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
53-
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
54-
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
55-
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
56-
| `security_content_ctime(lastTime)`'
57-
earliest_offset: $info_min_time$
58-
latest_offset: $info_max_time$
49+
- name: View the detection results for - "$dest$"
50+
search: '%original_detection_search% | search dest = "$dest$"'
51+
earliest_offset: $info_min_time$
52+
latest_offset: $info_max_time$
53+
- name: View risk events for the last 7 days for - "$dest$"
54+
search:
55+
'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
56+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
57+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
58+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
59+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
60+
| `security_content_ctime(lastTime)`'
61+
earliest_offset: $info_min_time$
62+
latest_offset: $info_max_time$
5963
rba:
60-
message: Suspicious share gdrive from $owner$ to $email$ namely as $doc_title$
64+
message: Suspicious share gdrive from $user$ to $dst_email_list$ namely as $doc_title$
6165
risk_objects:
62-
- field: email
63-
type: user
64-
score: 72
65-
- field: owner
66-
type: user
67-
score: 72
66+
- field: dst_email_list
67+
type: user
68+
score: 72
69+
- field: user
70+
type: user
71+
score: 72
6872
threat_objects: []
6973
tags:
7074
analytic_story:
71-
- Dev Sec Ops
72-
- Insider Threat
75+
- Dev Sec Ops
76+
- Insider Threat
7377
asset_type: GSuite
7478
mitre_attack_id:
75-
- T1567.002
79+
- T1567.002
7680
product:
77-
- Splunk Enterprise
78-
- Splunk Enterprise Security
79-
- Splunk Cloud
81+
- Splunk Enterprise
82+
- Splunk Enterprise Security
83+
- Splunk Cloud
8084
security_domain: endpoint
8185
tests:
82-
- name: True Positive Test
83-
attack_data:
84-
- data:
85-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1567.002/gsuite_share_drive/gdrive_share_external.log
86-
source: http:gsuite
87-
sourcetype: gsuite:drive:json
86+
- name: True Positive Test
87+
attack_data:
88+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1567.002/gsuite_share_drive/gdrive_share_external.log
89+
source: http:gsuite
90+
sourcetype: gws:reports:drive

macros/gsuite_drive.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
definition: sourcetype=gsuite:drive:json
2-
description: customer specific splunk configurations(eg- index, source, sourcetype).
1+
definition: sourcetype="gws:reports:drive"
2+
description:
3+
customer specific splunk configurations(eg- index, source, sourcetype).
34
Replace the macro definition with configurations for your Splunk Environment.
45
name: gsuite_drive
5-

0 commit comments

Comments
 (0)