Linux File Creation: Non-Standard nsswitch.conf Directory Write Activity

Flags creation of /etc/nsswitch.conf in non-standard locations that could support privilege escalation.

FreeReviewedSigma · High · v7
Product
linux
Category
file_event
Author
Swachchhanda Shrawn Poudel (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2025-10-02
Updated
2026-10-21
title: "Linux File Creation: Non-Standard nsswitch.conf Directory Write Activity"
id: 1f06a049-8ff6-45ec-bff8-7b16f153f6b5
status: experimental
description: This rule flags file creation events for nsswitch.conf when the target path ends with /etc/nsswitch.conf but is not located in common legitimate locations (including factory, system, and snapshot paths). Attackers may use non-standard directory placement so that privileged chroot execution loads attacker-controlled configuration and associated libraries within the chroot environment. The detection relies on Linux file event telemetry that records the created file path (TargetFilename).
references:
  - https://github.com/kh4sh3i/CVE-2025-32463/blob/81bb430f84fa2089224733c3ed4bfa434c197ad4/exploit.sh
  - https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2025/Exploits/CVE-2025-32463/file_event_lnx_exploit_cve_2025_32463.yml
author: Swachchhanda Shrawn Poudel (Nextron Systems), Huntrule Team
date: 2025-10-02
modified: 2026-10-19
tags:
  - attack.privilege-escalation
  - attack.t1068
  - cve.2025-32463
  - detection.emerging-threats
logsource:
  category: file_event
  product: linux
detection:
  selection:
    TargetFilename|endswith: /etc/nsswitch.conf
  filter_main_legitimate_path:
    TargetFilename:
      - /etc/nsswitch.conf
      - /usr/etc/nsswitch.conf
      - /usr/share/factory/etc/nsswitch.conf
  filter_optional_snapshot:
    TargetFilename|startswith: /.snapshots/
    TargetFilename|endswith: /snapshot/etc/nsswitch.conf
  condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
  - Backup locations
level: high
license: DRL-1.1
related:
  - id: 10ac0730-c24e-4f4c-81f8-b13a1ac95a1d
    type: derived