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.
- Product
- linux
- Author
- Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2019-04-05
- Updated
- 2026-07-31
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
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.
Reporting behind it
Changelog
v3- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
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