
إطار اختبار خفيف الوزن مصمم لتسريع تطوير الشيل كود (shellcode) من خلال توفير بيئة تنفيذ مع تشخيصات الأعطال المدمجة وإعادة توجيه مخرجات التصحيح.
أداة اختبار خفيفة الوزن مصممة لتسريع تطوير الشيلكود من خلال توفير بيئة تنفيذ مع تشخيص أعطال مدمج وإعادة توجيه مخرجات التصحيح.
g++ -o loader.exe loader.cc -ladvapi32 -luser32 -lkernel32 -static
# تنفيذ حمولة باستخدام DLL المضيف الافتراضي
loader.exe --bin payload.bin
# تنفيذ حمولة عن طريق stomping DLL معين
loader.exe --bin payload.bin --dll mscoree.dll
# مسح جميع DLLs المتوافقة
loader.exe --scan
# مسح DLLs التي تحتوي على قسم .text كبير بما يكفي لحمولة معينة
loader.exe --scan --bin payload.bin
#if defined(DEBUG)
#define PDEBUG(format, ...) \
{ \
ntdll.DbgPrint(symbol<PCH>("%-48s " format), symbol<PCH>(({ \
char __buf[48]; \
memory::snprintf(__buf, sizeof(__buf), "[%s:%d]", \
__FUNCTION__, __LINE__); \
__buf; \
})), \
##__VA_ARGS__); \
}
#define PDEBUG_CTX(ctx, format, ...) \
{ \
if ((ctx) && (ctx)->ntdll.DbgPrint) { \
(ctx)->ntdll.DbgPrint(symbol<PCH>("%-48s " format), symbol<PCH>(({ \
char __buf[48]; \
memory::snprintf(__buf, sizeof(__buf), "[%s:%d]",\
__FUNCTION__, __LINE__); \
__buf; \
})), \
##__VA_ARGS__); \
} \
}
#else
#define PDEBUG(format, ...) \
{ \
; \
}
#define PDEBUG_CTX(ctx, format, ...) \
{ \
; \
}
#endif
PSYSCALL_TABLE pTable = NULL;
SIZE_T regionSize = sizeof(SYSCALL_TABLE);
ntdll.NtAllocateVirtualMemory(
(HANDLE)-1,
(PVOID*)&pTable,
0,
®ionSize,
MEM_COMMIT | MEM_RESERVE,
PAGE_READWRITE
);
if (pTable) {
pTable->NtTerminateProcess = 0x2c; // Example syscall number
PDEBUG("HEXDUMP:%p:%zu", pTable, sizeof(SYSCALL_TABLE));
}
