High Frequency Copy Of Files In Network Share

Original Source: [splunk source]
Name:High Frequency Copy Of Files In Network Share
id:40925f12-4709-11ec-bb43-acde48001122
version:4
date:2024-09-30
author:Teoderick Contreras, Splunk
status:production
type:Anomaly
Description:The following analytic detects a high frequency of file copying or moving within network shares, which may indicate potential data sabotage or exfiltration attempts. It leverages Windows Security Event Logs (EventCode 5145) to monitor access to specific file types and network shares. This activity is significant as it can reveal insider threats attempting to transfer classified or internal files, potentially leading to data breaches or evidence tampering. If confirmed malicious, this behavior could result in unauthorized data access, data loss, or compromised sensitive information.
Data_source:
  • -Windows Event Log Security 5145
search:`wineventlog_security` EventCode=5145 RelativeTargetName IN ("*.doc","*.docx","*.xls","*.xlsx","*.ppt","*.pptx","*.log","*.txt","*.db","*.7z","*.zip","*.rar","*.tar","*.gz","*.jpg","*.gif","*.png","*.bmp","*.pdf","*.rtf","*.key") ObjectType=File ShareName IN ("\\\\*\\C$","\\\\*\\IPC$","\\\\*\\admin$") AccessMask= "0x2"
| bucket _time span=5m
| stats values(RelativeTargetName) as valRelativeTargetName, values(ShareName) as valShareName, values(ObjectType) as valObjectType, values(AccessMask) as valAccessmask, values(src_port) as valSrcPort, values(SourceAddress) as valSrcAddress count as numShareName by dest, _time, EventCode, src_user, src_ip
| eventstats avg(numShareName) as avgShareName, stdev(numShareName) as stdShareName, count as numSlots by dest, _time, EventCode, src_user
| eval upperThreshold=(avgShareName + stdShareName *3)
| eval isOutlier=if(avgShareName > 20 and avgShareName >= upperThreshold, 1, 0)
| search isOutlier=1
| `high_frequency_copy_of_files_in_network_share_filter`


how_to_implement:To successfully implement this search, you need to be ingesting Windows Security Event Logs with 5145 EventCode enabled. The Windows TA is also required. Also enable the object Audit access success/failure in your group policy.
known_false_positives:This behavior may seen in normal transfer of file within network if network share is common place for sharing documents.
References:
  -https://attack.mitre.org/techniques/T1537/
drilldown_searches:
name:'View the detection results for - "$src_user$"'
search:'%original_detection_search% | search src_user = "$src_user$"'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
name:'View risk events for the last 7 days for - "$src_user$"'
search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$src_user$") starthoursago=168 | 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:'$info_min_time$'
latest_offset:'$info_max_time$'
tags:
  analytic_story:
    - 'Information Sabotage'
    - 'Insider Threat'
  asset_type:Endpoint
  confidence:30
  impact:30
  message:High frequency copy of document into a network share from $src_ip$ by $src_user$
  mitre_attack_id:
    - 'T1537'
  observable:
    name:'src_user'
    type:'User'
    - role:
      - 'Victim'
    name:'src_ip'
    type:'IP Address'
    - role:
      - 'Attacker'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'EventCode'
    - 'Share_Name'
    - 'Relative_Target_Name'
    - 'Object_Type'
    - 'Access_Mask'
    - 'user'
    - 'src_port'
    - 'Source_Address'
  risk_score:9
  security_domain:endpoint

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1537/high_frequency_copy_of_files_in_network_share/windows-xml.log
  source: XmlWinEventLog:Security
  sourcetype: XmlWinEventLog
  update_timestamp: True
manual_test:None