Escalation Updated !!link!! - Nssm224 Privilege
Assign only the explicit privileges required by the application (e.g., specific network sockets or database access), limiting the blast radius if the binary is compromised. 4. Keep Deployment Tools Updated
When NSSM registers a service, it relies on a specific application binary located in a designated directory. If the permissions (Access Control Lists) on either the NSSM binary or the target application folder allow standard users to write or modify files, an attacker can simply replace the legitimate executable with a malicious one (e.g., a reverse shell). When the service restarts, the payload runs as SYSTEM . 2. Weak Service Registry Permissions
Exploitation for Privilege Escalation, Technique T1068 - Enterprise
The Non-Sucking Service Manager (NSSM) is a legitimate, widely used open-source utility designed to background a standard command or executable as a Windows service. Unlike native Windows service binaries, which must strictly adhere to the Service Control Manager (SCM) API, NSSM acts as a wrapper. It manages restarting failed applications, logging stdout/stderr, and handling environment variables for virtually any executable. The Vulnerability Nexus: NSSM224 nssm224 privilege escalation updated
End of Brief.
If the output displays Modify or Full Control permissions for groups like Authenticated Users , BUILTIN\Users , or Everyone , the service is highly vulnerable. Step 3: Modifying the NSSM Registry Parameters
The attack vector for NSSM224 generally exploits two primary weaknesses in service configuration: 1. Insecure Executable Permissions Assign only the explicit privileges required by the
The most common variant of this exploit involves the misconfiguration of folder permissions where nssm.exe or the application it wraps resides.
icacls "C:\Path\To\Your\Service" /inheritance:r /grant:r Administrators:(OI)(CI)F /grant:r SYSTEM:(OI)(CI)F /grant:r Users:(OI)(CI)RX Use code with caution. 2. Secure the Windows Registry
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[YourService] If the permissions (Access Control Lists) on either
If an attacker has low-privileged, local access to the machine, they can look for writable folders in those intermediate paths (e.g., C:\Program Files\App Folder\ ).
IBM Robotic Process Automation versions 21.0.0 through 21.0.7.17 and 23.0.0 through 23.0.18 suffer from a similar misconfiguration. “All files in the install inherit the file permissions of the parent directory and therefore a non‑privileged user can substitute any executable for the nssm.exe service”. The IBM security bulletin warns that this could “allow a local user to escalate their privileges”.
A vulnerability was discovered in nssm 224 that allows a low-privileged user to elevate their privileges to those of a higher-privileged user, potentially leading to system compromise. The vulnerability is caused by an improper handling of certain commands and parameters, which can be exploited by an attacker to execute arbitrary code with elevated privileges.
: The attacker renames or replaces the legitimate nssm.exe with a malicious payload, such as: