Linux Command Lines Creating Symlink to /etc/passwd

Alerts on Linux command lines attempting to create symlinks to /etc/passwd via ln -s/ln -f patterns.

FreeReviewedSigma · High · v3
Product
linux
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2019-04-05
Updated
2026-07-31
title: Linux Command Lines Creating Symlink to /etc/passwd
id: 688443f5-f755-47f0-b80f-034873b6ae22
status: test
description: This rule matches Linux process command lines containing patterns for creating a symbolic link to /etc/passwd using ln with -s and optionally -f. Attackers use symlinks to redirect file operations and potentially manipulate how privileged processes read sensitive files. The detection relies on command-line text telemetry that captures the executed ln arguments.
references:
  - https://www.qualys.com/2021/05/04/21nails/21nails.txt
  - https://github.com/SigmaHQ/sigma/blob/master/rules/linux/builtin/lnx_symlink_etc_passwd.yml
author: Florian Roth (Nextron Systems), Huntrule Team
date: 2019-04-05
modified: 2021-11-27
tags:
  - attack.t1204.001
  - attack.execution
logsource:
  product: linux
detection:
  keywords:
    - ln -s -f /etc/passwd
    - ln -s /etc/passwd
  condition: keywords
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: c67fc22a-0be5-4b4f-aad5-2b32c4b69523
    type: derived