
IKEv2, ikeext.dll, CVE-2026-33824, doble liberación, manipulación del heap, ROP, fragmentación SKF, exploit de Windows, anti-depuración, ofuscación, hooking de API, shellcode, shell inversa
⚠️ Proyecto en proceso de finalización. NO totalmente funcional en el estado actual.
EpSiLoNPoInTIkEv2.cpp es un prototipo de exploit C/C++ dirigido a Windows, desarrollado en torno a una explotación
de tipo double-free en ikeext.dll (controlador IKEv2 de Windows), referenciado
en curso de investigación como CVE-2026-33824.
El proyecto agrupa:
EpSi_OBF_ENDL / obfusheader inspirado)El código utiliza una capa de ofuscación pesada activada en compilación mediante #define EpSi_OBF_ENDL.
Basado en obfusheader.h, adaptado y extendido.
FAKE_SIGNS == 1)Se inyectan secciones PE personalizadas en el binario para engañar a los escáneres de protectores conocidos:
.vmp0, .vmp1, .vmp2 → VMProtectUPX0 → UPX.enigma1, .enigma2 → Enigma Protector.winlice → Themida.petite, .aspack, .adata, .rlp, .vlizer, .arch, .alien, .pwdprot,
.dsstext, , , , , , (Nuitka), (Screen2Exe), etc.VIRT == 1)Todas las operaciones aritméticas y lógicas pueden enrutarse a una VM interna
(Obfh_VirtualMachine):
OP__ADD, OP__SUB, ..., OP__NOP) se generan aleatoriamente en
compilación mediante __COUNTER__ y RND()._VM_ENCRYPT_INT(value) = (value - _VM_MUTATOR_KEY) * ~SALT_CMD.* -1), y se pasan con junk values.goto, falsos case negativos, BREAK_STACK_* (inline ASM
xor; jz; .byte 0xE8; cpuid), falsos JMP (.byte 0xFF, 0x25) y bloques de falso código
x86_64 para engañar a los descompiladores.VM_ADD, , , , , , ,
, , , , , , , etc.NO_CFLOW != 1)#define if(cond): cada if inyecta una llamada __s_rdtsc() y un BAD_CALL muerto.#define else: inyecta un else if (0) { BAD_CALL; } muerto antes del else real.#define while(...): condicionado por __s_rdtsc() != 0.1 y una comprobación de puntero absurda.#define for(...): condicionado por OBFUS_CONDITION_BLOCK.#define switch(...): condicionado por OBFUS_CONDITION_BLOCK.#define break: inyecta antes de cada .HIDE_STRING)STACK_STRING(str): empuja la cadena a la pila mediante compound literal.HIDE_STRING(str): combina obfh_process_hidden_string() + __s_rdtsc() con BAD_JMP
muerto para ocultar la cadena en el binario.Todas las funciones CRT y Win32 están redirigidas:
GetProcAddress(LoadLibraryA("msvcrt"), ...) dinámico: printf, scanf,
sprintf, strlen, strcmp, strcpy, strtok, memset, memcpy, strchr, strrchr,
rand, realloc, calloc, , , , , , ,
, , , , , , , , .ANTI_DEBUG_V2 == 1)ThreadCompareDRs): SuspendThread sobre el hilo principal, GetThreadContext
con CONTEXT_DEBUG_REGISTERS, verificación de Dr0–Dr3, Dr7, zeroing mediante ad_ZeroDRs.IsDebuggerPresent_proxy: carga kernel32.dll dinámicamente, reconstruye el nombre de la
función IsDebuggerPresent carácter a carácter mediante variables volátiles (_I, _s, _D, _e, _b, _u, _g, _g, _e, _r, _P, _r, _e, _s, _e, _n, _t), llamada mediante GetProcAddress.ANTI_DEBUG: doble comprobación ,
dispara (bucle infinito), (IN privilegiado), , ASM,
y luego ( + ).9 variantes de secuencias inline ASM insertadas en las funciones sensibles:
xor; jz; .byte 0xE8; cpuid (variaciones sobre eax, ebx, edx), falsos opcodes 0x50, 0x20,
0x00, 0xEB, 0xE1 (x86), 0xFF, 0x25, 0xF1, 0xF2, 0xF3, 0xF4 (x86_64).
#include "runassys/ntnative.h"
#include "runassys/runassys.h"
#include "runassys/ntdll-stubs/ntdll-stubs.c"
#include "runassys/ntdll-stubs/ntdll.def.c"
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "iphlpapi.lib")
#pragma comment(lib, "bcrypt.lib")
#pragma comment(lib, "Version.lib")
IKEEXT_BASE_ADDRESS = 0x180000000g_IkeextDoubleFreeOffset = 0x12B960g_IkeextProcessIkePayload = 0x522200x1790A0), Import (0x179110), Exception (0x183000),
Reloc (0x18C000), LoadConfig (0x12AE70), Debug (0x155CD0).g_Offset_MMSA_SecurityRealmBlob = 0x208,
g_Offset_PacketContext_Blob = 0xC8.500 (UDP), callback de shell: 4444.IKE_HEADER, IKE_SA_PAYLOAD, IKE_PROPOSAL_PAYLOAD, IKE_TRANSFORM_PAYLOAD,
IKE_NONCE_PAYLOAD (nonce de 32 bytes), IKE_KEY_EXCHANGE_PAYLOAD (DH 256 bytes),
IKE_NOTIFY_PAYLOAD, IKE_VENDOR_ID_PAYLOAD, IKE_SKF_FRAGMENT_PAYLOAD.
Transforms configurados: AES-CBC-128 (12), PRF HMAC-SHA2-256 (5),
INTEG HMAC-SHA2-256-128 (12), DH MODP-2048 (14).
IKE_DDOS_AMPLIFIER_PAYLOAD: factor de amplificación + 64 bytes de trigger.IKE_DDOS_LOOP_PAYLOAD: contador de bucle + 32 bytes de loop_code.IKE_DDOS_MEMORY_PAYLOAD: tamaño/contador de asignación + 64 bytes de datos de heap spray.HEAP_GROOM_CONTEXT: handle de heap, dirección objetivo, hilos, stop_flag, allocated_chunks.HEAP_GROOM_THREAD_PARAMS: tamaño de chunk, iteraciones, thread_id, SRWLOCK, use_nt_allocate.GROOM_CONFIG: thread_count, iteraciones, delay, chunk_size, min/max free %.0x1000, 1000 iteraciones, fragmentación entre 30–70%.Estructura ROP_CHAIN completa con todos los gadgets necesarios:
pop_rax/rcx/rdx/r8/r9/rsp, mov_rax_rsp, mov_rcx_rsp, mov_rcx_rax, mov_rax_rcx,
mov_rcx_rdx, xor_rax/rcx/rdx, jmp_rsp, call_rax, ret, virtual_protect,
disable_cfg, disable_cet, add_rsp, , .
Array de 512 gadgets ().
Tabla g_rop_patterns[] de ~50+ patrones de firma de bytes para localizar gadgets en los módulos:
pop rax; ret, pop rcx; ret, pop rdx; ret, ..., mov [rcx], rax; ret,
mov rax, [rcx]; ret, jmp rsp, prólogo de VirtualProtect,
mov [gs:0x60], rax; ret, jmp [rax+0x58]; ret, lea rax, [rip+0x0]; jmp rax,
add rsp, 0x28; ret, cmp rdx/r8/r9, 0x0; je/jne; ret, etc.
uint64_t g_KernelBase, g_IkeextBase, g_SystemEprocess;
uint64_t g_IkeextDoubleFreeOffset = 0x12B960;
uint64_t g_IkeextProcessIkePayload = 0x52220;
uint64_t g_PopRax, g_PopRcx, g_PopRdx, g_PopR8, g_PopR9, g_PopRsp;
uint64_t g_MovRaxRsp, g_JmpRsp, g_VirtualProtect, g_DisableCFG, g_StackPivot;
uint64_t g_NtoskrnlBase, g_Kernel32Base, g_NtdllBase, g_HeapBase, g_ShellcodeAddr;
SOCKET g_Socket; struct sockaddr_in g_Target;
EXPLOIT_CONTEXT g_ExploitCtx; ROP_CHAIN g_RopChain;
HEAP_GROOM_CONTEXT g_GroomContext;
MODULE_DATA g_Modules; ROP_GADGET g_Gadgets;
std::vector<SUSPICIOUS_REGION> g_Regions;
main)InitializeCriticalSection, init_debug_info.is_hostile_environment() → salir si se detecta sandbox/VM.disable_amsi(), disable_defender(), disable_etw(), patch_etw().start_shell_listener() → listener de shell inverso en el puerto 4444.argv[1] (IP objetivo) + argv[2] (puerto, por defecto 500).init_udp_socket() + inet_pton + test_target_reachability().El proyecto está en proceso de finalización y no es totalmente funcional.
disable_amsi, disable_defender, disable_etw,
patch_etw, is_hostile_environment, test_target_reachability, start_shell_listener,
stop_shell_listener, print_usage, init_debug_info) están declaradas pero pueden estar
incompletas o ausentes según el estado del build.runassys/ y de las bibliotecas enlazadas.Este repositorio contiene un prototipo de investigación de seguridad ofensiva dirigido a un vector de explotación de red de bajo nivel (IKEv2/ikeext.dll, Windows).
El uso de este código está estrictamente reservado para entornos de prueba, investigación o laboratorio donde se disponga de autorización explícita.
El autor declina toda responsabilidad por cualquier uso ilegal, no autorizado o dañino de este código. El código se proporciona tal cual, sin garantía de funcionamiento, estabilidad o ausencia de efectos indeseados.
El proyecto está todavía en proceso de finalización y no es totalmente funcional en el estado actual.
logicoma__wibu00__wibu01PETETRIS.tw.rdata.text0x45,0x6e,0x69,...), Denuvo (0x64,0x65,0x6E,...).FAKE_DONGLE[] que imita dongles de hardware: skeydrv.dll, HASPDOSDRV,
MARXDEV1.SYS, WIBUKEY, SNTNLUSB, RNBOspro, etc.VM_SUBVM_MULVM_DIVVM_MODVM_EQUVM_NEQVM_LSSVM_GTRVM_LEQVM_GEQVM_OBF_INTVM_ADD_DBLVM_MUL_DBLif (OBFUS_CONDITION_BLOCK) BREAK_STACK_1breakfopenfclosefreadfwriteexitsnprintfvsprintfvsnprintfgetenvsystemabortatexitgetcwdtolowertoupperobfh_int_proxy() sobre todos los parámetros: CreateFile,
ReadFile, WriteFile, CloseHandle, VirtualAlloc, VirtualFree, CreateThread,
WaitForSingleObject, WaitForMultipleObjects, ExitProcess, GetModuleHandle,
GetModuleFileName, HeapCreate, HeapAlloc, HeapFree, GlobalAlloc, GlobalFree,
GetTempPath, SetEvent, ResetEvent, Sleep, memmove, GetParent, GetWindowRect,
GetClientRect, SetWindowPos, SetConsoleTextAttribute, GetDesktopWindow, GetStockObject.GetProcAddress reemplazado por GetProcAddress_custom: recorrido manual del IMAGE_EXPORT_DIRECTORY
(parseo de PE: e_lfanew, IMAGE_NT_HEADERS, IMAGE_DIRECTORY_ENTRY_EXPORT, AddressOfFunctions,
AddressOfNames, AddressOfNameOrdinals).LoadLibraryA ofuscado en una cadena de 6 wrappers anidados (LoadLibraryA_0 a LoadLibraryA_proxy),
con reconstrucción del nombre de la DLL carácter a carácter mediante las variables volátiles
_k, _e, _r, _n, _e, _l y sprintf.IsDebuggerPresent() || IsDebuggerPresent_proxy()loop().byte 0xEDBREAK_STACK_1retcrash()int $3.byte 0xED, 0x00sub_rspstack_pivotrop_chain[MAX_ROP_CHAIN_SIZE]SKF_FRAGMENTS + 1