Detection rules › Elastic

Dylib Load via SSH-Keygen

Source
github.com/elastic/protections-artifacts

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

TacticTechniques
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.