1200kmSECURITY RESEARCH

1200KM / sigma-rule

Clear or Disable Kernel Ring Buffer Logs via Syslog Syscall — Sigma Rule

Sigma rule eca5e022-d368-4043-98e5-9736fb01f72f. Clear or Disable Kernel Ring Buffer Logs via Syslog Syscall — Sigma Rule. Detects the use of the `syslog` syscall with action code 5 (SYSLOG_ACTION_CLEAR), (4 is SYSLOG_ACTION_READ_CLEAR and 6 is SYSLOG_ACTION_CONSOLE_OFF) which clears the kernel ring buffer (dmesg logs). This can be used by attackers to hide traces after exploitation or privilege escalation. A common technique is running `dmesg -c`, which triggers this syscall internally.

Rule metadata and linked tags

Author: Milad Cheraghi. Source status: experimental; severity: medium. Source dates: 2025-05-27 / 2025-12-05.

{
  "product": "linux",
  "service": "auditd",
  "definition": "Required auditd configuration:\n-a always,exit -F arch=b64 -S syslog -F a0=4 -k clear_dmesg_logs\n-a always,exit -F arch=b64 -S syslog -F a0=5 -k clear_dmesg_logs\n-a always,exit -F arch=b64 -S syslog -F a0=6 -k disable_dmesg_logs\n-a always,exit -F arch=b32 -S syslog -F a0=4 -k clear_dmesg_logs\n-a always,exit -F arch=b32 -S syslog -F a0=5 -k clear_dmesg_logs\n-a always,exit -F arch=b32 -S syslog -F a0=6 -k disable_dmesg_logs\n"
}

Pinned original Sigma rule · Detection Rule License 1.1

Source SHA-256: 4e01f4c621ab197a7005d223de57ee6431c6099449bbd4c6614c1df1e60795e8

Detection logic

Original source YAML. Source-tag agreement is not proof of complete semantic coverage. This rule has not been compiled for a SIEM backend or validated against live telemetry here.

title: Clear or Disable Kernel Ring Buffer Logs via Syslog Syscall
id: eca5e022-d368-4043-98e5-9736fb01f72f
status: experimental
description: |
    Detects the use of the `syslog` syscall with action code 5 (SYSLOG_ACTION_CLEAR),
    (4 is SYSLOG_ACTION_READ_CLEAR and 6 is SYSLOG_ACTION_CONSOLE_OFF) which clears the kernel
    ring buffer (dmesg logs). This can be used by attackers to hide traces after exploitation
    or privilege escalation. A common technique is running `dmesg -c`, which triggers this syscall internally.
references:
    - https://man7.org/linux/man-pages/man2/syslog.2.html
    - https://man7.org/linux/man-pages/man1/dmesg.1.html
author: Milad Cheraghi
date: 2025-05-27
modified: 2025-12-05
tags:
    - attack.defense-impairment
    - attack.t1685.006
logsource:
    product: linux
    service: auditd
    definition: |
        Required auditd configuration:
        -a always,exit -F arch=b64 -S syslog -F a0=4 -k clear_dmesg_logs
        -a always,exit -F arch=b64 -S syslog -F a0=5 -k clear_dmesg_logs
        -a always,exit -F arch=b64 -S syslog -F a0=6 -k disable_dmesg_logs
        -a always,exit -F arch=b32 -S syslog -F a0=4 -k clear_dmesg_logs
        -a always,exit -F arch=b32 -S syslog -F a0=5 -k clear_dmesg_logs
        -a always,exit -F arch=b32 -S syslog -F a0=6 -k disable_dmesg_logs
detection:
    selection:
        type: 'SYSCALL'
        SYSCALL: 'syslog'
        a0:
            - 4 # SYSLOG_ACTION_READ_CLEAR : Read and clear log
            - 5 # SYSLOG_ACTION_CLEAR: Clear kernel ring buffer (without reading)
            - 6 # SYSLOG_ACTION_CONSOLE_OFF: Disable logging to console
    condition: selection
falsepositives:
    - System administrators or scripts that intentionally clear logs
    - Debugging scripts
level: medium

Original YAML and metadata in JSON

False positives

  • System administrators or scripts that intentionally clear logs
  • Debugging scripts

Source references

Connected ecosystem references

Exact source-tagged techniques

Telemetry review

Read the original logsource above, then inspect the linked detection workspaces for technique-level sensor context. No per-rule telemetry equivalence is inferred.

Pinned research references. No browser attack runner, live simulation result or validated detector is asserted. Source mappings and validation limits are preserved. ATT&CK / Atomic provenance · Detection provenance.