Detection rules › Splunk
Gsuite Email With Known Abuse Web Service Link
The following analytic detects emails in Gsuite containing links to known abuse web services such as Pastebin, Telegram, and Discord. It leverages Gsuite Gmail logs to identify emails with these specific domains in their links. This activity is significant because these services are commonly used by attackers to deliver malicious payloads. If confirmed malicious, this could lead to the delivery of malware, phishing attacks, or other harmful activities, potentially compromising sensitive information or systems within the organization.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1566.001 Phishing: Spearphishing Attachment |
Rule body splunk
name: Gsuite Email With Known Abuse Web Service Link
id: 8630aa22-042b-11ec-af39-acde48001122
version: 10
creation_date: '2021-08-23'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: The following analytic detects emails in Gsuite containing links to known abuse web services such as Pastebin, Telegram, and Discord. It leverages Gsuite Gmail logs to identify emails with these specific domains in their links. This activity is significant because these services are commonly used by attackers to deliver malicious payloads. If confirmed malicious, this could lead to the delivery of malware, phishing attacks, or other harmful activities, potentially compromising sensitive information or systems within the organization.
data_source:
- G Suite Gmail
search: |-
`gsuite_gmail` "link_domain{}" IN ("*pastebin.com*", "*discord*", "*telegram*","t.me")
| rex field=source.from_header_address "[^@]+@(?<source_domain>[^@]+)"
| rex field=destination{}.address "[^@]+@(?<dest_domain>[^@]+)"
| where not source_domain="internal_test_email.com" and dest_domain="internal_test_email.com"
| eval phase="plan"
| eval severity="low"
| stats values(link_domain{}) as link_domains min(_time) as firstTime max(_time) as lastTime count
BY is_spam source.address source.from_header_address
subject destination{}.address phase
severity
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `gsuite_email_with_known_abuse_web_service_link_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.
known_false_positives: normal email contains this link that are known application within the organization or network can be catched by this detection.
references:
- https://news.sophos.com/en-us/2021/07/22/malware-increasingly-targets-discord-for-abuse/
drilldown_searches:
- name: View the detection results for - "$destination{}.address$"
search: '%original_detection_search% | search destination{}.address = "$destination{}.address$"'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
- name: View risk events for the last 7 days for - "$destination{}.address$"
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$destination{}.address$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
earliest_offset: 7d
latest_offset: "0"
intermediate_findings:
entities:
- field: destination{}.address
type: user
score: 20
message: Suspicious email from $source.address$ to $destination{}.address$
threat_objects:
- field: source.address
type: email_address
analytic_story:
- Dev Sec Ops
asset_type: GSuite
mitre_attack_id:
- T1566.001
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gsuite_susp_url/gsuite_susp_url.log
source: http:gsuite
sourcetype: gsuite:gmail:bigquery
test_type: unit
Stages and Predicates
Stage 1: search
`gsuite_gmail` "link_domain{}" IN ("*pastebin.com*", "*discord*", "*telegram*","t.me")
Stage 2: rex
| rex field=source.from_header_address "[^@]+@(?<source_domain>[^@]+)"
Stage 3: rex
| rex field=destination{}.address "[^@]+@(?<dest_domain>[^@]+)"
Stage 4: where
| where not source_domain="internal_test_email.com" and dest_domain="internal_test_email.com"
Stage 5: eval
| eval phase="plan"
Stage 6: eval
| eval severity="low"
Stage 7: stats
| stats values(link_domain{}) as link_domains min(_time) as firstTime max(_time) as lastTime count
BY is_spam source.address source.from_header_address
subject destination{}.address phase
severity
Stage 8: search
| `security_content_ctime(firstTime)`
Stage 9: search
| `security_content_ctime(lastTime)`
Stage 10: search
| `gsuite_email_with_known_abuse_web_service_link_filter`
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
source_domain | eq | "internal_test_email.com" |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
"link_domain{}" | in |
|
dest_domain | eq |
|
sourcetype | eq |
|