General

Detection rules for Linux (all distributions) data sources. Each rule includes its MITRE ATT&CK mapping, impact rating, and a description of what it detects. These rules analyze events with the data type linux, which the Linux Agent integration sends.

This category contains 43 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: Account Deleted or LockedImpactT1531 - Account Access RemovalC:0 / I:3 / A:2
System Linux: Account or Permission Group Discovery Command ExecutedDiscoveryT1087 - Account DiscoveryC:1 / I:0 / A:0
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: Base64 or OpenSSL Decode Command ExecutedDefense EvasionT1140 - Deobfuscate/Decode Files or InformationC:1 / I:1 / A:0
System Linux: Base64 or OpenSSL Decode Piped to a ShellDefense EvasionT1140 - Deobfuscate/Decode Files or InformationC:1 / I:3 / A:1
System Linux: Destructive Disk Wipe Command ExecutedImpactT1488 - Disk Content WipeC:0 / 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: Hidden File or Directory Created in a Staging PathDefense EvasionT1564.001 - Hide Artifacts: Hidden Files and DirectoriesC:1 / I:2 / A:0
System Linux: Hping Process ActivityDiscoveryT1082 - System Information DiscoveryC:1 / I:1 / A:2
System Linux: Installed Software Enumeration Command ExecutedDiscoveryT1518 - Software DiscoveryC:1 / I:0 / A:0
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: Known Cryptocurrency Miner Binary ExecutedImpactT1496 - Resource HijackingC:0 / I:1 / 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: Network Configuration or Connection Discovery Command ExecutedDiscoveryT1016 - System Network Configuration DiscoveryC:1 / I:0 / A:0
System Linux: Network Sniffing Tool ExecutedCredential AccessT1040 - Network SniffingC:3 / I:0 / A:0
System Linux: New Local Account CreatedPersistenceT1136 - Create AccountC:2 / I:3 / A:1
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: Process Discovery Command ExecutedDiscoveryT1057 - Process DiscoveryC:1 / I:0 / A:0
System Linux: Remote System/Network Scanning Tool ExecutedDiscoveryT1018 - Remote System DiscoveryC:1 / I:0 / A:1
System Linux: Reverse Shell Created via Named PipeExecutionT1059.004 - Command and Scripting InterpreterC:3 / I:2 / A:3
System Linux: Security Monitoring Service Stopped or DisabledDefense EvasionT1489 - Service StopC:2 / I:3 / A:2
System Linux: Sensitive Directory Archived via tar/zipCollectionT1560 - Archive Collected DataC:3 / I:0 / A:0
System Linux: Sensitive File/Directory Discovery via findDiscoveryT1083 - File and Directory DiscoveryC:2 / I:0 / A:0
System Linux: System Log File DeletionDefense EvasionT1070.002 - Indicator RemovalC:3 / I:3 / A:3
System Linux: System Service Discovery Command ExecutedDiscoveryT1007 - System Service DiscoveryC:1 / I:0 / A:0
System Linux: System Shutdown or Reboot Command ExecutedImpactT1529 - System Shutdown/RebootC:0 / I:0 / A:3
System Linux: Third-Party Remote Access Software ExecutedCommand and ControlT1219 - Remote Access SoftwareC:2 / I:2 / A:1
System Linux: Tool Downloaded to a Writable Directory via wget/curlCommand and ControlT1105 - Ingress Tool TransferC:2 / I:3 / A:1
System Linux: User/Owner Discovery Command ExecutedDiscoveryT1033 - System Owner/User DiscoveryC:1 / I:0 / A:0

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.1

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("origin.command", "(usermod.*-aG.*sudo|usermod.*-aG.*admin|gpasswd -a .* sudo|adduser .* sudo)")
deduplicateBy:
  - dataSource

Rule Details

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

Detects when a user has been added to the administrators group (sudo) on a Linux system.

System Linux: Account Deleted or Locked

Detects userdel or passwd -l/--lock, which remove or lock a local account. Can be legitimate offboarding, but is also used to deny a defender access during an active incident, or to remove evidence of an account an adversary created and no longer needs.

System Linux: Account or Permission Group Discovery Command Executed

Detects execution of commands used to enumerate local accounts and their group memberships (getent passwd, getent group, cat /etc/passwd, groups, cut against /etc/passwd). Common early reconnaissance to identify privileged accounts to target.

System Linux: Attempt to Disable Syslog Service

Adversaries may attempt to disable the syslog service in an attempt to an attempt to disrupt event logging and evade detection by security controls.

System Linux: BPF filter applied using TC

Detects when the tc (transmission control) binary is utilized to set a BPF (Berkeley Packet Filter) on a network interface. Tc is used to configure Traffic Control in the Linux kernel. It can shape, schedule, police and drop traffic. A threat actor can utilize tc to set a bpf filter on an interface for the purpose of manipulating the incoming traffic. This technique is not at all common and should indicate abnormal, suspicious or malicious activity.

System Linux: Base64 or OpenSSL Decode Command Executed

Detects a standalone base64 -d/--decode or openssl enc -d invocation. Low-confidence alone (routinely used by legitimate scripts, cert handling, CI/CD), but a useful triage building block. Exists as a separate, lower-severity rule from 'Base64 or OpenSSL Decode Piped to a Shell' because the native auditd collector emits one execve event per process in a pipeline -- 'X | base64 -d | bash' never puts 'bash' inside base64's own origin.command; only a single-process 'sh -c "...|bash"' compound invocation does. Modeled on SigmaHQ's proc_creation_lnx_base64_decode.yml (level: low).

System Linux: Base64 or OpenSSL Decode Piped to a Shell

Detects a base64 -d/--decode or openssl enc -d invocation whose command line also references a shell interpreter, consistent with decoding an obfuscated payload and executing it in one step -- a common one-liner pattern in droppers/loaders. Only fires for the single-process compound form (e.g. 'sh -c "...|base64 -d|bash"'), since the native auditd collector emits one execve event per process in a real shell pipeline and a piped 'base64 -d' alone never sees the downstream 'bash' in its own origin.command. See also 'Base64 or OpenSSL Decode Command Executed' (base64_openssl_decode_executed.yaml) for the standalone, lower-confidence variant that catches the common piped case.

System Linux: Destructive Disk Wipe Command Executed

Detects dd writing from /dev/zero or /dev/urandom to a block device, or wipefs/shred targeting a device path -- the signature move of a wiper/ransomware final stage, or a destructive attempt to eliminate forensic evidence at the disk level rather than the file level.

System Linux: File Deletion via Shred

Malware or other files dropped or created on a system by an adversary may leave traces behind as to what was done within a network and how. Adversaries may remove these files over the course of an intrusion to keep their footprint low or remove them at the end as part of the post-intrusion cleanup process.

System Linux: File Transfer or Listener Established via Netcat

A netcat process is engaging in network activity on a Linux host. Netcat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Netcat is also sometimes used for data exfiltration.

System Linux: File made Immutable by Chattr

Detects a file being made immutable using the chattr binary. Making a file immutable means it cannot be deleted or renamed, no link can be created to this file, most of the file is metadata can not be modified, and the file can not be opened in write mode. Threat actors will commonly utilize this to prevent tampering or modification of their malicious files or any system files they have modified for purposes of persistence

System Linux: Hidden File or Directory Created in a Staging Path

Detects touch/mkdir/mv/cp creating a dot-prefixed (hidden) file or directory under a common staging path (/tmp, /dev/shm, /var/tmp, a user's home directory), a simple but common way to keep a payload out of a casual ls listing.

System Linux: Hping Process Activity

Hping ran on a Linux host. Hping is a FOSS command-line packet analyzer and has the ability to construct network packets for a wide variety of network security testing applications, including scanning and firewall auditing.

System Linux: Installed Software Enumeration Command Executed

Detects dpkg -l or rpm -qa used to enumerate all installed packages, commonly run to identify exploitable software versions or the presence/absence of security tooling on the host.

System Linux: Interactive Terminal Spawned via Perl

Identifies when a terminal (tty) is spawned via Perl. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.

System Linux: Interactive Terminal Spawned via Python

Identifies when a terminal (tty) is spawned via Python. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.

System Linux: Kernel Module Removal

Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This rule identifies attempts to remove a kernel module.

System Linux: Kernel module load via insmod

Detects the use of the insmod binary to load a Linux kernel object file. Threat actors can use this binary, given they have root privileges, to load a rootkit on a system providing them with complete control and the ability to hide from security products. Manually loading a kernel module in this manner should not be at all common and can indicate suspcious or malicious behavior.

System Linux: Known Cryptocurrency Miner Binary Executed

Detects execution of well-known cryptomining binaries (xmrig, minerd, cpuminer, ccminer, cgminer, xmr-stak) or a command line referencing a common mining pool port/protocol (stratum+tcp). One of the most common outcomes of a successful Linux server compromise -- monetizing access via CPU/GPU cycles rather than data theft.

System Linux: Modification of OpenSSH Binaries

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

System Linux: Namespace Manipulation Using Unshare

Identifies suspicious usage of unshare to manipulate system namespaces. Unshare can be utilized to escalate privileges or escape container security boundaries. Threat actors have utilized this binary to allow themselves to escape to the host and access other resources or escalate privileges.

System Linux: Network Configuration or Connection Discovery Command Executed

Detects execution of commands used to enumerate network interfaces, routes, DNS configuration, or active connections (ifconfig, ip, netstat, ss, route, arp, cat /etc/resolv.conf). Common reconnaissance step to understand the host's network position before lateral movement or exfiltration.

System Linux: Network Sniffing Tool Executed

Detects execution of packet-capture tools (tcpdump, tshark, dumpcap) that can be used to intercept credentials or other sensitive data traversing the host's network interfaces. Legitimate for troubleshooting, but worth reviewing when run by an unexpected user or outside a maintenance window.

System Linux: New Local Account Created

Detects execution of useradd/adduser to create a new local account, a common way for an adversary to establish a persistent foothold independent of any compromised credential. Distinct from utmstack_user_added_to_admin_group, which only fires when an existing account is added to a privileged group.

System Linux: Nping Process Activity

Some normal use of this command may originate from security engineers and network or server administrators, but this is usually not routine or unannounced. Use of Nping by non-engineers or ordinary users is uncommon.

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

Identifies the creation or modification of a K Desktop Environment (KDE) AutoStart script or desktop file that will execute upon each user logon. Adversaries may abuse this method for persistence.

System Linux: Possible Brute Force Attack

Identifies multiple SSH login failures followed by a successful one from the same source address. Adversaries can attempt to login into multiple users with a common or known password to gain access to accounts.

System Linux: Potential DNS Tunneling via Iodine

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

System Linux: Potential Disabling of SELinux

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

System Linux: Potential Privilege Escalation via PKEXEC

Identifies an attempt to exploit a local privilege escalation in polkit pkexec (CVE-2021-4034) via unsecure environment variable injection. Successful exploitation allows an unprivileged user to escalate to the root user.

System Linux: Potential Protocol Tunneling via EarthWorm

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

System Linux: Process Discovery Command Executed

Detects execution of process-enumeration commands (ps, top, htop, pgrep) often used by adversaries to identify security tooling, other running processes to target, or to confirm whether their own payload is running undetected.

System Linux: Remote System/Network Scanning Tool Executed

Detects execution of network/host scanning tools (nmap, masscan, arp-scan, netdiscover) from the endpoint. Legitimate for network admins running from a jump box, but from an ordinary server or workstation this typically indicates lateral movement reconnaissance.

System Linux: Reverse Shell Created via Named Pipe

Identifies a reverse shell via the abuse of named pipes on Linux with the help of OpenSSL or Netcat. First in, first out (FIFO) files are special files for reading and writing to by Linux processes. For this to work, a named pipe is created and passed to a Linux shell where the use of a network connection tool such as Netcat or OpenSSL has been established. The stdout and stderr are captured in the named pipe from the network connection and passed back to the shell for execution.

System Linux: Security Monitoring Service Stopped or Disabled

Detects systemctl/service stop, disable, mask, or kill targeting auditd or the UTMStack agent itself -- the most direct way to blind this SIEM's own visibility on a host before further action. Distinct from utmstack_attempt_to_disable_syslog_service, which only covers rsyslog/syslog-ng.

System Linux: Sensitive Directory Archived via tar/zip

Detects tar/zip/gzip invocations whose command line references a credential- or config-relevant path (/etc/ssh, /home, /root, /var/www). A common step immediately before exfiltrating data off the host.

System Linux: Sensitive File/Directory Discovery via find

Detects use of find (or grep -r) scoped to credential-relevant paths (SSH keys, password/config files) or with permission-based search flags (-perm 4000/-perm -u+s), a common way to hunt for SUID binaries or stored secrets after gaining initial access.

System Linux: System Log File Deletion

Identifies the deletion of sensitive Linux system logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.

System Linux: System Service Discovery Command Executed

Detects execution of commands used to enumerate installed/running services (systemctl list-units, service --status-all, chkconfig --list). Commonly used to identify security agents, backup tools, or other services worth targeting or disabling before further action.

System Linux: System Shutdown or Reboot Command Executed

Detects execution of shutdown/reboot/halt/poweroff/init 0/init 6, or the equivalent systemctl verbs. Routine during planned maintenance, but on a production server outside a known maintenance window it can indicate a destructive final step of an attack, or an adversary forcing a reboot to load a tampered boot component.

System Linux: Third-Party Remote Access Software Executed

Detects execution of commercial/consumer remote-access tools (AnyDesk, TeamViewer, Chrome Remote Desktop's helper) on a server. These are rarely part of a standard server deployment and are a common way for an adversary (or a social engineering victim) to maintain interactive access alongside or instead of SSH.

System Linux: Tool Downloaded to a Writable Directory via wget/curl

Detects wget/curl invocations that write their output into a world-writable staging directory (/tmp, /dev/shm, /var/tmp), a common pattern for pulling down a second-stage payload after initial access.

System Linux: User/Owner Discovery Command Executed

Detects execution of commands commonly used to enumerate the current user's identity and privileges (whoami, id, w, who, logname). Legitimate on its own, but a common first step after gaining a foothold to establish what access has been obtained -- especially notable when run by a service account or in a non-interactive session (a web shell, a compromised cron job) rather than an actual logged-in operator.