Skip to content

Instantly share code, notes, and snippets.

@thinkst-cs
Forked from enigma0x3/rpc.ps1
Created June 13, 2023 17:20
Show Gist options
  • Select an option

  • Save thinkst-cs/b67200f2ba145a82b515044b47bc015b to your computer and use it in GitHub Desktop.

Select an option

Save thinkst-cs/b67200f2ba145a82b515044b47bc015b to your computer and use it in GitHub Desktop.
$rpc = ls C:\Windows\System32\*.exe, C:\Windows\System32\*.dll |Get-RpcServer -DbgHelpPath "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll"
foreach ($rpc1 in $rpc)
{
$ourObject = New-Object -TypeName psobject
$ourObject | Add-Member -MemberType NoteProperty -Name InterfaceID -Value $rpc1.InterfaceID
$ourObject | Add-Member -MemberType NoteProperty -Name FileName -Value $rpc1.Name
$ourObject | Add-Member -MemberType NoteProperty -Name IsRunning -Value $rpc1.IsServiceRunning
$ourObject | Add-Member -MemberType NoteProperty -Name EndpointCount -Value $rpc1.EndpointCount
$procs = $rpc1.Procedures.Name | Out-String
$ourObject | Add-Member -MemberType NoteProperty -Name Procedures -Value $procs
$ourObject | fl | Out-file -Encoding ASCII rpc.txt -Append
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment