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
Suspicious Remote Script Download Piped to Shell via Wget or Curl on Linux
Suspicious AI Agent Compromise via Web Worker Spawning Shell or Network Tool
Malicious wp2shell WordPress RCE via Web Server Spawning Shell Recon
Suspicious Remote Script Piped Directly to Interpreter in CI Pipeline
Malicious Node Runtime Spawning Shell to Download Python Payload via Axios Compromise
Malicious Remote Script Piped to Shell via Curl (via process_creation)
Possible GTFOBins Shell Breakout via Unix Utilities
Malicious Foomatic-Rip Filter Spawning Shell via CUPS Exploitation
Suspicious Downloaded Shell Stager Made Executable Via Chmod 777
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.