Skip to content
78 changes: 78 additions & 0 deletions rules/linux/discovery_suspicious_proc_pid_syscall_read.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[metadata]
creation_date = "2026/08/25"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/08/25"

[rule]
author = ["Elastic"]
description = """
This rule detects command lines that reference another process or thread's procfs syscall file. The
"/proc/<pid>/syscall" interface exposes the current syscall arguments, stack pointer, and instruction
pointer, which can support process discovery and preparation for process injection. Self and thread-self
aliases are excluded.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
Comment thread
Aegrah marked this conversation as resolved.
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Suspicious Reading of procfs Syscall File"
references = [
"https://man7.org/linux/man-pages/man5/proc_pid_syscall.5.html",
"https://www.akamai.com/blog/security-research/the-definitive-guide-to-linux-process-injection"
]
risk_score = 47
rule_id = "6327bdae-4dc4-4e2e-b29d-3fd100af522c"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Linux",
Comment thread
Aegrah marked this conversation as resolved.
"Platform: Linux",
"Use Case: Threat Detection",
"Tactic: Discovery",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Crowdstrike",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
(
process.name in (
"cat", "less", "more", "head", "tail", "nano", "vi", "vim", "strings", "nvim", "vim.basic",
"vim.tiny", "od", "hexdump", "xxd", "hx", "hexedit", "pager", "tr"
) or
(
process.name in (
"find", "awk", "gawk", "mawk", "nawk", "grep", "fgrep", "rgrep", "xargs", "sed", "tee"
) and
process.args_count <= 20
)
) and
process.command_line like "*/proc/*/syscall*" and
not (
process.command_line like ("*/proc/self/syscall*", "*/proc/thread-self/syscall*") or
process.args like "/proc/*/syscall/comm"
)
Comment thread
Aegrah marked this conversation as resolved.
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[rule.threat.tactic]
name = "Discovery"
id = "TA0007"
reference = "https://attack.mitre.org/tactics/TA0007/"

[[rule.threat.technique]]
name = "Process Discovery"
id = "T1057"
reference = "https://attack.mitre.org/techniques/T1057/"
84 changes: 84 additions & 0 deletions rules/linux/persistence_binfmt_configuration_file_creation.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[metadata]
creation_date = "2026/08/25"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/08/25"

[rule]
author = ["Elastic"]
description = """
This rule detects the creation of a binfmt configuration file. Binfmt is a utility that is used to
configure the behavior of the Linux kernel when executing binary files. By creating a malicious
binfmt configuration file, threat actors can execute a backdoor script or command on the target system.
"""
from = "now-9m"
index = ["logs-endpoint.events.file*"]
language = "eql"
license = "Elastic License v2"
name = "Binfmt Configuration File Creation"
references = ["https://dfir.ch/posts/today_i_learned_binfmt_misc/"]
risk_score = 21
rule_id = "a3b47d21-20d6-45b0-8b75-fc27073bdef2"
setup = """## Setup

This rule requires data coming in from Elastic Defend.

### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.

#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).

#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
Comment thread
Aegrah marked this conversation as resolved.
"Platform: Linux",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Data Source: Elastic Defend",
Comment thread
Copilot marked this conversation as resolved.
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where host.os.type == "linux" and event.action != "deletion" and process.executable != null and
Comment thread
Aegrah marked this conversation as resolved.
file.path like (
"/etc/binfmt.d/*.conf", "/run/binfmt.d/*.conf", "/usr/local/lib/binfmt.d/*.conf", "/usr/lib/binfmt.d/*.conf",
"/proc/sys/fs/binfmt_misc/register", "/proc/sys/fs/binfmt_misc/*"
) and
not (
file.path like (
"/usr/lib/binfmt.d/python3.*.conf", "/usr/lib/binfmt.d/qemu-*-static.conf",
"/proc/sys/fs/binfmt_misc/status"
) or
process.executable == "/usr/lib/systemd/systemd-binfmt"
)
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Loading