Powershell 查找进程的 dll

Powershell 查找进程的 dll

我想创建一个 powershell 程序来查找隐藏的可能 powershell。例如,在此处找到的项目 Not powershell NPS.exe (https://github.com/Ben0xA/nps)。一系列 LS 命令(数千个)并运行它。

我知道此应用程序使用这些库 (System.Management.dll)。我使用进程资源管理器检查并确认,但我以管理员身份运行此脚本,该脚本未获取库,但获取了正在使用这些库的其他程序。我做错了什么?我如何找到 dll?为什么 NPS.exe dll 不显示在进程资源管理器中,但不显示在以下脚本中。

#Possible Powershells
echo "Possible Powershells"
echo "-------------------------------------"
Get-Process | where {$_.modules.ModuleName -eq 'System.Management.ni.dll'}
Get-Process | where {$_.modules.ModuleName -eq 'System.Management.dll'}

Process Explorer 显示进程 Powershell 代码运行

相关内容