Detection rules › Elastic
Dylib Load via SSH-Keygen
Detects when the ssh-keygen binary is executed with the -D argument which can be used to load a malicious dylib into memory.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule body
[rule]
description = """
Detects when the ssh-keygen binary is executed with the -D argument which can be used to load a malicious dylib into
memory.
"""
id = "53a6460a-a204-42e0-9c92-c3bef161b6c1"
license = "Elastic License v2"
name = "Dylib Load via SSH-Keygen"
os_list = ["macos"]
reference = ["https://medium.com/@D00MFist/generate-keys-or-generate-dylib-loads-c99ed48f323d"]
version = "1.0.9"
query = '''
process where event.type == "start" and process.name == "ssh-keygen" and process.args == "-D"
'''
min_endpoint_version = "8.10.2"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.2"
Stages and Predicates
Stage 1: process
process where event.type == "start" and process.name == "ssh-keygen" and process.args == "-D"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq value:"-D" |
process.name | eq |
| field:"process_name" kind:eq value:"ssh-keygen" |