Nssm224 Privilege Escalation Updated Direct
This guide outlines how to identify and exploit misconfigurations in the Non-Sucking Service Manager (NSSM), often referred to in contexts like "nssm224" (referring to outdated versions), to elevate privileges from a standard user to SYSTEM on Windows systems. 1. Understanding the Vulnerability
Unquoted Service Paths: If the path to the NSSM executable contains spaces and is not enclosed in quotes, Windows may attempt to execute files at intercept points (e.g., C:\Program.exe instead of C:\Program Files\nssm.exe). nssm224 privilege escalation updated
NSSM 2.24 Privilege Escalation: Updated Analysis, Exploit Vectors, and Mitigation Strategies
Introduction: The Old Binary with New Risks
For years, system administrators and developers have relied on the Non-Sucking Service Manager (NSSM) to run executables, batch scripts, and legacy applications as Windows services. Version 2.24 (nssm224) is one of the most widely deployed iterations due to its stability and simplicity. This guide outlines how to identify and exploit
Updated Considerations (2025+)
- Modern EDRs detect
nssm.exemodifying service configs or spawning shells. OPSEC tip: Use PowerShell to directly edit registry keys instead of callingnssm.exe:Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\VulnService\Parameters" -Name "Application" -Value "C:\Windows\System32\cmd.exe /c malicious.bat" - Group Policy often blocks non-admin users from starting/stopping services. Check
sc qc [ServiceName]forSTART_NAMEandSERVICE_START_NAME. - NSSM 2.24 is legacy (latest is 2.24-103). No known direct CVEs for NSSM itself — the issue is misconfigured service permissions, not NSSM vulnerability.
wmic service get name,displayname,pathname,startmode | findstr /i "auto" Use code with caution. Copied to clipboard Modern EDRs detect nssm
If a standard user can modify the ImagePath value, they can point the service to their own executable.
Step-by-Step Attack Simulation (Updated for Defense Testing)
The following is an updated attack simulation for authorized penetration testers and blue teams.
REM Step 4: Trigger escalation C:\Users\Public\nssm.exe restart VulnService
- Identify a service using NSSM that loads a missing DLL (via
SetDllDirectoryor insecureLoadLibrary). - Write a malicious
version.dllorwinhttp.dllinto the working directory. - Restart the service – NSSM runs the legitimate EXE but loads the attacker’s DLL with service privileges.