本帖最后由 effort5 于 2012-3-31 01:25 编辑
HTTP_REFERER可以通过欺骗,或者禁止绕过。但下面那段AdminName=replace(session("AdminName"),"'","")
if AdminName="" then
call CloseConn()
response.redirect "login.asp"就不知道如何突破了。禁止了javascript,还是跳转到login.asp
这段代码的意思好像是 Session用户和密码为空就返回login.asp,不为空,着正确。
但刚学习xss,在网上看的方法也比较模糊
获取到的cookies如下:
@@@ASPSESSIONIDSSDCRTAB%3DMOMDCIMCECHFEIHPLGOJNAEN
用这个工具貌似不行啊,开始成功了一次。
222.jpg
所以找各位帮忙分析下!给个绕过方法!
111.png
<%
dim ComeUrl,cUrl,AdminName
ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
if ComeUrl="" then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
response.end
else
cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
if mid(ComeUrl,len(cUrl)+1,1)=":" then
cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
end if
cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
response.end
end if
end if
AdminName=replace(session("AdminName"),"'","")
if AdminName="" then
call CloseConn()
response.redirect "login.asp"
response.End()
end if
sql="select UserName from Admin where UserName='" & session("AdminName") & "' and Password='" & session("AdminPassword") & "'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
rs.close
response.Redirect("login.asp")
response.End()
end if
%>