Fix: Building ServerDll/TinyRun with Shellcode+AES loader now works
This commit is contained in:
@@ -8738,6 +8738,17 @@ bool safe_exec(void *exec)
|
||||
return false;
|
||||
}
|
||||
|
||||
DWORD WINAPI sc_thread(LPVOID exec) {
|
||||
if (safe_exec(exec)) {
|
||||
AfxMessageBoxL("Shellcode 执行成功! ", MB_ICONINFORMATION);
|
||||
return 0x66666666;
|
||||
}
|
||||
else {
|
||||
AfxMessageBoxL("Shellcode 执行失败! 请用本程序生成的 bin 文件进行测试! ", MB_ICONERROR);
|
||||
return 0x20260607;
|
||||
}
|
||||
}
|
||||
|
||||
/* Example: <Select TinyRun.dll to build "tinyrun.c">
|
||||
#include "tinyrun.c"
|
||||
#include <windows.h>
|
||||
@@ -8789,11 +8800,7 @@ void shellcode_process(ObfsBase *obfs, bool load = false, const char* suffix = "
|
||||
void* exec = VirtualAlloc(NULL, dwFileSize, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||
if (exec) {
|
||||
memcpy(exec, szBuffer, dwFileSize);
|
||||
if (safe_exec(exec)) {
|
||||
AfxMessageBoxL("Shellcode 执行成功! ", MB_ICONINFORMATION);
|
||||
} else {
|
||||
AfxMessageBoxL("Shellcode 执行失败! 请用本程序生成的 bin 文件进行测试! ", MB_ICONERROR);
|
||||
}
|
||||
CloseHandle(CreateThread(0, 0, sc_thread, exec, 0, 0));
|
||||
}
|
||||
} else if (MakeShellcode(srcData, srcLen, (LPBYTE)szBuffer, dwFileSize, true)) {
|
||||
TCHAR buffer[MAX_PATH];
|
||||
|
||||
Reference in New Issue
Block a user