2023-10-23 17:18:48 +02:00
|
|
|
[metadata]
|
|
|
|
|
creation_date = "2023/09/04"
|
2024-03-07 12:35:33 +01:00
|
|
|
integration = ["endpoint", "auditd_manager"]
|
2023-10-23 17:18:48 +02:00
|
|
|
maturity = "production"
|
2024-10-18 16:55:09 +02:00
|
|
|
updated_date = "2024/10/18"
|
2023-10-23 17:18:48 +02:00
|
|
|
|
|
|
|
|
[rule]
|
|
|
|
|
author = ["Elastic"]
|
|
|
|
|
description = """
|
2024-05-23 00:45:10 +05:30
|
|
|
This rule monitors for inter-process communication via Unix sockets. Adversaries may attempt to communicate with local
|
|
|
|
|
Unix sockets to enumerate application details, find vulnerabilities/configuration mistakes and potentially escalate
|
|
|
|
|
privileges or set up malicious communication channels via Unix sockets for inter-process communication to attempt to
|
|
|
|
|
evade detection.
|
2023-10-23 17:18:48 +02:00
|
|
|
"""
|
|
|
|
|
from = "now-9m"
|
2024-03-07 12:35:33 +01:00
|
|
|
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
|
2023-10-23 17:18:48 +02:00
|
|
|
language = "eql"
|
|
|
|
|
license = "Elastic License v2"
|
|
|
|
|
name = "Unix Socket Connection"
|
|
|
|
|
risk_score = 21
|
|
|
|
|
rule_id = "41284ba3-ed1a-4598-bfba-a97f75d9aba2"
|
|
|
|
|
severity = "low"
|
2024-03-07 12:35:33 +01:00
|
|
|
tags = [
|
2024-05-23 00:45:10 +05:30
|
|
|
"Domain: Endpoint",
|
|
|
|
|
"OS: Linux",
|
|
|
|
|
"Use Case: Threat Detection",
|
|
|
|
|
"Tactic: Execution",
|
|
|
|
|
"Data Source: Elastic Defend",
|
|
|
|
|
"Data Source: Elastic Endgame",
|
|
|
|
|
"Data Source: Auditd Manager",
|
|
|
|
|
]
|
2023-10-23 17:18:48 +02:00
|
|
|
timestamp_override = "event.ingested"
|
|
|
|
|
type = "eql"
|
|
|
|
|
query = '''
|
2024-03-13 10:11:21 +01:00
|
|
|
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
|
|
|
|
|
and (
|
2023-10-23 17:18:48 +02:00
|
|
|
(process.name in ("nc", "ncat", "netcat", "nc.openbsd") and
|
|
|
|
|
process.args == "-U" and process.args : ("/usr/local/*", "/run/*", "/var/run/*")) or
|
|
|
|
|
(process.name == "socat" and
|
|
|
|
|
process.args == "-" and process.args : ("UNIX-CLIENT:/usr/local/*", "UNIX-CLIENT:/run/*", "UNIX-CLIENT:/var/run/*"))
|
2024-10-18 16:55:09 +02:00
|
|
|
) and
|
|
|
|
|
not process.args == "/var/run/libvirt/libvirt-sock"
|
2023-10-23 17:18:48 +02:00
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
[[rule.threat]]
|
|
|
|
|
framework = "MITRE ATT&CK"
|
2024-10-18 16:55:09 +02:00
|
|
|
|
2023-10-23 17:18:48 +02:00
|
|
|
[[rule.threat.technique]]
|
|
|
|
|
id = "T1559"
|
|
|
|
|
name = "Inter-Process Communication"
|
|
|
|
|
reference = "https://attack.mitre.org/techniques/T1559/"
|
|
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
|
|
|
id = "TA0002"
|
|
|
|
|
name = "Execution"
|
|
|
|
|
reference = "https://attack.mitre.org/tactics/TA0002/"
|