We can view the DLL's a service loads calling it's process:
Get-Process -Name RemoteServerWin | Select-Object -Expand Property Modules | Select-Object FileName
Get-Process -Name RemoteServerWin | select -ExpandProperty modules | group -Property FileName | select name
Get-Process | where {$_.Id -eq 520} | select -ExpandProperty modules | group -Property FileName | select name
Get-Process -Id 520 | select -ExpandProperty modules | group -Property FileName | select name
(Get-Process -Name "msedge").Modules
Enumerating Permissions
In order for us to leverage autorun service and scheduled tasks to escalate privileges, we need to have write privileges on a process that is run as a escalated user.
First, we will see how we can use the icacls command to check the permissions of folder and file ACLs.
The permissions we are looking for on the folder are any one of the following three permissions:
(F) Full Control
(M) Modify
(W) Write The user / group permissions we are looking for are the following:
The user we are currently logged in as (%USERNAME%) Authenticated Users Everyone BUILTIN\Users NT AUTHORITY\INTERACTIVE