Detection rules for Debian Family Data sources. Every rule contains its MITRE ATT&CK mapping, an impact rating, and details on what it identifies.

This category lists 17 detection rules.

RuleCategoryTechniqueImpact (C/I/A)
Audit or Logging Service DisabledDefense EvasionT1562.001 - Impair Defenses: Disable or Modify ToolsC:2 / I:3 / A:3
Container Escape Technique DetectedPrivilege EscalationT1611 - Escape to HostC:3 / I:3 / A:3
Crontab Persistence Mechanism DetectedPersistenceT1053.003 - Scheduled Task/Job: CronC:2 / I:3 / A:2
Debian-Specific Kernel Exploit AttemptsPrivilege EscalationT1068 - Exploitation for Privilege EscalationC:3 / I:3 / A:3
Debian-Specific RootkitsDefense EvasionT1014 - RootkitC:3 / I:3 / A:3
Kernel Exploit Indicators DetectedPrivilege EscalationT1068 - Exploitation for Privilege EscalationC:3 / I:3 / A:3
LD_PRELOAD Hijacking DetectedPersistenceT1574.006 - Hijack Execution Flow: Dynamic Linker HijackingC:3 / I:3 / A:2
Process Masquerading DetectedDefense EvasionT1036.004 - Masquerading: Masquerade Task or ServiceC:2 / I:3 / A:1
Reverse Shell Execution DetectedExecutionT1059.004 - Command and Scripting Interpreter: Unix ShellC:3 / I:3 / A:3
SSH Authorized Keys ModificationPersistenceT1098.004 - Account Manipulation: SSH Authorized KeysC:3 / I:3 / A:1
SSH Tunneling or Port Forwarding DetectedCommand and ControlT1572 - Protocol TunnelingC:3 / I:2 / A:1
SUID/SGID Binary Creation DetectedPrivilege EscalationT1548.001 - Abuse Elevation Control Mechanism: Setuid and SetgidC:3 / I:3 / A:2
Shell RC File Modification for PersistencePersistenceT1546.004 - Event Triggered Execution: Unix Shell Configuration ModificationC:2 / I:3 / A:1
Suspicious Binary Execution from Temporary DirectoryExecutionT1059.004 - Command and Scripting Interpreter: Unix ShellC:3 / I:3 / A:2
Systemd Timer Persistence MechanismPersistenceT1053.003 - Scheduled Task/Job: CronC:2 / I:3 / A:2
Unauthorized /etc/shadow or /etc/passwd AccessCredential AccessT1003.008 - OS Credential Dumping: /etc/passwd and /etc/shadowC:3 / I:3 / A:1
eBPF Rootkit Activity DetectedDefense EvasionT1014 - RootkitC:3 / I:3 / A:3

Rule Example

Below is an example of a rule definition for Audit or Logging Service Disabled (view in repository):

# Rule version v1.0.0

dataTypes:
  - linux
name: Audit or Logging Service Disabled
impact:
  confidentiality: 2
  integrity: 3
  availability: 3
category: Defense Evasion
technique: "T1562.001 - Impair Defenses: Disable or Modify Tools"
adversary: origin
references:
  - https://attack.mitre.org/techniques/T1562/001/
description: |
  Detects attempts to stop or disable audit and logging services (auditd, rsyslog, syslog-ng, journald) which attackers do to prevent their activities from being recorded.

  Next Steps:
  1. Immediately investigate the host where logging was disabled
  2. Identify the user account that stopped the service
  3. Restart the logging service and verify log integrity
  4. Review any gap in logging for potential attack evidence
  5. Check for other defense evasion techniques on the host
  6. Investigate the attack chain that led to disabling logging
where: |
  (contains("log.message", "systemctl") || contains("log.message", "service")) &&
  (contains("log.message", "stop") || contains("log.message", "disable") ||
   contains("log.message", "mask") || contains("log.message", "kill")) &&
  (contains("log.message", "auditd") || contains("log.message", "rsyslog") ||
   contains("log.message", "syslog-ng") || contains("log.message", "journald") ||
   contains("log.message", "syslog")) &&
  !(contains("log.message", "restart") || contains("log.message", "reload"))
groupBy:
  - origin.host
  - origin.user

Rule Details

Audit or Logging Service Disabled

Identifies efforts to halt or turn off audit and logging daemons (auditd, rsyslog, syslog-ng, journald), a tactic attackers use so their actions are not logged.

Container Escape Technique Detected

Identifies container escape methods such as accessing the Docker socket from inside a container, nsenter-based escapes, abuse of cgroups release_agent, and breakouts from privileged containers.

Crontab Persistence Mechanism Detected

Identifies changes to crontab, new files in /etc/cron.d/, or creation of at jobs that could point to attacker-installed persistence. Threat actors often leverage cron jobs to keep access or run malicious payloads on a schedule.

Debian-Specific Kernel Exploit Attempts

Identifies possible kernel exploitation targeting Debian systems, covering Dirty COW variants, overlayfs exploits, namespace escapes, and other signs of kernel vulnerability abuse. This rule watches for kernel crashes, segmentation faults, exploit attempts, and other unusual kernel behavior that could signal exploitation in progress.

Debian-Specific Rootkits

Identifies signs of known Debian/Linux rootkits, such as file changes, concealed processes, network backdoors, and kernel module tampering often observed in Debian environments. This rule spots several rootkit behaviors, including unauthorized changes to system binaries, kernel module loading, hidden processes, and suspicious network activity.

Kernel Exploit Indicators Detected

Identifies evidence of kernel exploitation, such as known artifacts from Dirty Pipe (CVE-2022-0847), Dirty COW (CVE-2016-5195), OverlayFS exploits, and other kernel privilege escalation flaws.

LD_PRELOAD Hijacking Detected

Changes to the LD_PRELOAD environment variable or /etc/ld.so.preload are detected; attackers use these to load malicious shared libraries into every process, achieving persistence and credential interception.

Process Masquerading Detected

Identifies processes that try to pass as legitimate system processes by changing their names via /proc/self/comm or adopting deceptive process names. This tactic is employed to avoid detection.

Reverse Shell Execution Detected

Identifies typical reverse shell activity, such as bash TCP redirection, Python socket connections, netcat listeners with execute flags, and socat reverse shells. These patterns strongly suggest an active compromise.

SSH Authorized Keys Modification

Monitors for alterations to SSH authorized_keys files, through which attackers establish persistent access by inserting their own public keys into user accounts.

SSH Tunneling or Port Forwarding Detected

Identifies SSH local, remote, or dynamic port forwarding, which attackers abuse to tunnel traffic through compromised hosts, circumvent network segmentation, and exfiltrate data.

SUID/SGID Binary Creation Detected

Identifies executable files that have SUID or SGID bits assigned via chmod. Attackers employ this method to create binaries that execute with elevated privileges, enabling privilege escalation.

Shell RC File Modification for Persistence

Identifies changes to shell configuration files (.bashrc, .bash_profile, /etc/profile.d/) that attackers leverage for persistence by placing malicious commands that run in every shell session.

Suspicious Binary Execution from Temporary Directory

Identifies binaries executed from temporary directories (/tmp, /dev/shm, /var/tmp), a common tactic malware and attackers use after initial compromise to stage and launch payloads.

Systemd Timer Persistence Mechanism

Identifies the creation or alteration of systemd timer units, which can serve as a persistence mechanism. Systemd timers offer a cron alternative and can run commands on a schedule.

Unauthorized /etc/shadow or /etc/passwd Access

Identifies unauthorized access to /etc/shadow or suspicious changes to /etc/passwd, potentially signaling credential harvesting or account manipulation by an attacker.

eBPF Rootkit Activity Detected

Identifies the loading of malicious eBPF programs, which can enable rootkit capabilities, intercept network traffic, and hide processes. eBPF-based rootkits run at the kernel level and are hard to detect.