SMB Traffic Spike
Description
The following analytic detects spikes in Server Message Block (SMB) traffic connections, which are used for sharing files and resources between computers. It leverages network traffic logs to monitor connections on ports 139 and 445, and SMB application usage. By calculating the average and standard deviation of SMB connections over the past 70 minutes, it identifies sources exceeding two standard deviations from the average. This activity is significant as it may indicate potential SMB-based attacks, such as ransomware or data theft. If confirmed malicious, attackers could exfiltrate data or spread malware within the network.
Query · spl
| tstats `security_content_summariesonly` count FROM datamodel=Network_Traffic
WHERE All_Traffic.dest_port=139
OR
All_Traffic.dest_port=445
OR
All_Traffic.app=smb
BY _time span=1h, All_Traffic.src
| `drop_dm_object_name("All_Traffic")`
| eventstats max(_time) as maxtime
| stats count as num_data_samples max(eval(if(_time >= relative_time(maxtime, "-70m@m"), count, null))) as count avg(eval(if(_time<relative_time(maxtime, "-70m@m"), count, null))) as avg stdev(eval(if(_time<relative_time(maxtime, "-70m@m"), count, null))) as stdev
BY src
| eval upperBound=(avg+stdev*2), isOutlier=if(count > upperBound AND num_data_samples >=50, 1, 0)
| where isOutlier=1
| table src count
| `smb_traffic_spike_filter`
Implementation guide
This search requires you to be ingesting your network traffic logs and populating the Network_Traffic data model.
Known false positives
- A file server may experience high-demand loads that could cause this analytic to trigger.
Analyst notes
Known false positives: A file server may experience high-demand loads that could cause this analytic to trigger.