Linux dd Process Memory Map Overwrite for Code Injection (proc/mem)

Alerts when dd is used to write to /proc/<pid>/mem, suggesting potential Linux process code injection.

FreeReviewedSigma · Medium · v3
Product
linux
Category
process_creation
Author
Joseph Kamau (SigmaHQ), DRL 1.1
Published
2023-12-01
Updated
2026-07-31
title: Linux dd Process Memory Map Overwrite for Code Injection (proc/mem)
id: d594c012-82ef-4cee-bf57-00f3a076fac2
status: test
description: This rule identifies potential process code injection on Linux by spotting use of the dd utility with arguments consistent with overwriting another process’s memory via /proc/<pid>/mem. Attackers can leverage this pattern to modify a target process without the same visibility as ptrace-based approaches, making it relevant for stealth and privilege-focused scenarios. Detection relies on process creation telemetry that includes the executed Image path and CommandLine arguments containing of=, /proc/, and /mem.
references:
  - https://www.aon.com/cyber-solutions/aon_cyber_labs/linux-based-inter-process-code-injection-without-ptrace2/
  - https://github.com/AonCyberLabs/Cexigua/blob/34d338620afae4c6335ba8d8d499e1d7d3d5d7b5/overwrite.sh
  - https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_dd_process_injection.yml
author: Joseph Kamau, Huntrule Team
date: 2023-12-01
tags:
  - attack.privilege-escalation
  - attack.stealth
  - attack.t1055.009
logsource:
  product: linux
  category: process_creation
detection:
  selection:
    Image|endswith: /dd
    CommandLine|contains|all:
      - of=
      - /proc/
      - /mem
  condition: selection
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: 4cad6c64-d6df-42d6-8dae-eb78defdc415
    type: derived