Potential Ransomware Behavior - High count of Readme files by System

This rule identifies a high number (20) of file creation event by the System virtual process from the same host and with same file name containing keywords similar to ransomware note files and all within a short time period.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2024/05/03"
  3integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
  4maturity = "production"
  5updated_date = "2024/10/28"
  6min_stack_version = "8.14.0"
  7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12This rule identifies a high number (20) of file creation event by the System virtual process from the same host and with
 13same file name containing keywords similar to ransomware note files and all within a short time period.
 14"""
 15from = "now-9m"
 16index = [
 17    "logs-endpoint.events.file-*",
 18    "winlogbeat-*",
 19    "logs-windows.sysmon_operational-*",
 20    "endgame-*",
 21    "logs-m365_defender.event-*",
 22    "logs-sentinel_one_cloud_funnel.*",
 23]
 24language = "kuery"
 25license = "Elastic License v2"
 26name = "Potential Ransomware Behavior - High count of Readme files by System"
 27note = """## Triage and analysis
 28
 29#### Possible investigation steps
 30
 31- Investigate the content of the readme files.
 32- Investigate any file names with unusual extensions.
 33- Investigate any incoming network connection to port 445 on this host.
 34- Investigate any network logon events to this host.
 35- Identify the total number and type of modified files by pid 4.
 36- If the number of files is too high and source.ip connecting over SMB is unusual isolate the host and block the used credentials.
 37- Investigate other alerts associated with the user/host during the past 48 hours.
 38
 39### False positive analysis
 40
 41- Local file modification from a Kernel mode driver.
 42
 43### Related rules
 44
 45- Third-party Backup Files Deleted via Unexpected Process - 11ea6bec-ebde-4d71-a8e9-784948f8e3e9
 46- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921
 47- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4
 48- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57
 49- Potential Ransomware Note File Dropped via SMB - 02bab13d-fb14-4d7c-b6fe-4a28874d37c5
 50- Suspicious File Renamed via SMB - 78e9b5d5-7c07-40a7-a591-3dbbf464c386
 51
 52### Response and remediation
 53
 54- Initiate the incident response process based on the outcome of the triage.
 55- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.
 56- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
 57- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.
 58- If any backups were affected:
 59  - Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).
 60- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 61- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 62"""
 63references = ["https://news.sophos.com/en-us/2023/12/21/akira-again-the-ransomware-that-keeps-on-taking/"]
 64risk_score = 73
 65rule_id = "1397e1b9-0c90-4d24-8d7b-80598eb9bc9a"
 66severity = "high"
 67tags = [
 68    "Domain: Endpoint",
 69    "OS: Windows",
 70    "Use Case: Threat Detection",
 71    "Tactic: Impact",
 72    "Resources: Investigation Guide",
 73    "Data Source: Elastic Defend",
 74    "Data Source: Elastic Endgame",
 75    "Data Source: Microsoft Defender for Endpoint",
 76    "Data Source: Sysmon",
 77    "Data Source: SentinelOne",
 78]
 79timestamp_override = "event.ingested"
 80type = "threshold"
 81
 82query = '''
 83event.category:file and host.os.type:windows and process.pid:4 and event.action:creation and
 84 file.name:(*read*me* or *README* or *lock* or *LOCK* or *how*to* or *HOW*TO* or *@* or *recover* or *RECOVER* or *decrypt* or *DECRYPT* or *restore* or *RESTORE* or *FILES_BACK* or *files_back*)
 85'''
 86
 87
 88[[rule.threat]]
 89framework = "MITRE ATT&CK"
 90[[rule.threat.technique]]
 91id = "T1485"
 92name = "Data Destruction"
 93reference = "https://attack.mitre.org/techniques/T1485/"
 94
 95
 96[rule.threat.tactic]
 97id = "TA0040"
 98name = "Impact"
 99reference = "https://attack.mitre.org/tactics/TA0040/"
100[[rule.threat]]
101framework = "MITRE ATT&CK"
102[[rule.threat.technique]]
103id = "T1021"
104name = "Remote Services"
105reference = "https://attack.mitre.org/techniques/T1021/"
106[[rule.threat.technique.subtechnique]]
107id = "T1021.002"
108name = "SMB/Windows Admin Shares"
109reference = "https://attack.mitre.org/techniques/T1021/002/"
110
111
112
113[rule.threat.tactic]
114id = "TA0008"
115name = "Lateral Movement"
116reference = "https://attack.mitre.org/tactics/TA0008/"
117
118[rule.threshold]
119field = ["host.id", "file.name"]
120value = 20

Triage and analysis

Possible investigation steps

  • Investigate the content of the readme files.
  • Investigate any file names with unusual extensions.
  • Investigate any incoming network connection to port 445 on this host.
  • Investigate any network logon events to this host.
  • Identify the total number and type of modified files by pid 4.
  • If the number of files is too high and source.ip connecting over SMB is unusual isolate the host and block the used credentials.
  • Investigate other alerts associated with the user/host during the past 48 hours.

False positive analysis

  • Local file modification from a Kernel mode driver.
  • Third-party Backup Files Deleted via Unexpected Process - 11ea6bec-ebde-4d71-a8e9-784948f8e3e9
  • Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921
  • Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4
  • Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57
  • Potential Ransomware Note File Dropped via SMB - 02bab13d-fb14-4d7c-b6fe-4a28874d37c5
  • Suspicious File Renamed via SMB - 78e9b5d5-7c07-40a7-a591-3dbbf464c386

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.
  • If any backups were affected:
    • Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top