Unquoted Service Name
Detection
.\winPEAS.exe quiet servicesinfo
Get-CimInstance -ClassName win32_service | Where-Object { $_.PathName -notlike '"*"' -and $_.PathName -like '* *' } | Select Name, PathName
wmic service get name,pathname,displayname,startmode | findstr /i auto | findstr /i /v "C:\Windows\\" | findstr /i /v '\"'
wmic service get name,displayname,pathname,startmode | findstr /i /v "C:\\Windows\\system32\\" |findstr /i /v '\"' # Not only auto services
Exploitation
Last updated