Skip to content
KitploitKITPLOIT
工具博客
Log in
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-46295-fix-fms — 自动化脚本套件,用于检测并修复 CVE-2025-46295,通过替换 FileMaker Server 安装中易受攻击的 Apache Commons JAR 包实现,支持试运行、备份和回滚功能。 | Kitploit
工具/GitHubGitHub/soliantconsulting/cve-2025-46295-fix-fms
漏洞扫描器漏洞分析脚本与自动化配置审计DevSecOps供应链安全
GitHubsoliantconsulting/cve-2025-46295-fix-fms

CVE-2025-46295-fix-fms

自动化脚本套件,用于检测并修复 CVE-2025-46295,通过替换 FileMaker Server 安装中易受攻击的 Apache Commons JAR 包实现,支持试运行、备份和回滚功能。

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
查看仓库
1129个月前尚未审核
分享

FileMaker Apache Commons JAR 替换器

概述

FileMaker Apache Commons JAR 替换器是一种自动化解决方案,通过替换 FileMaker Server 安装中易受攻击的 Apache Commons JAR 文件来解决 CVE-2025-46295。该方案无需升级整个 FileMaker Server,而是遵循 Claris 官方指南,仅将易受攻击的 commons-text 和 commons-lang3 JAR 文件替换为更新版本。

快速下载

对于大多数用户,请直接下载最新版本,而无需从源码构建:

下载最新版本

  1. 前往发布页面

  2. 为您的平台下载相应文件:

    • Windows:filemaker-jar-replacer-windows.zip
    • macOS:filemaker-jar-replacer-macos.tar.gz
    • Ubuntu/Linux:filemaker-jar-replacer-ubuntu.tar.gz
  3. 解压并运行 - 有关详细的解压和使用说明,请参阅版本说明

为什么要使用发布版本?

  • ✅ 经过预测试 - 所有发布版本均已跨平台全面测试
  • ✅ 开箱即用 - 无需编译或配置
  • ✅ 安全可靠 - 发布版本经过签名并附带校验和以供验证
  • ✅ 完整 - 包含所有依赖项和文档

漏洞信息

服务器何时存在漏洞?

受影响的 JAR 文件仅在首次启用 Web Publishing Engine 时才会安装。

CVE-2025-46295 详细信息

  • 严重性:严重
  • CVSS 评分:9.8(严重)
  • 受影响组件:Apache Commons Text(1.10.0 之前的版本)和 Apache Commons Lang(3.18.0 之前的版本)
  • 影响:远程代码执行
  • 受影响的 FileMaker 版本:所有包含易受攻击 JAR 文件的版本
  • 解决方案:使用更新版本(commons-text 1.11.0+、commons-lang3 3.18.0+)替换易受攻击的 JAR 文件

官方资源

  • 手动 JAR 替换说明(无需升级 FileMaker Server):https://support.claris.com/s/answerview?anum=000049055&language=en_US
  • CVE-2025-46295 安全公告(NIST):https://nvd.nist.gov/vuln/detail/CVE-2025-46295
  • 漏洞确认与安全版本验证:https://support.claris.com/s/answerview?anum=000049059&language=en_US

支持的平台

此 JAR 替换器为以下平台提供相应的脚本:

  • Windows:PowerShell 脚本(replace-filemaker-jars-windows.ps1)
  • macOS:Bash 脚本(replace-filemaker-jars-macos.sh)
  • Ubuntu:Bash 脚本(replace-filemaker-jars-ubuntu.sh)

快速开始

前提条件

Windows

  • Windows Server 2016+
  • PowerShell 5.1 或更高版本
  • 管理员权限
  • 已安装 FileMaker Server

macOS

  • macOS 10.15(Catalina)或更高版本
  • Bash shell
  • sudo 权限
  • 已安装 FileMaker Server

Ubuntu

  • Ubuntu 20.04 LTS 或更高版本
  • Bash shell
  • sudo 权限
  • 已安装 FileMaker Server

用法

重要提示:在对 FileMaker Server 进行任何更改之前,请使用 --dry-run 选项运行脚本,以检查您的服务器是否存在漏洞,并查看将要进行的更改。

Windows

# Run PowerShell as Administrator

# Show help and available options
.\replace-filemaker-jars-windows.ps1 -Help

# Check if your server is vulnerable (RECOMMENDED FIRST STEP)
.\replace-filemaker-jars-windows.ps1 -DryRun

# Apply the security fix (only after reviewing dry-run results)
.\replace-filemaker-jars-windows.ps1

macOS

# Run with sudo privileges

# Show help and available options
sudo ./replace-filemaker-jars-macos.sh --help

# Check if your server is vulnerable (RECOMMENDED FIRST STEP)
sudo ./replace-filemaker-jars-macos.sh --dry-run

# Apply the security fix (only after reviewing dry-run results)
sudo ./replace-filemaker-jars-macos.sh

Ubuntu

# Run with sudo privileges

# Show help and available options
sudo ./replace-filemaker-jars-ubuntu.sh --help

# Check if your server is vulnerable (RECOMMENDED FIRST STEP)
sudo ./replace-filemaker-jars-ubuntu.sh --dry-run

# Apply the security fix (only after reviewing dry-run results)
sudo ./replace-filemaker-jars-ubuntu.sh

为什么要先使用 Dry Run?

--dry-run 选项是最安全的方式,可用于:

  • 检查漏洞状态,而无需进行任何更改
  • 识别需要替换的 JAR 文件
  • 验证脚本与您的 FileMaker Server 安装的兼容性
  • 预览将要执行的所有操作
  • 在进行更改之前发现潜在问题

请务必先使用 --dry-run 运行,以了解脚本将在您的系统上执行哪些操作。

功能特性

自动化 JAR 检测与替换

  • 自动检测 FileMaker Server 安装和 Web Publishing Engine 目录
  • 识别易受攻击的 commons-text 和 commons-lang3 JAR 文件
  • 下载更新的 JAR 文件(commons-text 1.11.0+、commons-lang3 3.18.0+)
  • 执行带完整性验证的原子化 JAR 文件替换

全面的备份与恢复

  • 在替换之前对现有 JAR 文件进行完整备份
  • 替换失败时自动回滚
  • 备份完整性验证

Web Publishing Engine 管理

  • 使用官方 fmsadmin 命令行工具进行服务管理
  • 为 fmsadmin 身份验证提供安全的凭据处理
  • JAR 替换后自动重启 Web Publishing Engine
  • 替换后的功能验证

安全优先策略

  • 安全的凭据处理(绝不记录或显示)
  • 支持环境变量和 .env 文件
  • 验证凭据文件的文件权限

详细日志记录

  • 带时间戳的全面操作日志
  • 平台专属的日志位置
  • 错误跟踪与恢复指导

友好的用户界面

  • 彩色状态指示器
  • 长时间操作的进度跟踪
  • 清晰的错误消息和恢复说明

目录结构

filemaker-jar-replacer/
├── README.md                          # This file
├── replace-filemaker-jars-windows.ps1 # Windows PowerShell script
├── replace-filemaker-jars-macos.sh    # macOS Bash script
├── replace-filemaker-jars-ubuntu.sh   # Ubuntu Bash script
├── scripts/
│   ├── windows/
│   │   └── modules/                   # PowerShell modules for JAR operations
│   ├── macos/
│   │   └── modules/                   # Bash function modules for JAR operations
│   ├── ubuntu/
│   │   └── modules/                   # Bash function modules for JAR operations
│   └── shared/                        # Shared utilities and templates
├── config/
│   ├── logging-config.json           # Logging configuration
│   └── jar-replacement-config.json   # JAR replacement configuration
├── tests/                            # Test suite (BATS and Pester)
├── logs/                             # Log files (created during execution)
└── backups/                          # JAR backup files (created during execution)

配置

环境变量

您可以使用环境变量来配置更新程序:

# FileMaker Server credentials
export FILEMAKER_USERNAME="admin"
export FILEMAKER_PASSWORD="your_secure_password"

# Custom paths (optional)
export FILEMAKER_INSTALL_PATH="/custom/path/to/filemaker"
export BACKUP_DIRECTORY="/custom/backup/path"

.env 文件支持

在脚本目录中创建一个 .env 文件:

# .env file (must have 600 permissions)
FILEMAKER_USERNAME=admin
FILEMAKER_PASSWORD=your_secure_password
BACKUP_DIRECTORY=/custom/backup/path

重要提示:出于安全考虑,请确保 .env 文件具有严格的权限(600)。

手动 JAR 替换流程(备用方案)

如果自动化脚本失败,请按照以下手动步骤替换易受攻击的 JAR 文件:

1. 停止 Web Publishing Engine

Windows

# Using fmsadmin (recommended)
& "C:\Program Files\FileMaker\FileMaker Server\Database Server\fmsadmin.exe" stop wpe -u admin -p password

# Or using services
Stop-Service "FileMaker Server Web Publishing Engine"

macOS

# Using fmsadmin (recommended)
sudo "/Library/FileMaker Server/Database Server/bin/fmsadmin" stop wpe -u admin -p password

# Or using launchctl
sudo launchctl stop com.filemaker.wpe

Ubuntu

# Using fmsadmin (recommended)
sudo "/opt/FileMaker/FileMaker Server/Database Server/bin/fmsadmin" stop wpe -u admin -p password

# Or using systemctl
sudo systemctl stop filemaker-wpe

2. 备份现有 JAR 文件

Windows

$jarPath = "C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\jwpc-tomcat\webapps\ROOT\WEB-INF\lib"
$backupPath = "C:\Temp\jar-backup-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
New-Item -ItemType Directory -Path $backupPath
Copy-Item "$jarPath\commons-text-*.jar" $backupPath
Copy-Item "$jarPath\commons-lang3-*.jar" $backupPath

macOS/Ubuntu

JAR_PATH="/Library/FileMaker Server/Web Publishing/publishing-engine/jwpc-tomcat/webapps/ROOT/WEB-INF/lib"  # macOS
# JAR_PATH="/opt/FileMaker/FileMaker Server/Web Publishing/publishing-engine/jwpc-tomcat/webapps/ROOT/WEB-INF/lib"  # Ubuntu

BACKUP_PATH="/tmp/jar-backup-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_PATH"
cp "$JAR_PATH"/commons-text-*.jar "$BACKUP_PATH/"
cp "$JAR_PATH"/commons-lang3-*.jar "$BACKUP_PATH/"

3. 下载更新的 JAR 文件

从 Apache Commons 下载以下 JAR 文件:

  • 从以下地址下载 commons-text-1.11.0.jar 或更高版本:https://commons.apache.org/proper/commons-text/download_text.cgi
  • 从以下地址下载 commons-lang3-3.18.0.jar 或更高版本:https://commons.apache.org/proper/commons-lang/download_lang.cgi

请将校验和与 Apache Commons 官方校验和进行比对验证。

4. 替换 JAR 文件

Windows

$jarPath = "C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\jwpc-tomcat\webapps\ROOT\WEB-INF\lib"
# Remove old JAR files
Remove-Item "$jarPath\commons-text-*.jar"
Remove-Item "$jarPath\commons-lang3-*.jar"
# Copy new JAR files
Copy-Item "commons-text-1.11.0.jar" $jarPath
Copy-Item "commons-lang3-3.18.0.jar" $jarPath

macOS/Ubuntu

JAR_PATH="/Library/FileMaker Server/Web Publishing/publishing-engine/jwpc-tomcat/webapps/ROOT/WEB-INF/lib"  # macOS
# JAR_PATH="/opt/FileMaker/FileMaker Server/Web Publishing/publishing-engine/jwpc-tomcat/webapps/ROOT/WEB-INF/lib"  # Ubuntu
下载工具