Deprecated - CAP_SYS_ADMIN Assigned to Binary

Identifies instances where a binary is granted the CAP_SYS_ADMIN capability. In Linux, the CAP_SYS_ADMIN capability is a powerful and broad capability that allows a process to perform a range of system administration operations, such as mounting and unmounting filesystems, configuring network interfaces, and accessing hardware devices. Attackers may leverage a misconfiguration for exploitation in order to escalate their privileges to root. The rule identifies previously unknown processes executing with CAP_SYS_ADMIN capabilities through the use of the new terms rule type.

Elastic rule (View on GitHub)

 1[metadata]
 2bypass_bbr_timing = true
 3creation_date = "2024/01/10"
 4deprecation_date = "2026/02/04"
 5integration = ["endpoint"]
 6maturity = "deprecated"
 7updated_date = "2026/02/04"
 8
 9[rule]
10author = ["Elastic"]
11building_block_type = "default"
12description = """
13Identifies instances where a binary is granted the CAP_SYS_ADMIN capability. In Linux, the CAP_SYS_ADMIN capability is a
14powerful and broad capability that allows a process to perform a range of system administration operations, such as
15mounting and unmounting filesystems, configuring network interfaces, and accessing hardware devices. Attackers may
16leverage a misconfiguration for exploitation in order to escalate their privileges to root. The rule identifies
17previously unknown processes executing with CAP_SYS_ADMIN capabilities through the use of the new terms rule type.
18"""
19from = "now-9m"
20index = ["logs-endpoint.events.*"]
21language = "kuery"
22license = "Elastic License v2"
23name = "Deprecated - CAP_SYS_ADMIN Assigned to Binary"
24risk_score = 21
25rule_id = "a577e524-c2ee-47bd-9c5b-e917d01d3276"
26setup = """## Setup
27
28
29This rule requires data coming in from Elastic Defend.
30
31### Elastic Defend Integration Setup
32Elastic 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.
33
34#### Prerequisite Requirements:
35- Fleet is required for Elastic Defend.
36- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
37
38#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
39- Go to the Kibana home page and click "Add integrations".
40- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
41- Click "Add Elastic Defend".
42- Configure the integration name and optionally add a description.
43- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
44- 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).
45- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
46- 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.
47For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
48- Click "Save and Continue".
49- 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.
50For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
51"""
52severity = "low"
53tags = [
54    "Domain: Endpoint",
55    "OS: Linux",
56    "Use Case: Threat Detection",
57    "Tactic: Persistence",
58    "Data Source: Elastic Defend",
59    "Rule Type: BBR",
60]
61timestamp_override = "event.ingested"
62type = "new_terms"
63
64query = '''
65event.category:"process" and host.os.type:"linux" and event.type:"start" and event.action:"exec" and process.name:* and
66(process.thread.capabilities.effective:"CAP_SYS_ADMIN" or process.thread.capabilities.permitted:"CAP_SYS_ADMIN") and
67not user.id:"0"
68'''
69
70
71[[rule.threat]]
72framework = "MITRE ATT&CK"
73
74[rule.threat.tactic]
75id = "TA0003"
76name = "Persistence"
77reference = "https://attack.mitre.org/tactics/TA0003/"
78
79[rule.new_terms]
80field = "new_terms_fields"
81value = ["agent.id", "user.id", "process.executable"]
82[[rule.new_terms.history_window_start]]
83field = "history_window_start"
84value = "now-5d"

Related rules

to-top