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 = "2023/11/02" 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 = """ 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 64""" 65severity = "medium" 66tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"] 67timestamp_override = "event.ingested" 68type = "eql" 69 70query = ''' 71file where host.os.type == "linux" and event.type == "creation" and file.extension == "so" and file.name : ".*.so" 72''' 73 74 75[[rule.threat]] 76framework = "MITRE ATT&CK" 77[[rule.threat.technique]] 78id = "T1564" 79name = "Hide Artifacts" 80reference = "https://attack.mitre.org/techniques/T1564/" 81[[rule.threat.technique.subtechnique]] 82id = "T1564.001" 83name = "Hidden Files and Directories" 84reference = "https://attack.mitre.org/techniques/T1564/001/" 85 86 87 88[rule.threat.tactic] 89id = "TA0005" 90name = "Defense Evasion" 91reference = "https://attack.mitre.org/tactics/TA0005/"
- Attempt to Disable Syslog Service
- Base16 or Base32 Encoding/Decoding Activity
- File made Immutable by Chattr
- Kernel Module Removal
- Potential Disabling of SELinux