PeToShellcode
简介
PeToShellcode项目专注于将PE文件(exe,dll)转换成shellcode,然后指定的加载器来将shellcode注入指定进程,也就是说此类shellcode依赖于它指定的加载器
使用方法
1.生成shellcode
和正常编写C程序一样,此处演示弹框功能,注意此处代码中包含全局变量,通常情况下shellcode是无法使用全局变量的
int value = 4000;
int main()
{
wchar_t message[100];
wsprintfW(message, L"The value is %d\n", value);
MessageBoxW(NULL, message, L"Hello", MB_OK);
}
编译成可执行程序后,使用pe2shc.exe
生成shellcode
pe2shc.exe test.exe test.bin
2.验证shellcode
runshc64.exe
用于测试shellcode是否有效,若能正常执行功能则表示成功
runshc64.exe test.bin

3.注入进程
用injector64.exe
实现将shellcode注入指定进程
injector64.exe test.bin 49508

最后更新于