| ID | Technique | Tactic |
|---|---|---|
| T1566.001 | Spearphishing Attachment | Initial Access |
Detection: Suspicious Email Attachment Extensions
EXPERIMENTAL DETECTION
This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
The following analytic detects emails containing attachments with suspicious file extensions. It leverages the Email data model in Splunk, using the tstats command to identify emails where the attachment filename is not empty. This detection is significant for SOC analysts as it highlights potential phishing or malware delivery attempts, which are common vectors for data breaches and malware infections. If confirmed malicious, this activity could lead to unauthorized access to sensitive information, system compromise, or data exfiltration. Immediate review and analysis of the identified emails and attachments are crucial to mitigate these risks.
Search
1
2| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
3as lastTime from datamodel=Email.All_Email where All_Email.file_name="*"
4
5by All_Email.src_user All_Email.file_name All_Email.file_size All_Email.message_id
6 All_Email.message_info All_Email.process All_Email.process_id All_Email.orig_dest
7 All_Email.orig_recipient
8
9
10| `drop_dm_object_name(All_Email)`
11
12| `security_content_ctime(firstTime)`
13
14| `security_content_ctime(lastTime)`
15
16| lookup update=true is_suspicious_file_extension_lookup file_name OUTPUT suspicious
17
18| search suspicious=true
19
20| `suspicious_email_attachment_extensions_filter`
Data Source
No data sources specified for this detection.
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| suspicious_email_attachment_extensions_filter | search * |
suspicious_email_attachment_extensions_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Risk Event | True |
Implementation
You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model.
Splunk Phantom Playbook Integration\nIf Splunk Phantom is also configured in
your environment, a Playbook called "Suspicious Email Attachment Investigate and
Delete" can be configured to run when any results are found by this detection search.
To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/,
and add the correct hostname to the "Phantom Instance" field in the Adaptive Response
Actions when configuring this detection search. The finding event will be sent to
Phantom and the playbook will gather further information about the file attachment
and its network behaviors. If Phantom finds malicious behavior and an analyst approves
of the results, the email will be deleted from the user's inbox.'"
Known False Positives
None identified
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message:
Email attachment $file_name$ with suspicious extension from $src_user$
| Risk Object | Risk Object Type | Risk Score | Threat Objects |
|---|---|---|---|
| user | user | 25 | No Threat Objects |
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | Not Applicable | N/A | N/A | N/A |
| Unit | ❌ Failing | N/A | N/A |
N/A |
| Integration | ❌ Failing | N/A | N/A |
N/A |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 9