Ransomware - Prevented - 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 preventions only, and does not include detection only 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
15preventions only, and does not include detection only alerts.
16"""
17enabled = false
18from = "now-10m"
19index = ["logs-endpoint.alerts-*"]
20interval = "5m"
21language = "kuery"
22license = "Elastic License v2"
23max_signals = 10000
24name = "Ransomware - Prevented - 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 modification (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 is prevalent in your 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
48### Response and Remediation
49
50- 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.
51- 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.
52Initial Assessment and Evidence Preservation: Identify the scope of the infection and the type of ransomware.
53- Take screenshots of ransom messages and create disk images of affected systems. Record all observable indicators of compromise (IOCs) before any remediation begins.
54- 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.
55- 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.
56- 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.
57- 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.
58- 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.
59- 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.
60- 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.
61"""
62references = [
63 "https://github.com/elastic/protections-artifacts/tree/main/ransomware",
64 "https://docs.elastic.co/en/integrations/endpoint",
65]
66risk_score = 73
67rule_id = "10f3d520-ea35-11ee-a417-f661ea17fbce"
68rule_name_override = "message"
69setup = """## Setup
70
71### Elastic Defend Alerts
72This rule is designed to capture specific alerts generated by Elastic Defend.
73
74To capture all the Elastic Defend alerts, it is recommended to use all of the Elastic Defend feature-specific protection rules:
75
76Behavior - Detected - Elastic Defend (UUID: 0f615fe4-eaa2-11ee-ae33-f661ea17fbce)
77Behavior - Prevented - Elastic Defend (UUID: eb804972-ea34-11ee-a417-f661ea17fbce)
78Malicious File - Detected - Elastic Defend (UUID: f2c3caa6-ea34-11ee-a417-f661ea17fbce)
79Malicious File - Prevented - Elastic Defend (UUID: f87e6122-ea34-11ee-a417-f661ea17fbce)
80Memory Threat - Detected - Elastic Defend (UUID: 017de1e4-ea35-11ee-a417-f661ea17fbce)
81Memory Threat - Prevented - Elastic Defend (UUID: 06f3a26c-ea35-11ee-a417-f661ea17fbce)
82Ransomware - Detected - Elastic Defend (UUID: 0c74cd7e-ea35-11ee-a417-f661ea17fbce)
83Ransomware - Prevented - Elastic Defend (UUID: 10f3d520-ea35-11ee-a417-f661ea17fbce)
84
85To 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).
86
87### Additional notes
88This 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.
89
90**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.
91
92To 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.
93
94**NOTE:** Changing `xpack.alerting.rules.run.alerts.max` is not possible in Serverless projects.
95"""
96severity = "high"
97tags = ["Data Source: Elastic Defend", "Tactic: Impact"]
98timestamp_override = "event.ingested"
99type = "query"
100
101query = '''
102event.kind : alert and event.code : ransomware and event.type : denied and event.outcome : success
103'''
104
105
106[[rule.exceptions_list]]
107id = "endpoint_list"
108list_id = "endpoint_list"
109namespace_type = "agnostic"
110type = "endpoint"
111
112[[rule.risk_score_mapping]]
113field = "event.risk_score"
114operator = "equals"
115value = ""
116
117[[rule.severity_mapping]]
118field = "event.severity"
119operator = "equals"
120severity = "low"
121value = "21"
122
123[[rule.severity_mapping]]
124field = "event.severity"
125operator = "equals"
126severity = "medium"
127value = "47"
128
129[[rule.severity_mapping]]
130field = "event.severity"
131operator = "equals"
132severity = "high"
133value = "73"
134
135[[rule.severity_mapping]]
136field = "event.severity"
137operator = "equals"
138severity = "critical"
139value = "99"
140
141[[rule.threat]]
142framework = "MITRE ATT&CK"
143[[rule.threat.technique]]
144id = "T1486"
145name = "Data Encrypted for Impact"
146reference = "https://attack.mitre.org/techniques/T1486/"
147
148
149[rule.threat.tactic]
150id = "TA0040"
151name = "Impact"
152reference = "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 modification (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 is prevalent in your 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 - Detected - Elastic Defend
- Memory Swap Modification
- Deleting Backup Catalogs with Wbadmin
- Modification of Boot Configuration
- Volume Shadow Copy Deleted or Resized via VssAdmin