Suspicious Data Encryption via OpenSSL Utility

Identifies when the openssl command-line utility is used to encrypt multiple files on a host within a short time window. Adversaries may encrypt data on a single or multiple systems in order to disrupt the availability of their target's data and may attempt to hold the organization's data to ransom for the purposes of extortion.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/06/26"
 3integration = ["endpoint"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies when the openssl command-line utility is used to encrypt multiple files on a host within a short time window.
11Adversaries may encrypt data on a single or multiple systems in order to disrupt the availability of their target's data
12and may attempt to hold the organization's data to ransom for the purposes of extortion.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Suspicious Data Encryption via OpenSSL Utility"
19references = [
20    "https://www.welivesecurity.com/2017/06/30/telebots-back-supply-chain-attacks-against-ukraine/",
21    "https://www.trendmicro.com/en_us/research/21/f/bash-ransomware-darkradiation-targets-red-hat--and-debian-based-linux-distributions.html",
22]
23risk_score = 47
24rule_id = "f530ca17-153b-4a7a-8cd3-98dd4b4ddf73"
25setup = """## Setup
26
27This rule requires data coming in from Elastic Defend.
28
29### Elastic Defend Integration Setup
30Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
31
32#### Prerequisite Requirements:
33- Fleet is required for Elastic Defend.
34- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
35
36#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
37- Go to the Kibana home page and click "Add integrations".
38- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
39- Click "Add Elastic Defend".
40- Configure the integration name and optionally add a description.
41- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
42- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
43- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
44- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
45For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
46- Click "Save and Continue".
47- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
48For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
49"""
50severity = "medium"
51tags = [
52    "Domain: Endpoint",
53    "OS: Linux",
54    "Use Case: Threat Detection",
55    "Tactic: Impact",
56    "Data Source: Elastic Defend",
57]
58type = "eql"
59
60query = '''
61sequence by host.id, user.name, process.parent.entity_id with maxspan=5s
62  [ process where host.os.type == "linux" and event.action == "exec" and 
63    process.name == "openssl" and process.parent.name : ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "perl*", "php*", "python*", "xargs") and
64    process.args == "-in" and process.args == "-out" and
65    process.args in ("-k", "-K", "-kfile", "-pass", "-iv", "-md") and
66    /* excluding base64 encoding options and including encryption password or key params */
67    not process.args in ("-d", "-a", "-A", "-base64", "-none", "-nosalt") ] with runs=10
68'''
69
70
71[[rule.threat]]
72framework = "MITRE ATT&CK"
73[[rule.threat.technique]]
74id = "T1486"
75name = "Data Encrypted for Impact"
76reference = "https://attack.mitre.org/techniques/T1486/"
77
78
79[rule.threat.tactic]
80id = "TA0040"
81name = "Impact"
82reference = "https://attack.mitre.org/tactics/TA0040/"

References

Related rules

to-top