Ransomware - Detected - Elastic Defend
Generates a detection alert each time an Elastic Defend alert for ransomware are received. Enabling this rule allows you to immediately begin investigating your Endpoint ransomware alerts. This rule identifies Elastic Defend ransomware detections only, and does not include prevention alerts.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/03/24"
3integration = ["endpoint"]
4maturity = "production"
5min_stack_comments = "Defend alerting adjustments patch to distinguish prevention and detection."
6min_stack_version = "8.16.0"
7promotion = true
8updated_date = "2024/11/26"
9
10[rule]
11author = ["Elastic"]
12description = """
13Generates a detection alert each time an Elastic Defend alert for ransomware are received. Enabling this rule allows you
14to immediately begin investigating your Endpoint ransomware alerts. This rule identifies Elastic Defend ransomware
15detections only, and does not include prevention alerts.
16"""
17enabled = false
18from = "now-10m"
19index = ["logs-endpoint.alerts-*"]
20interval = "5m"
21language = "kuery"
22license = "Elastic License v2"
23max_signals = 10000
24name = "Ransomware - Detected - Elastic Defend"
25note = """## Triage and analysis
26
27### Investigating Ransomware Alerts
28
29Ransomware protection adds a dedicated layer of detection and prevention against ransomware attacks. Our Ransomware protection consists of 3 subtypes: `behavioral`, `canary files`, and `MBR`. Our behavioral ransomware protection monitors the low level file system activity of all processes on the system to identify generic file encryption techniques. We include signals such as file header information, entropy calculations, known and suspicious extensions, and more to make verdicts. Canary files serve as a high confidence short-cut to other behavior techniques. Our endpoint places hidden files in select directories on the system and will trigger on any process attempting to tamper with the files. Finally, we protect the Master Boot Record (MBR) with our kernel minifilter driver to prevent this type of ransomware attack.
30
31Generally, our ransomware protection is tuned to have extremely low false positives rates. We understand how alarming and disruptive ransomware false positives can be which has factored into its design goals. More likely than not, if this protection fires, it is a true positive. However, certain categories of software do behave similarly to ransomware from the perspective of this protection. That includes installers and backup software, which can make a large number of modifications to documents (especially during a restore operation). Further, encryption or system utilities which modify the system’s MBR may also trigger our MBR protection.
32
33### Possible investigation steps
34
35- The `Ransomware.files` field provides details about files modifications (paths, entropy, extension and file headers).
36- Investigate the metadata and the activity of the process or processes that triggered the alert.
37- Assess whether this activity prevalent in the environment by looking for similar occurrences across hosts.
38- Some Ransomware attacks tend to execute the operation on multiple hosts at the same time for maximum impact.
39- Verify the activity of the `user.name` associated with the alert (local or remote actity, privileged or standard user).
40- Quickly identifying the compromised credentials is critical to remediate Ransomware attacks.
41- Verify if there are any other alert types (Behavior or Memory Threat) associated with the same host or user or process within the same time.
42
43### False positive analysis
44
45- Installers and backup software, which can make a large number of modifications to documents (especially during a restore operation).
46- Encryption or system utilities which modify the system’s MBR may also trigger our MBR protection.
47### Response and Remediation
48
49- Immediate Isolation and Containment: Quickly disconnect affected systems from the network, including both wired and wireless connections, to prevent the ransomware from spreading. This includes disabling network cards and removing network cables if necessary, while keeping the systems powered on for forensic purposes.
50- Activate Incident Response Team and Plan: Assemble your incident response team and implement your incident response plan. Contact necessary stakeholders including IT security, legal counsel, and executive management. Document all actions taken from the moment of detection.
51Initial Assessment and Evidence Preservation: Identify the scope of the infection and the type of ransomware.
52- Take screenshots of ransom messages and create disk images of affected systems. Record all observable indicators of compromise (IOCs) before any remediation begins.
53- Business Impact Analysis: Evaluate which critical business operations are affected and establish priority systems for recovery. Determine regulatory reporting requirements based on the type of data potentially compromised.
54- Secure Backup Verification: Identify and verify the integrity of your latest clean backups. Check backup systems for potential compromise and ensure they were disconnected during the attack to prevent encryption of backup data.
55- System Recovery Preparation: Build a clean environment for recovery operations, including secured networks and validated clean systems. Prepare tools and resources needed for system restoration.
56- Malware Eradication: Remove the ransomware from infected systems using appropriate security tools. This may involve complete system rebuilds from known clean sources rather than attempting to clean infected systems.
57- Data Restoration: Begin restoring systems from verified clean backups, starting with the most critical business operations. Implement additional security controls and monitoring during the restoration process.
58- Security Posture Strengthening: Update all security systems including firewalls, antivirus, and endpoint protection. Reset all credentials across the organization and implement additional access controls like multi-factor authentication where needed.
59- Post-Incident Activities: Conduct a detailed post-incident analysis to identify how the ransomware entered the environment. Update security policies and incident response plans based on lessons learned, and provide additional security awareness training to staff.
60"""
61references = [
62 "https://github.com/elastic/protections-artifacts/tree/main/ransomware",
63 "https://docs.elastic.co/en/integrations/endpoint",
64]
65risk_score = 73
66rule_id = "0c74cd7e-ea35-11ee-a417-f661ea17fbce"
67rule_name_override = "message"
68setup = """## Setup
69
70### Elastic Defend Alerts
71This rule is designed to capture specific alerts generated by Elastic Defend.
72
73To capture all the Elastic Defend alerts, it is recommended to use all of the Elastic Defend feature-specific protection rules:
74
75Behavior - Detected - Elastic Defend (UUID: 0f615fe4-eaa2-11ee-ae33-f661ea17fbce)
76Behavior - Prevented - Elastic Defend (UUID: eb804972-ea34-11ee-a417-f661ea17fbce)
77Malicious File - Detected - Elastic Defend (UUID: f2c3caa6-ea34-11ee-a417-f661ea17fbce)
78Malicious File - Prevented - Elastic Defend (UUID: f87e6122-ea34-11ee-a417-f661ea17fbce)
79Memory Threat - Detected - Elastic Defend (UUID: 017de1e4-ea35-11ee-a417-f661ea17fbce)
80Memory Threat - Prevented - Elastic Defend (UUID: 06f3a26c-ea35-11ee-a417-f661ea17fbce)
81Ransomware - Detected - Elastic Defend (UUID: 0c74cd7e-ea35-11ee-a417-f661ea17fbce)
82Ransomware - Prevented - Elastic Defend (UUID: 10f3d520-ea35-11ee-a417-f661ea17fbce)
83
84To avoid generating duplicate alerts, you should enable either all feature-specific protection rules or the Endpoint Security (Elastic Defend) rule (UUID: 9a1a2dae-0b5f-4c3d-8305-a268d404c306).
85
86### Additional notes
87This rule is configured to generate more **Max alerts per run** than the default 1000 alerts per run set for all rules. This is to ensure that it captures as many alerts as possible.
88
89**IMPORTANT:** The rule's **Max alerts per run** setting can be superseded by the `xpack.alerting.rules.run.alerts.max` Kibana config setting, which determines the maximum alerts generated by _any_ rule in the Kibana alerting framework. For example, if `xpack.alerting.rules.run.alerts.max` is set to 1000, this rule will still generate no more than 1000 alerts even if its own **Max alerts per run** is set higher.
90
91To make sure this rule can generate as many alerts as it's configured in its own **Max alerts per run** setting, increase the `xpack.alerting.rules.run.alerts.max` system setting accordingly.
92
93**NOTE:** Changing `xpack.alerting.rules.run.alerts.max` is not possible in Serverless projects.
94"""
95severity = "high"
96tags = ["Data Source: Elastic Defend", "Tactic: Impact"]
97timestamp_override = "event.ingested"
98type = "query"
99
100query = '''
101event.kind : alert and event.code : ransomware and (event.type : allowed or (event.type: denied and event.outcome: failure))
102'''
103
104
105[[rule.exceptions_list]]
106id = "endpoint_list"
107list_id = "endpoint_list"
108namespace_type = "agnostic"
109type = "endpoint"
110
111[[rule.risk_score_mapping]]
112field = "event.risk_score"
113operator = "equals"
114value = ""
115
116[[rule.severity_mapping]]
117field = "event.severity"
118operator = "equals"
119severity = "low"
120value = "21"
121
122[[rule.severity_mapping]]
123field = "event.severity"
124operator = "equals"
125severity = "medium"
126value = "47"
127
128[[rule.severity_mapping]]
129field = "event.severity"
130operator = "equals"
131severity = "high"
132value = "73"
133
134[[rule.severity_mapping]]
135field = "event.severity"
136operator = "equals"
137severity = "critical"
138value = "99"
139
140[[rule.threat]]
141framework = "MITRE ATT&CK"
142[[rule.threat.technique]]
143id = "T1486"
144name = "Data Encrypted for Impact"
145reference = "https://attack.mitre.org/techniques/T1486/"
146
147
148[rule.threat.tactic]
149id = "TA0040"
150name = "Impact"
151reference = "https://attack.mitre.org/tactics/TA0040/"
Triage and analysis
Investigating Ransomware Alerts
Ransomware protection adds a dedicated layer of detection and prevention against ransomware attacks. Our Ransomware protection consists of 3 subtypes: behavioral
, canary files
, and MBR
. Our behavioral ransomware protection monitors the low level file system activity of all processes on the system to identify generic file encryption techniques. We include signals such as file header information, entropy calculations, known and suspicious extensions, and more to make verdicts. Canary files serve as a high confidence short-cut to other behavior techniques. Our endpoint places hidden files in select directories on the system and will trigger on any process attempting to tamper with the files. Finally, we protect the Master Boot Record (MBR) with our kernel minifilter driver to prevent this type of ransomware attack.
Generally, our ransomware protection is tuned to have extremely low false positives rates. We understand how alarming and disruptive ransomware false positives can be which has factored into its design goals. More likely than not, if this protection fires, it is a true positive. However, certain categories of software do behave similarly to ransomware from the perspective of this protection. That includes installers and backup software, which can make a large number of modifications to documents (especially during a restore operation). Further, encryption or system utilities which modify the system’s MBR may also trigger our MBR protection.
Possible investigation steps
- The
Ransomware.files
field provides details about files modifications (paths, entropy, extension and file headers). - Investigate the metadata and the activity of the process or processes that triggered the alert.
- Assess whether this activity prevalent in the environment by looking for similar occurrences across hosts.
- Some Ransomware attacks tend to execute the operation on multiple hosts at the same time for maximum impact.
- Verify the activity of the
user.name
associated with the alert (local or remote actity, privileged or standard user). - Quickly identifying the compromised credentials is critical to remediate Ransomware attacks.
- Verify if there are any other alert types (Behavior or Memory Threat) associated with the same host or user or process within the same time.
False positive analysis
- Installers and backup software, which can make a large number of modifications to documents (especially during a restore operation).
- Encryption or system utilities which modify the system’s MBR may also trigger our MBR protection.
Response and Remediation
- Immediate Isolation and Containment: Quickly disconnect affected systems from the network, including both wired and wireless connections, to prevent the ransomware from spreading. This includes disabling network cards and removing network cables if necessary, while keeping the systems powered on for forensic purposes.
- Activate Incident Response Team and Plan: Assemble your incident response team and implement your incident response plan. Contact necessary stakeholders including IT security, legal counsel, and executive management. Document all actions taken from the moment of detection. Initial Assessment and Evidence Preservation: Identify the scope of the infection and the type of ransomware.
- Take screenshots of ransom messages and create disk images of affected systems. Record all observable indicators of compromise (IOCs) before any remediation begins.
- Business Impact Analysis: Evaluate which critical business operations are affected and establish priority systems for recovery. Determine regulatory reporting requirements based on the type of data potentially compromised.
- Secure Backup Verification: Identify and verify the integrity of your latest clean backups. Check backup systems for potential compromise and ensure they were disconnected during the attack to prevent encryption of backup data.
- System Recovery Preparation: Build a clean environment for recovery operations, including secured networks and validated clean systems. Prepare tools and resources needed for system restoration.
- Malware Eradication: Remove the ransomware from infected systems using appropriate security tools. This may involve complete system rebuilds from known clean sources rather than attempting to clean infected systems.
- Data Restoration: Begin restoring systems from verified clean backups, starting with the most critical business operations. Implement additional security controls and monitoring during the restoration process.
- Security Posture Strengthening: Update all security systems including firewalls, antivirus, and endpoint protection. Reset all credentials across the organization and implement additional access controls like multi-factor authentication where needed.
- Post-Incident Activities: Conduct a detailed post-incident analysis to identify how the ransomware entered the environment. Update security policies and incident response plans based on lessons learned, and provide additional security awareness training to staff.
References
Related rules
- Ransomware - Prevented - Elastic Defend
- Memory Swap Modification
- Deleting Backup Catalogs with Wbadmin
- Modification of Boot Configuration
- Volume Shadow Copy Deleted or Resized via VssAdmin