Created
October 30, 2023 21:06
-
-
Save p4yl0ad/de39ed6a0221fb14a5d2998b9b4062f3 to your computer and use it in GitHub Desktop.
rpc-hunt.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://csandker.io/2021/02/21/Offensive-Windows-IPC-2-RPC.html#rpc-servers | |
Get-ChildItem -Path "C:\Windows\System32\" -Filter "*.exe" -Recurse -ErrorAction SilentlyContinue | % { $out=$(C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\bin\dumpbin.exe /IMPORTS:rpcrt4.dll $_.VersionInfo.FileName); If($out -like "*RpcServerListen*"){ Write-Host "[+] Exe starting RPC Server: $($_.VersionInfo.FileName)"; Write-Output "[+] $($_.VersionInfo.FileName)`n`n $($out|%{"$_`n"})" | Out-File -FilePath EXEs_RpcServerListen.txt -Append } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment