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