Detection rules › Sigma

Enable BPF Kprobes Tracing

Status
test
Severity
medium
Log source
product linux, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects common command used to enable bpf kprobes tracing

MITRE ATT&CK coverage

TacticTechniques
ExecutionNo specific technique
StealthNo specific technique

Event coverage

Rule body yaml

title: Enable BPF Kprobes Tracing
id: 7692f583-bd30-4008-8615-75dab3f08a99
status: test
description: Detects common command used to enable bpf kprobes tracing
references:
    - https://embracethered.com/blog/posts/2021/offensive-bpf-bpftrace/
    - https://bpftrace.org/
    - https://www.kernel.org/doc/html/v5.0/trace/kprobetrace.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-25
tags:
    - attack.execution
    - attack.stealth
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        CommandLine|contains|all:
            - 'echo 1 >'
            - '/sys/kernel/debug/tracing/events/kprobes/'
        CommandLine|contains:
            - '/myprobe/enable'
            - '/myretprobe/enable'
    condition: selection
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains|all:
        - 'echo 1 >'
        - '/sys/kernel/debug/tracing/events/kprobes/'
    CommandLine|contains:
        - '/myprobe/enable'
        - '/myretprobe/enable'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • /myprobe/enable
  • /myretprobe/enable
  • /sys/kernel/debug/tracing/events/kprobes/
  • echo 1 >