Linux: Detect dd and truncate used to pad binaries and alter file contents

Flags Linux process executions of dd and truncate consistent with padding binaries to alter on-disk representation.

FreeReviewedSigma · High · v3
Product
linux
Service
auditd
Author
Igor Fits, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-13
Updated
2026-07-31

ATT&CK techniques

Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule identifies Linux process executions where an attacker may use dd to rewrite file content and optionally use truncate to pad with junk data, changing the on-disk representation. This can be used to evade detections that rely on file hashes or other static characteristics. It relies on auditd telemetry for EXECVE events and matches command-line keywords including dd with if=, truncate with -s, and file output arguments via of= handling.

Related detections2 linkedT1027.001 — drag to rearrange
macOS Process Execution: dd and truncate used for binary padding
Windows Security: Failed Code Integrity Checks (Event 5038/6281)
Linux: Detect dd and truncate used to pad binaries and alter file contents
Pivot detection · T1027.001 · 2 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.