Detection rules › Elastic
System Binary Proxy Execution via ld.so
This rule detects the execution of a binary through the ld.so dynamic linker. Attackers may use this technique to execute binaries while attempting to evade detection.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Rule body
[rule]
description = """
This rule detects the execution of a binary through the ld.so dynamic linker. Attackers may use this technique to
execute binaries while attempting to evade detection.
"""
id = "10cb6563-35a9-45b7-a394-e7bca6fd5bed"
license = "Elastic License v2"
name = "System Binary Proxy Execution via ld.so"
os_list = ["linux"]
reference = ["https://gtfobins.github.io/gtfobins/ld.so/"]
version = "1.0.7"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable like (
"/lib/ld-linux*.so*", "/lib64/ld-linux*.so*", "/usr/lib/ld-linux*.so*", "/usr/lib64/ld-linux*.so*"
) and not (
process.executable in ("/usr/bin/uptime", "/usr/bin/xkbcomp") or
process.parent.command_line like ("*/home/*/JetBrains/*", "*/snap/intellij-idea-ultimate*") or
process.command_line like "sh -c*/usr/bin/xkbcomp*" or
process.working_directory like ("/users/*/.cache/JetBrains/*", "/var/tmp/mkinitramfs*", "/home/adoagent") or
process.command_line == "/usr/bin/python3.9 -V" or
process.args like "/users/*/.cache/JetBrains/*"
)
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.parent.executable like (
"/lib/ld-linux*.so*", "/lib64/ld-linux*.so*", "/usr/lib/ld-linux*.so*", "/usr/lib64/ld-linux*.so*"
) and not (
process.executable in ("/usr/bin/uptime", "/usr/bin/xkbcomp") or
process.parent.command_line like ("*/home/*/JetBrains/*", "*/snap/intellij-idea-ultimate*") or
process.command_line like "sh -c*/usr/bin/xkbcomp*" or
process.working_directory like ("/users/*/.cache/JetBrains/*", "/var/tmp/mkinitramfs*", "/home/adoagent") or
process.command_line == "/usr/bin/python3.9 -V" or
process.args like "/users/*/.cache/JetBrains/*"
)
Exclusions
The rule actively suppresses these predicates.
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard |