
Summary
This detection rule targets a code injection technique leveraged by adversaries to execute malicious payloads on Linux systems through manipulation of the `ld.so.preload` file and related environment variables. Specifically, the dynamic linker, which is responsible for loading shared libraries during program execution, can be tricked by setting the `LD_PRELOAD` environment variable or modifying the `/etc/ld.so.preload` file to include paths pointing to malicious libraries. This tactic allows attackers to inject their code by having it loaded before the legitimate library with the same function name is executed, providing the adversary control over the anticipated functionalities of the application. The detection is based on monitoring and logging changes to the `ld.so.preload` file, which may indicate attempts at hijacking program execution flow to introduce unauthorized code. The logic provided employs Splunk queries to capture events related to this file modification, enabling the identification of potential malicious activities.
Categories
- Linux
Data Sources
- File
ATT&CK Techniques
- T1574.006
- T1574
Created: 2024-02-09