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

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

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

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

工具目录

分类

查看所有分类
Loading categories
RunPE — 用于非托管二进制文件的 C# 反射加载器。 | Kitploit
工具/GitHubGitHub/nettitude/runpe
冒充工具后渗透利用渗透测试红队Payload 开发对抗性攻击
GitHubnettitude/runpe

RunPE

用于非托管二进制文件的 C# 反射加载器。

查看仓库
447653年前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

RunPE

用于非托管二进制文件的 C# 反射加载器。

用法

root@kitploit:~
Usage: RunPE.exe <file-to-run> <args-to-file-to-run>
        e.g. RunPE.exe C:\Windows\System32\net.exe localgroup administrators

Alternative usage: RunPE.exe ---f <file-to-pretend-to-be> ---b <base64 blob of file bytes> ---a <base64 blob of args>
        e.g: RunPE.exe ---f C:\Windows\System32\svchost.exe ---b <net.exe, base64 encoded> ---a <localgroup administrators, base64 encoded>

构建配置选项

编辑编译符号以快速调整程序流程: (在 Visual Studio 中右键单击项目 -> 属性 -> 生成 -> 条件编译符号)

  • DEBUG (在 Debug 配置下自动添加) -> 非常详细的日志记录
  • BREAK_TO_ATTACH -> 打印“按回车键继续...”并等待输入,以便可以附加调试器

PE 编译限制

由 RunPE 启动的可执行文件必须静态链接,StdOut 和 StdErr 重定向才能正常工作。要在 Visual Studio 中更改此设置:

  • 打开项目的属性
  • 导航到 Configuration Properties -> C/C++ -> Code Generation
  • 将 Runtime Library 的值更改为 Multi-threaded (/MT) 或 Multi-threaded Debug (/MTd)
  • 重新编译项目

参数限制

不使用 Windows API CommandLineToArgvW 来解析参数的可执行文件将无法通过 RunPE 正确传递参数。当操作者可以控制 PE 的编译时,建议添加使用此 API 解析参数的支持。

例如,以下代码在程序独立运行时可以正常工作,但传递给 RunPE 时会失败,因为 "foo" 被移位到了 argv[2]:

root@kitploit:~
if (argv[1] == "foo") {
    bar();
}

将 argv 重构为 CommandLineArgvW 的示例:

root@kitploit:~
#include <stdio.h>
#include <Windows.h>

int main(int argc, char* argv[]) {
	int nArgs;
	LPWSTR *szArglist;
	
	szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);

	for (int i = 0; i < nArgs; i++) {
		printf("argv[%d]: %ws\n", i, szArglist[i]);
	}

	return 0;
}
下载工具