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"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting
11a "." as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and
12folders on the system for persistence and defense evasion.
13"""
14from = "now-9m"
15index = ["auditbeat-*", "logs-endpoint.events.*", "endgame-*"]
16language = "eql"
17license = "Elastic License v2"
18max_signals = 33
19name = "Creation of Hidden Shared Object File"
20risk_score = 47
21rule_id = "766d3f91-3f12-448c-b65f-20123e9e9e8c"
22setup = """## Setup
23
24This rule requires data coming in from one of the following integrations:
25- Elastic Defend
26- Auditbeat
27
28### Elastic Defend Integration Setup
29Elastic 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.
30
31#### Prerequisite Requirements:
32- Fleet is required for Elastic Defend.
33- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
34
35#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
36- Go to the Kibana home page and click "Add integrations".
37- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
38- Click "Add Elastic Defend".
39- Configure the integration name and optionally add a description.
40- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
41- 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).
42- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
43- 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.
44For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
45- Click "Save and Continue".
46- 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.
47For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
48
49### Auditbeat Setup
50Auditbeat 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.
51
52#### The following steps should be executed in order to add the Auditbeat on a Linux System:
53- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
54- 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).
55- 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).
56- 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).
57- 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).
58
59#### Custom Ingest Pipeline
60For 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).
61"""
62severity = "medium"
63tags = [
64 "Domain: Endpoint",
65 "OS: Linux",
66 "Use Case: Threat Detection",
67 "Tactic: Defense Evasion",
68 "Data Source: Elastic Endgame",
69 "Data Source: Elastic Defend",
70]
71timestamp_override = "event.ingested"
72type = "eql"
73
74query = '''
75file where host.os.type == "linux" and event.type == "creation" and file.extension == "so" and file.name : ".*.so" and
76not process.name == "dockerd"
77'''
78
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82[[rule.threat.technique]]
83id = "T1564"
84name = "Hide Artifacts"
85reference = "https://attack.mitre.org/techniques/T1564/"
86[[rule.threat.technique.subtechnique]]
87id = "T1564.001"
88name = "Hidden Files and Directories"
89reference = "https://attack.mitre.org/techniques/T1564/001/"
90
91
92
93[rule.threat.tactic]
94id = "TA0005"
95name = "Defense Evasion"
96reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- Attempt to Clear Kernel Ring Buffer
- Base16 or Base32 Encoding/Decoding Activity
- ESXI Timestomping using Touch Command
- Executable Masquerading as Kernel Process
- File Deletion via Shred