Vulnerable services

Enumeration

Icacls

icacls "C:\Program Files\*" 2>nul | findstr "(M)" | findstr "Everyone"
icacls "C:\Program Files (x86)\*" 2>nul | findstr "(M)" | findstr "Everyone"

icacls "C:\Program Files\*" 2>nul | findstr "(M)" | findstr "BUILTIN\Users" 
icacls "C:\Program Files (x86)\*" 2>nul | findstr "(M)" | findstr "BUILTIN\Users" 

wmic

  • Requires authorization to use wmic

  • On windows XP replace icacls with cacls

FOR /f "tokens=2 delims='='" %a in ('wmic service list full^|find /i "pathname"^|find /i /v "system32"') do @echo %a >> .\permissions.txt
FOR /f eol^=^"^ delims^=^" %a in (.\permissions.txt) do cmd.exe /c icacls "%a"

Service name from exe

wmic service where "PathName like '%httpd%'" get Name,DisplayName

exe path from service name

wmic service where "Name like '%<name>%' or DisplayName like '%<name>%'" get PathName

accesschk.exe

  • Obtain from (newer versions lack the /accepteula option): here or here

sc.exe

Exploitation

PrivEsc

Add user

Send reverse shell

Windows XP - upnp service

Last updated