信息来源:网络安全文章系统
今天又发现了一个动力3.51网站管理系统的收费破解漏洞!该漏洞和之前发现的三个漏洞一样可以使普通注册会员免费阅读收费文章完整内容!
漏洞破解方法:注册为网站会员,然后打开收费文章,提示您没有权限阅读全文,不要管它,直接点"打印本文",接下来出现的"打印文章"页面就可以看到收费文章的全文了!
解决方法:
打开网站主目录下的Article_Print.asp文件(修改前请先备份!)
查找:
复制内容到剪贴板
代码:
<!--#include file="Inc/conn.asp"-->
<%
dim ArticleID,sql,rs
ArticleID=Clng(trim(request("ArticleID")))
if ArticleId="" then
response.Redirect("Default.asp")
end if
sql="select * from article where ArticleID=" & ArticleID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.Write("<p>找不到文章</p>")
else
%> 替换为:
复制内容到剪贴板
代码:
<!--#include file="Inc/syscode_article.asp"-->
<%
const ChannelID=2
Const ShowRunTime="Yes"
dim tLayout,tUser
PageTitle="正文"
strFileName="Article_Show.asp"
if ArticleId<=0 then
FoundErr=true
ErrMsg=ErrMsg & "<br><li>请指定文章ID</li>"
end if
if FoundErr=True then
call WriteErrMsg()
else
%> 继续查找:
复制内容到剪贴板
代码:
<%=replace(rs("Content"),chr(34),"")%> 替换为:
复制内容到剪贴板
代码:
<%call ShowArticleContent()%> 好了,大功告成!这样的话,除非是点数足够(或有效期未过期)的收费用户,否则是不能打印此文章全文的!快测试看看吧!此修改方法在我自己的网站上()测试,没有任何副作用!(如果有人发现新的动力漏洞或发现我的修改方法有错误,希望能够告诉我(可以加我QQ,验证信息就填"动力漏洞",虽不能保证肯定能解决问题,但我会尽力的!^-^)
需要的话大家可以到我的网站上去测试,飞越快乐家园
如不想注册的话,可以用测试账号:test 密码:testtest
注:此解决方法并不是我先发现的,但却是我花了半个小时,改了十余次代码、打印了几张纸而找出的!(我在编程方面是菜菜,所以得这么费周折~~~~大家别笑我哦~~^-^)
这是我已修改好的文件:
复制内容到剪贴板
代码:
<!--#include file="Inc/syscode_article.asp"-->
<%
const ChannelID=2
Const ShowRunTime="Yes"
dim tLayout,tUser
PageTitle="正文"
strFileName="Article_Show.asp"
if ArticleId<=0 then
FoundErr=true
ErrMsg=ErrMsg & "<br><li>请指定文章ID</li>"
end if
if FoundErr=True then
call WriteErrMsg()
else
%>
<html>
<head>
<title><%=rs("Title")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="STYLE.CSS" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()">
<noscript><iframe src=*></iframe></noscript>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="border" style="word-break:break-all">
<tr>
<td> <table width="100%" border="0" cellspacing="4" cellpadding="1">
<tr>
<td><table width=100% border=0 cellpadding=0 cellspacing=0 class="title">
<tr>
<td width=2% height="20"> <div align="center"> <img src="Images/ARROW2.GIF" width="6" height="7" align="absmiddle"> </div></td>
<td width=87%>您要打印的文件是:<font color="#CC0000"><%=rs("Title")%></font>
</td>
<td width="11%" align=right><div align="center"><a href="javascript:window.print()"><img src=Images/printpage.gif alt="打印" width="16" height="16" border="0" align=absmiddle></a>
<a href=javascript:window.print()>打印本文</a></div></td>
</tr>
</table></td>
</tr>
</table>
<p align="center"><strong><font size="4" face="黑体"><%=rs("Title")%></font></strong></p>
<p align="center"><strong><font size="2"><%=rs("Title1")%></font></strong><br>
<br>
作者:<%=rs("Author")%> 转贴自:<%=rs("CopyFrom")%> 点击数:<%=rs("Hits")%></p>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/bj4.gif" height="1"></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="6" cellpadding="4">
<tr>
<td><%call ShowArticleContent()%></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
end if
rs.close
set rs=nothing
call CloseConn
%>