最后更新于1年前
项目专注于将PE文件(exe,dll)转换成shellcode,然后指定的加载器来将shellcode注入指定进程,也就是说此类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
pe2shc.exe test.exe test.bin
runshc64.exe用于测试shellcode是否有效,若能正常执行功能则表示成功
runshc64.exe
runshc64.exe test.bin
用injector64.exe实现将shellcode注入指定进程
injector64.exe
injector64.exe test.bin 49508