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

This category lists 22 detection rules.

RuleCategoryTechniqueImpact (C/I/A)
System Linux: A user has been added to the administrators groupPrivilege EscalationT1484 - Domain Policy ModificationC:3 / I:3 / A:2
System Linux: Attempt to Disable Syslog ServiceDefense EvasionT1562.001 - Impair DefensesC:1 / I:2 / A:3
System Linux: BPF filter applied using TCExecutionT1059.004 - Command and Scripting InterpreterC:2 / I:3 / A:3
System Linux: File Deletion via ShredDefense EvasionT1070.004 - Indicator RemovalC:1 / I:2 / A:3
System Linux: File Transfer or Listener Established via NetcatExecutionT1059.004 - Command and Scripting InterpreterC:1 / I:2 / A:3
System Linux: File made Immutable by ChattrDefense EvasionT1222 - File and Directory Permissions ModificationC:1 / I:2 / A:3
System Linux: Hping Process ActivityDiscoveryT1082 - System Information DiscoveryC:1 / I:1 / A:2
System Linux: Interactive Terminal Spawned via PerlExecutionT1059 - Command and Scripting InterpreterC:2 / I:3 / A:2
System Linux: Interactive Terminal Spawned via PythonExecutionT1059 - Command and Scripting InterpreterC:3 / I:2 / A:3
System Linux: Kernel Module RemovalDefense EvasionT1562.001 - Impair DefensesC:1 / I:3 / A:3
System Linux: Kernel module load via insmodPersistenceT1547.006 - Boot or Logon Autostart ExecutionC:3 / I:3 / A:3
System Linux: Modification of OpenSSH BinariesPersistenceT1543 - Create or Modify System ProcessC:3 / I:3 / A:2
System Linux: Namespace Manipulation Using UnsharePrivilege EscalationT1543 - Create or Modify System ProcessC:3 / I:3 / A:2
System Linux: Nping Process ActivityDiscoveryT1046 - Network Service DiscoveryC:1 / I:1 / A:2
System Linux: Persistence via KDE AutoStart Script or Desktop File ModificationPersistenceT1547 - Boot or Logon Autostart ExecutionC:2 / I:2 / A:3
System Linux: Possible Brute Force AttackCredential AccessT1110 - Brute ForceC:2 / I:2 / A:3
System Linux: Potential DNS Tunneling via IodineCommand and ControlT1572 - Protocol TunnelingC:3 / I:2 / A:2
System Linux: Potential Disabling of SELinuxDefense EvasionT1562.001 - Impair DefensesC:1 / I:2 / A:3
System Linux: Potential Privilege Escalation via PKEXECPrivilege EscalationT1068 - Exploitation for Privilege EscalationC:2 / I:3 / A:3
System Linux: Potential Protocol Tunneling via EarthWormCommand and ControlT1572 - Protocol TunnelingC:3 / I:3 / A:2
System Linux: Reverse Shell Created via Named PipeExecutionT1059.004 - Command and Scripting InterpreterC:3 / I:2 / A:3
System Linux: System Log File DeletionDefense EvasionT1070.002 - Indicator RemovalC:3 / I:3 / A:3

Rule Example

Below is an example of a rule definition for System Linux: A user has been added to the administrators group (view in repository):

# Rule version v1.0.0

dataTypes:
  - linux
name: "System Linux: A user has been added to the administrators group"
impact:
  confidentiality: 3
  integrity: 3
  availability: 2
category: "Privilege Escalation"
technique: "T1484 - Domain Policy Modification"
adversary: origin
description: "Detects when a user has been added to the administrators group (sudo) on a Linux system."
references:
  - "https://attack.mitre.org/tactics/TA0004"
  - "https://attack.mitre.org/techniques/T1484/"
where: regexMatch("log.message", "(((adduser|useradd|usermod)(.+)([Aa]dded user|new user|add)(.+)to(.+)group)(.+)sudo)") && contains("log.message", "usermod -aG sudo")
groupBy:
  - origin.ip
  - origin.user

Rule Details

System Linux: A user has been added to the administrators group

Identifies the addition of a user to the sudo administrators group on a Linux system.

System Linux: Attempt to Disable Syslog Service

Adversaries may try to turn off the syslog service to interrupt event logging and avoid detection by security controls.

System Linux: BPF filter applied using TC

Detects use of the tc (transmission control) binary to set a BPF (Berkeley Packet Filter) on a network interface. Tc configures Traffic Control in the Linux kernel and can shape, schedule, police, and drop traffic. A threat actor can use tc to set a BPF filter on an interface to manipulate incoming traffic. This technique is highly uncommon and should signal abnormal, suspicious, or malicious activity.

System Linux: File Deletion via Shred

Files that malware or an adversary drops or creates on a system can leave evidence about what was done in a network and how. Adversaries may delete these files during an intrusion to minimize their footprint, or remove them afterward as part of post-intrusion cleanup.

System Linux: File Transfer or Listener Established via Netcat

A netcat process is conducting network activity on a Linux host. Netcat is frequently used for persistence by exporting a reverse shell or by serving a shell on a listening port. Netcat is also occasionally used to exfiltrate data.

System Linux: File made Immutable by Chattr

Detects when the chattr binary is used to make a file immutable. An immutable file cannot be deleted or renamed, no link can be created to it, most of its metadata cannot be changed, and it cannot be opened in write mode. Threat actors commonly do this to prevent tampering with or modification of their malicious files or system files they have altered for persistence.

System Linux: Hping Process Activity

Hping executed on a Linux host. Hping is a FOSS command-line packet analyzer that can craft network packets for many network security testing uses, such as scanning and firewall auditing.

System Linux: Interactive Terminal Spawned via Perl

Detects a terminal (tty) being spawned through Perl. After gaining initial access to a host, attackers may upgrade a simple reverse shell into a fully interactive tty.

System Linux: Interactive Terminal Spawned via Python

Detects a terminal (tty) being spawned through Python. After gaining initial access to a host, attackers may upgrade a simple reverse shell into a fully interactive tty.

System Linux: Kernel Module Removal

Kernel modules are code segments that can be loaded into and unloaded from the kernel as needed. They expand kernel functionality without requiring a system reboot. This rule detects attempts to remove a kernel module.

System Linux: Kernel module load via insmod

Detects use of the insmod binary to load a Linux kernel object file. If threat actors have root privileges, they can use this binary to load a rootkit on a system, giving them full control and the ability to hide from security products. Manually loading a kernel module this way is highly uncommon and can indicate suspicious or malicious behavior.

System Linux: Modification of OpenSSH Binaries

Adversaries may alter SSH-related binaries for persistence or credential access by patching sensitive functions to permit unauthorized access or by logging SSH credentials for exfiltration.

System Linux: Namespace Manipulation Using Unshare

Detects suspicious use of unshare to manipulate system namespaces. Unshare can be used to escalate privileges or break out of container security boundaries. Threat actors have used this binary to escape to the host and access other resources or elevate privileges.

System Linux: Nping Process Activity

This command may see some normal use from security engineers and network or server administrators, but such use is typically neither routine nor unannounced. Nping use by non-engineers or ordinary users is uncommon.

System Linux: Persistence via KDE AutoStart Script or Desktop File Modification

Identifies the creation or alteration of a K Desktop Environment (KDE) AutoStart script or desktop file that launches at every user logon. This mechanism can be abused by adversaries for persistence.

System Linux: Possible Brute Force Attack

Detects several failed SSH logins followed by a successful login from the same source address. Adversaries may try to log in to multiple users with a common or known password to gain account access.

System Linux: Potential DNS Tunneling via Iodine

Iodine is a tool that tunnels Internet protocol version 4 (IPV4) traffic over the DNS protocol to bypass firewalls, network security groups, and network access lists while evading detection.

System Linux: Potential Disabling of SELinux

Detects possible attempts to disable Security-Enhanced Linux (SELinux), a Linux kernel security feature that supports access control policies. Adversaries may disable security tools to avoid potential detection of their tools and activities.

System Linux: Potential Privilege Escalation via PKEXEC

Detects an attempt to exploit a local privilege escalation in polkit pkexec (CVE-2021-4034) through insecure environment variable injection. Successful exploitation lets an unprivileged user escalate to the root user.

System Linux: Potential Protocol Tunneling via EarthWorm

Detects execution of the EarthWorm tunneler. Adversaries may tunnel network communications to and from a victim system within a separate protocol to evade detection and network filtering, or to gain access to otherwise unreachable systems.

System Linux: Reverse Shell Created via Named Pipe

Identifies a reverse shell through named pipe abuse on Linux using OpenSSL or Netcat. First in, first out (FIFO) files are special files that Linux processes read from and write to. To make this work, a named pipe is created and supplied to a Linux shell in which a network connection tool such as Netcat or OpenSSL has been established. The network connection's stdout and stderr are captured by the named pipe and returned to the shell for execution.

System Linux: System Log File Deletion

Identifies the removal of sensitive Linux system logs. This can signal an effort to evade detection or eliminate forensic evidence on a system.