人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動態(tài)

萬博企業(yè)網(wǎng)站管理系統(tǒng)注入漏洞(MemberLogin.asp)

發(fā)布日期:2022-01-30 09:44 | 文章來源:站長之家
這兩天拿站的時候,好幾回都遇到個叫萬博的企業(yè)管理系統(tǒng),今天有時間就下載過來看了看,找到了個注入漏洞,郁悶的是,得手工,沒法用工具,累人的事。因為已經(jīng)找到了一個,我就沒興趣接著往下看了。

這個注入漏洞發(fā)生在html/MemberLogin.asp文件里,在Include下有NoSqlHack.Asp文件也沒調用,呵呵,就有了我們利用的地方了。

MemberLogin.asp源碼如下:

復制代碼
代碼如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<%Response.Charset="utf-8"%>
<!--#include file="../Include/Const.asp"-->
<!--#include file="../Include/ConnSiteData.asp"-->
<!--#include file="../Include/Md5.asp"-->
<%
if request.QueryString("Action")="Out" then
session.contents.remove "MemName"
session.contents.remove "GroupID"
session.contents.remove "GroupLevel"
session.contents.remove "MemLogin"
response.redirect Cstr(request.ServerVariables("HTTP_REFERER"))
response.end
end if
Public ErrMsg(3)
ErrMsg(0)="·登錄名不正確,請返回。"
ErrMsg(1)="·登錄密碼不正確,請返回。"
ErrMsg(2)="·帳號非使用狀態(tài),請返回。"
dim LoginName,LoginPassword,VerifyCode,MemName,Password,GroupID,GroupName,Working,rs,sql
LoginName=trim(request.form("LoginName"))
LoginPassword=Md5(request.form("LoginPassword"))
set rs = server.createobject("adodb.recordset")
sql="select * from NwebCn_Members where MemName='"&LoginName&"'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
WriteMsg(ErrMsg(0))
response.end
else
MemName=rs("MemName")
Password=rs("Password")
GroupID=rs("GroupID")
GroupName=rs("GroupName")
Working=rs("Working")
end if
if LoginPassword<>Password then
WriteMsg(ErrMsg(1))
response.end
end if
if not Working then
WriteMsg(ErrMsg(2))
response.end
end if
if UCase(LoginName)=UCase(MemName) and LoginPassword=Password then
rs("LastLoginTime")=now()
rs("LastLoginIP")=Request.ServerVariables("Remote_Addr")
rs("LoginTimes")=rs("LoginTimes")+1
rs.update
rs.close
set rs=nothing
session("MemName")=MemName
session("GroupID")=GroupID
'===========
set rs = server.createobject("adodb.recordset")
sql="select * from NwebCn_MemGroup where GroupID='"&GroupID&"'"
rs.open sql,conn,1,1
session("GroupLevel")=rs("GroupLevel")
rs.close
set rs=nothing
'===========
session("MemLogin")="Succeed"
session.timeout=60
response.redirect Cstr(request.ServerVariables("HTTP_REFERER"))
response.end
end if
%>

看到了,LoginName未作過濾,直接代入查詢,因此產生了這個注入,就是利用的方法有點麻煩,我試了下,沒辦法用工具,郁悶了。

手工如:wzasdf' and exists (select * from [nwebcn_admin]) and '1'='1

修復方法:LoginName=trim(request.form("LoginName"))
用LoginName=server.htmlencode(trim(request.form("LoginName")) )
或加入include目錄里面的NoSqlHack.Asp記載一下也可以。

FROM http://www.st999.cn/blog

美國穩(wěn)定服務器

版權聲明:本站文章來源標注為YINGSOO的內容版權均為本站所有,歡迎引用、轉載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。

相關文章

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務

7x24全年不間斷在線

專屬顧問服務

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務熱線

關注
微信

關注官方微信
頂部