Linux auditd: Executing suspicious chmod and cp commands

Triggers on auditd EXECVE events for chmod (777/u+s) and cp overwriting /bin/ksh or /bin/sh.

FreeReviewedSigma · Medium · v3
Product
linux
Service
auditd
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2017-12-12
Updated
2026-07-31

ATT&CK techniques

Execution
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Persistence

  5. Priv Esc

  6. Defense Evasion

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule matches process execution events where a user runs specific chmod or cp commands on Linux, including setting world-writable permissions or enabling the setuid bit. Attackers commonly use these actions to modify file permissions or replace system shells to persist or escalate privileges. The detection relies on auditd EXECVE telemetry capturing the executed program name and its first argument values.

Related detections9 linkedT1059.004 — drag to rearrange
Malicious Next.js Node Process Spawning Shell Downloader after RSC Deserialization RCE (via process_creation)
Suspicious Shell Script Download and Execution via curl Piped to Bash on Linux (via process_creation)
Obfuscated VShell Bash Payload Execution via Base64-Decoded Filename (via process_creation)
Possible OMIGOD Unauthenticated OMI WSMan Command Execution via Web Request (via webserver)
Malicious Curl to Shell Pipe Dropper Execution (via process_creation)
Malicious Shai-Hulud npm Worm Staging Script Execution on Linux
Suspicious Java Process Spawning Download or Shell Utility (Exposed JDWP Abuse)
Suspicious PostgreSQL Spawning Command Shell via COPY FROM PROGRAM (Soco404)
Suspicious Bash Reverse Shell via Dev TCP Redirection
Linux auditd: Executing suspicious chmod and cp commands
Pivot detection · T1059.004 · 9 related

Changelog

v3
  1. v3
    Candidate ingested via manual entry.2026-07-31
  2. v2
    Candidate ingested via manual entry.2026-07-31
  3. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.