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

  • 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.
  • 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
  • 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