Modification of Dynamic Linker Preload Shared Object

Identifies modification of the dynamic linker preload shared object (ld.so.preload). Adversaries may execute malicious payloads by hijacking the dynamic linker used to load libraries.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2021/01/27"
  3integration = ["endpoint"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies modification of the dynamic linker preload shared object (ld.so.preload). Adversaries may execute malicious
 11payloads by hijacking the dynamic linker used to load libraries.
 12"""
 13from = "now-9m"
 14index = ["auditbeat-*", "logs-endpoint.events.*", "endgame-*"]
 15language = "kuery"
 16license = "Elastic License v2"
 17name = "Modification of Dynamic Linker Preload Shared Object"
 18references = [
 19    "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang",
 20]
 21risk_score = 47
 22rule_id = "717f82c2-7741-4f9b-85b8-d06aeb853f4f"
 23setup = """## Setup
 24
 25This rule requires data coming in from one of the following integrations:
 26- Elastic Defend
 27- Auditbeat
 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
 50### Auditbeat Setup
 51Auditbeat 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.
 52
 53#### The following steps should be executed in order to add the Auditbeat on a Linux System:
 54- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
 55- 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).
 56- 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).
 57- 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).
 58- 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).
 59"""
 60severity = "medium"
 61tags = [
 62    "Domain: Endpoint",
 63    "OS: Linux",
 64    "Use Case: Threat Detection",
 65    "Tactic: Privilege Escalation",
 66    "Data Source: Elastic Endgame",
 67    "Data Source: Elastic Defend",
 68]
 69timestamp_override = "event.ingested"
 70type = "new_terms"
 71
 72query = '''
 73host.os.type:linux and event.category:file and event.action:(updated or renamed or rename or file_rename_event) and 
 74not event.type:deletion and file.path:/etc/ld.so.preload and not process.name:(wine or oneagentinstallaction)
 75'''
 76
 77
 78[[rule.threat]]
 79framework = "MITRE ATT&CK"
 80[[rule.threat.technique]]
 81id = "T1574"
 82name = "Hijack Execution Flow"
 83reference = "https://attack.mitre.org/techniques/T1574/"
 84[[rule.threat.technique.subtechnique]]
 85id = "T1574.006"
 86name = "Dynamic Linker Hijacking"
 87reference = "https://attack.mitre.org/techniques/T1574/006/"
 88
 89
 90
 91[rule.threat.tactic]
 92id = "TA0004"
 93name = "Privilege Escalation"
 94reference = "https://attack.mitre.org/tactics/TA0004/"
 95
 96[rule.new_terms]
 97field = "new_terms_fields"
 98value = ["host.id", "user.id", "process.executable"]
 99[[rule.new_terms.history_window_start]]
100field = "history_window_start"
101value = "now-10d"

References

Related rules

to-top