
PowerShell script that audits Windows service binaries for writable permissions, identifying privilege escalation vectors by checking ACLs on non-system services.
A PowerShell security auditing tool that identifies Windows service binaries that can be modified by the current user—a potential privilege escalation vector.
This script scans all Windows services (except system32 and svchost) and checks if the current user has write, modify, or full control permissions on the service executable files. If dangerous permissions are detected, it alerts the user with detailed information about the vulnerable service.
powershell.exe .\hsb.ps1
You can run it with low privilege user.
When a vulnerable service is found:
⚠️ Current user CAN modify service binary!
Service: ServiceName
Runs As: ACCOUNT
Path: C:\Path\To\Service.exe
Matched Identity: DOMAIN\USER
Rights: Write, Modify, FullControl
If a service binary can be modified by a non-administrative user:
This tool is intended for authorized security assessments and system administration tasks only. Unauthorized access to computer systems is illegal.