Movatterモバイル変換


[0]ホーム

URL:


  1. Home
  2. Techniques
  3. Enterprise
  4. Masquerading
  5. Overwrite Process Arguments

Masquerading: Overwrite Process Arguments

Adversaries may modify a process's in-memory arguments to change its name in order to appear as a legitimate or benign process. On Linux, the operating system stores command-line arguments in the process’s stack and passes them to themain() function as theargv array. The first element,argv[0], typically contains the process name or path - by default, the command used to actually start the process (e.g.,cat /etc/passwd). By default, the Linux/proc filesystem uses this value to represent the process name. The/proc/<PID>/cmdline file reflects the contents of this memory, and tools likeps use it to display process information. Since arguments are stored in user-space memory at launch, this modification can be performed without elevated privileges.

During runtime, adversaries can erase the memory used by all command-line arguments for a process, overwriting each argument string with null bytes. This removes evidence of how the process was originally launched. They can then write a spoofed string into the memory region previously occupied byargv[0] to mimic a benign command, such ascat resolv.conf. The new command-line string is reflected in/proc/<PID>/cmdline and displayed by tools likeps.[1][2]

ID: T1036.011
Sub-technique of: T1036
Platforms: Linux
Version: 1.0
Created: 27 March 2025
Last Modified: 15 April 2025

Procedure Examples

IDNameDescription
S1161 BPFDoor

BPFDoor overwrites theargv[0] value used by the Linux/proc filesystem to determine the command line and command name to display for each process.BPFDoor selects a name from 10 hardcoded names that resemble Linux system daemons, such as;/sbin/udevd -d,dbus-daemon --system,avahi-daemon: chroot helper,/sbin/auditd -n, and/usr/lib/systemd/systemd-journald.[1]

Mitigations

This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of system features.

Detection Strategy

IDNameAnalytic IDAnalytic Description
DET0164Detection Strategy for Overwritten Process Arguments MasqueradingAN0466

Detects adversary behavior where the command-line arguments of a running process are overwritten in memory to spoof the process name, typically replacing it with a benign or misleading string. The detection correlates unexpected null byte sequences, discrepancies between/proc/<pid>/cmdline and process ancestry, and suspicious memory writes shortly after process start.

References

×

[8]ページ先頭

©2009-2026 Movatter.jp