nssm-2.24 privilege escalation

Escalation: Nssm-2.24 Privilege

Detailed Review: NSSM-2.24 Privilege Escalation Vulnerability

Improper File Permissions: Many applications bundle nssm.exe but fail to secure its directory. For example, if a "Users" group has full control (the 'F' flag) over the binary or its parent folder, an attacker can replace nssm.exe with a malicious rootkit. When the service restarts, it executes the replacement with elevated privileges. nssm-2.24 privilege escalation

Least Privilege: Configure the service to "Log on" as a specific user with the minimum required permissions rather than the default SYSTEM account. Download - NSSM - the Non-Sucking Service Manager Detailed Review: NSSM-2

Event Logs

3. Proof of Concept (Conceptual)

  1. Discovery: An attacker enumerates services installed via NSSM using standard Windows commands (e.g., sc qc ServiceName or wmic service).
  2. Vulnerability Identification: The attacker identifies that the service binary path contains spaces and is not enclosed in quotes (Unquoted Service Path), or that the NSSM parameters allow for command injection.