BPF Program Tampering via bpftool

Last updated 5 days ago on 2026-02-20
Created 5 days ago on 2026-02-20

About

Detects execution of bpftool commands used to detach eBPF programs or links, or to delete or modify eBPF maps. These actions can disable, alter, or interfere with kernel-level instrumentation and enforcement mechanisms implemented through eBPF. In environments relying on eBPF-based networking, observability, or security controls, unexpected use of these operations may indicate defense evasion or runtime tampering.
Tags
Domain: EndpointOS: LinuxUse Case: Threat DetectionTactic: Defense EvasionThreat: RootkitData Source: Elastic EndgameData Source: Elastic DefendData Source: Auditd ManagerData Source: SentinelOneData Source: CrowdstrikeLanguage: eql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Defense Evasion (TA0005)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
auditbeat-*endgame-*logs-auditd_manager.auditd-*logs-endpoint.events.process*logs-sentinel_one_cloud_funnel.*logs-crowdstrike.fdr*
Related Integrations

endpoint(external, opens in a new tab or window)

auditd_manager(external, opens in a new tab or window)

sentinel_one_cloud_funnel(external, opens in a new tab or window)

crowdstrike(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and process.name == "bpftool" and ( (process.args == "prog" and process.args == "detach") or (process.args == "map" and process.args in ("delete", "update")) or (process.args == "link" and process.args == "detach") )

Install detection rules in Elastic Security

Detect BPF Program Tampering via bpftool in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).