:warning: THIS IS A EXPERIMENTAL DETECTION

This detection has been marked experimental by the Splunk Threat Research team. This means we have not been able to test, simulate, or build datasets for this detection. Use at your own risk. This analytic is NOT supported.

Try in Splunk Security Cloud

Description

The following analytic detects outbound SMB (Server Message Block) connections from internal hosts to external servers, a method commonly exploited for Windows file-sharing activities. It identifies this behavior by monitoring network traffic for SMB requests directed towards the Internet, which are not typical for standard operations. This detection is crucial for a Security Operations Center (SOC) as it can indicate an attackers attempt to retrieve credential hashes through compromised servers, a key step in lateral movement and privilege escalation. The impact of such an attack includes unauthorized access to sensitive data and potential full system compromise.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Network_Traffic
  • Last Updated: 2024-02-27
  • Author: Bhavin Patel, Stuart Hopkins, Patrick Bareiss
  • ID: 1bed7774-304a-4e8f-9d72-d80e45ff492b

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1071.002 File Transfer Protocols Command And Control
T1071 Application Layer Protocol Command And Control
Kill Chain Phase
  • Command and Control
NIST
  • DE.CM
CIS20
  • CIS 13
CVE
1
2
3
4
5
6
7
8
9
| tstats `security_content_summariesonly` earliest(_time) as start_time latest(_time) as end_time values(All_Traffic.action) as action values(All_Traffic.app) as app values(All_Traffic.dest_ip) as dest_ip values(All_Traffic.dest_port) as dest_port values(sourcetype) as sourcetype count from datamodel=Network_Traffic where (All_Traffic.action=allowed All_Traffic.direction=outbound All_Traffic.dest_port=139 OR All_Traffic.dest_port=445 OR All_Traffic.app="smb") by All_Traffic.src_ip 
| `drop_dm_object_name("All_Traffic")` 
| eval match=case( cidrmatch("10.0.0.0/8" ,dest_ip) ,"1", cidrmatch("172.16.0.0/12" ,dest_ip) ,"1", cidrmatch("192.168.0.0/16" ,dest_ip) ,"1", cidrmatch("100.64.0.0/10" ,dest_ip) ,"1", 1=1,"0") 
| search match=0 
| fields -  match 
| `security_content_ctime(start_time)` 
| `security_content_ctime(end_time)` 
| `detect_outbound_smb_traffic_filter`

Macros

The SPL above uses the following Macros:

:information_source: detect_outbound_smb_traffic_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • All_Traffic.action
  • All_Traffic.app
  • All_Traffic.dest_ip
  • All_Traffic.dest_port
  • sourcetype
  • All_Traffic.src_ip
  • All_Traffic.direction

How To Implement

This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model

Known False Positives

It is likely that the outbound Server Message Block (SMB) traffic is legitimate, if the company's internal networks are not well-defined in the Assets and Identity Framework. Categorize the internal CIDR blocks as internal in the lookup file to avoid creating notable events for traffic destined to those CIDR blocks. Any other network connection that is going out to the Internet should be investigated and blocked. Best practices suggest preventing external communications of all SMB versions and related protocols at the network boundary.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
25.0 50 50 An outbound SMB connection from $src_ip$ in your infrastructure connecting to dest ip $dest_ip$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

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 | version: 4