话说无聊去代码网站下套程序分析分析
可到了这个云起企业建站系统 下载数挺多的 于是乎看了起来
首先看到了它的后台login.asp文件。。一看 边觉得蛋疼。。。

if request.Form("submit")<>"" then
if request.Form("userid")="" or request.Form("password")="" then
response.Write("<script language=javascript>alert('用户名或者密码不能为空!');history.back();</script>")
response.end
end if

set rs=conn.execute("select * from gly where uid='"&trim(request.form("userid"))&"' and pwd='"&trim(request.form("password"))&"'")
if rs.eof then
response.Write("<script language=javascript>alert('用户名或者密码验证失败!');history.back();</script>")
response.End()
else
if rs("IsSuper")=1 then
session(strSession&"uid")="s"
session(strSession&"uidn")=rs("id")
else
session(strSession&"uid")="n"
session(strSession&"uidn")=rs("id")
end if
response.Redirect("index.asp")
response.End()
end if
rs.close
set rs=nothing
end if
大家 看到没只用trim函数过滤了空格。这样一来就直接出现了从客户端传递过来的数据,直接带入数据库查询了,这样我们就可以用'or'='or'登陆了

真是啊 。。什么年代了 还有这样的情况。。。

再来看看进去后台之后的上传文件。。

部分代码:

<title>上传文件</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#eeeeee" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form enctype="multipart/form-data" method="post" action="infopict.asp?fm=<%=request.QueryString("fm")%>&em=<%=request.QueryString("em")%>" name="form1">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
我找了很久以为还是找错了上传文件 因为我没看到上传类型的过滤代码。。
但是 确定之后 就是这个文件 因此蛋疼继续。。。

那就是说没过滤任何文件了 直接可以传咯。。

实在不怎样 。。编辑器版本由原来的ewebeditor转换为FCKeditor
后台做了安全验证 FCKeditor利用不了的 但是往往程序员忽略了最重要的漏洞。。

google关键字:inurl:arti_show.asp?id=
后台地址:management/login.asp
万能密码登陆 'or'='or'
后台可以直接上传文件

转载请注明来自WebShell'S Blog,本文地址:https://www.webshell.cc/627.html