Creation of Hidden Shared Object File

Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting a "." as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/07/20"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/02/20"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting
13a "." as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and
14folders on the system for persistence and defense evasion.
15"""
16from = "now-9m"
17index = ["auditbeat-*", "logs-endpoint.events.*", "endgame-*"]
18language = "eql"
19license = "Elastic License v2"
20max_signals = 33
21name = "Creation of Hidden Shared Object File"
22risk_score = 47
23rule_id = "766d3f91-3f12-448c-b65f-20123e9e9e8c"
24setup = """## Setup
25
26This rule requires data coming in from one of the following integrations:
27- Elastic Defend
28- Auditbeat
29
30### Elastic Defend Integration Setup
31Elastic 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.
32
33#### Prerequisite Requirements:
34- Fleet is required for Elastic Defend.
35- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
36
37#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
38- Go to the Kibana home page and click "Add integrations".
39- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
40- Click "Add Elastic Defend".
41- Configure the integration name and optionally add a description.
42- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
43- 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).
44- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
45- 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.
46For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
47- Click "Save and Continue".
48- 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.
49For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
50
51### Auditbeat Setup
52Auditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.
53
54#### The following steps should be executed in order to add the Auditbeat on a Linux System:
55- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
56- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).
57- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).
58- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).
59- For complete “Setup and Run Auditbeat” information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).
60
61#### Custom Ingest Pipeline
62For versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).
63"""
64severity = "medium"
65tags = [
66        "Domain: Endpoint",
67        "OS: Linux",
68        "Use Case: Threat Detection",
69        "Tactic: Defense Evasion",
70        "Data Source: Elastic Endgame",
71        "Data Source: Elastic Defend"
72        ]
73timestamp_override = "event.ingested"
74type = "eql"
75query = '''
76file where host.os.type == "linux" and event.type == "creation" and file.extension == "so" and file.name : ".*.so" and
77not process.name == "dockerd"
78'''
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82
83[[rule.threat.technique]]
84id = "T1564"
85name = "Hide Artifacts"
86reference = "https://attack.mitre.org/techniques/T1564/"
87
88[[rule.threat.technique.subtechnique]]
89id = "T1564.001"
90name = "Hidden Files and Directories"
91reference = "https://attack.mitre.org/techniques/T1564/001/"
92
93[rule.threat.tactic]
94id = "TA0005"
95name = "Defense Evasion"
96reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top