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

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

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 包实现,支持试运行、备份和回滚功能。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

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

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

root@kitploit:~
# 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

root@kitploit:~
# 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

root@kitploit:~
# 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 文件
  • 验证凭据文件的文件权限

详细日志记录

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

友好的用户界面

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

目录结构

root@kitploit:~
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)

配置

环境变量

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

root@kitploit:~
# 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 文件:

root@kitploit:~
# .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

root@kitploit:~
# 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

root@kitploit:~
# 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

root@kitploit:~
# 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

root@kitploit:~
$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

root@kitploit:~
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

root@kitploit:~
$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

root@kitploit:~
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

# Remove old JAR files
sudo rm "$JAR_PATH"/commons-text-*.jar
sudo rm "$JAR_PATH"/commons-lang3-*.jar
# Copy new JAR files
sudo cp commons-text-1.11.0.jar "$JAR_PATH/"
sudo cp commons-lang3-3.18.0.jar "$JAR_PATH/"
# Set proper permissions
sudo chown fmserver:fmsadmin "$JAR_PATH"/commons-*.jar  # Adjust ownership as needed
sudo chmod 644 "$JAR_PATH"/commons-*.jar

5. 重启 Web Publishing Engine

Windows

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

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

macOS

root@kitploit:~
# Using fmsadmin (recommended)
sudo "/Library/FileMaker Server/Database Server/bin/fmsadmin" start wpe -u admin -p password

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

Ubuntu

root@kitploit:~
# Using fmsadmin (recommended)
sudo "/opt/FileMaker/FileMaker Server/Database Server/bin/fmsadmin" start wpe -u admin -p password

# Or using systemctl
sudo systemctl start filemaker-wpe

6. 验证 JAR 替换

  1. 检查 Web Publishing Engine 是否正在运行
  2. 确认新的 JAR 文件已就位且版本正确
  3. 测试 Web 发布功能
  4. 检查 FileMaker Server 日志中是否有任何错误

手动更新流程(备用方案)

如果自动化脚本失败,请按照以下手动步骤操作:

1. 停止 FileMaker Server 服务

Windows

root@kitploit:~
net stop "FileMaker Server"

macOS

root@kitploit:~
sudo launchctl stop com.filemaker.fms

Ubuntu

root@kitploit:~
sudo service fmshelper stop

2. 创建备份

  • 从 Data 文件夹备份您的数据库
  • 备份配置文件
  • 记录当前版本以便回滚

3. 下载更新

  • 从 Claris 下载 FileMaker Server 22.0.4
  • 验证校验和完整性
  • 使用适当的参数运行安装程序

4. 验证安装

  • 确认版本为 22.0.4 或更高版本
  • 测试数据库连接
  • 确认服务正在运行

5. 恢复服务

Windows

root@kitploit:~
net start "FileMaker Server"

macOS

root@kitploit:~
sudo launchctl start com.filemaker.fms

Ubuntu

root@kitploit:~
sudo service fmshelper start

故障排除

常见问题

“未找到 FileMaker Server”

  • 确认 FileMaker Server 已安装
  • 检查安装路径是否与预期位置匹配
  • 以适当的权限运行脚本

“权限不足”

  • 以管理员身份运行 PowerShell(Windows)
  • 使用 sudo 运行脚本(macOS/Ubuntu)
  • 确认用户帐户具有必要的权限

“JAR 备份创建失败”

  • 检查可用磁盘空间
  • 确认对备份目录的写入权限
  • 确保 JAR 文件未被正在运行的进程锁定

“JAR 下载失败”

  • 检查互联网连接
  • 确认防火墙设置允许通过 HTTPS 从 Apache Commons 仓库下载
  • 尝试手动下载并将其放入脚本目录

“Web Publishing Engine 重启失败”

  • 确认 fmsadmin 凭据正确
  • 检查 FileMaker Server 是否正在运行
  • 尝试使用 fmsadmin 命令手动重启
  • 检查 FileMaker Server 日志中的服务问题

日志位置

  • Windows:logs\filemaker-jar-replacer-windows.log
  • macOS:logs/filemaker-jar-replacer-macos.log
  • Ubuntu:logs/filemaker-jar-replacer-ubuntu.log

安全注意事项

  • 始终以适当的权限运行脚本
  • 执行前验证脚本完整性
  • 使用安全的凭据存储方法
  • 检查日志中是否有与安全相关的事件
  • 先在非生产环境中进行测试

支持与资源

Claris 官方资源

  • Claris 支持:https://support.claris.com/
  • FileMaker 社区:https://community.claris.com/
  • 安全公告:https://support.claris.com/s/topic/0TO4u000000TNvGGAW/security-advisories

紧急联系方式

  • Claris 技术支持:可通过您的支持计划获得
  • 安全问题:请报告至 [email protected]

测试

该项目包含适用于所有平台的全面测试套件,以确保可靠性和安全性。

测试框架

该项目为每个平台使用不同的测试框架:

  • Linux/macOS:BATS(Bash 自动化测试系统)
  • Windows:Pester(PowerShell 测试框架)

安装测试工具

BATS(Linux/macOS)

macOS(使用 Homebrew):

root@kitploit:~
brew install bats-core

Ubuntu/Debian:

root@kitploit:~
# Install via package manager
sudo apt update
sudo apt install bats

# Or install latest version from source
git clone https://github.com/bats-core/bats-core.git
cd bats-core
sudo ./install.sh /usr/local

手动安装(任何类 Unix 系统):

root@kitploit:~
git clone https://github.com/bats-core/bats-core.git
cd bats-core
sudo ./install.sh /usr/local

Pester(Windows)

Pester 随 PowerShell 5.1+ 和 Windows PowerShell 预装,但您可能需要将其更新到最新版本:

root@kitploit:~
# Check current version
Get-Module -Name Pester -ListAvailable

# Install/Update to latest version (PowerShell 5.1+)
Install-Module -Name Pester -Force -SkipPublisherCheck

# For PowerShell Core (7+)
Install-Module -Name Pester -Scope CurrentUser

运行测试

所有平台 - 单个测试文件

root@kitploit:~
# Run specific BATS test file (Linux/macOS)
bats tests/backup-creation.bats
bats tests/version-detection.bats

# Run specific Pester test file (Windows)
Invoke-Pester tests/windows/Integration.Tests.ps1
Invoke-Pester tests/windows/Utilities.Tests.ps1

所有平台 - 完整测试套件

root@kitploit:~
# Run all BATS tests (Linux/macOS)
bats tests/*.bats

# Run all Pester tests (Windows)
Invoke-Pester tests/windows/

测试类别

测试套件包括:

  • 单元测试:单个函数和模块测试
  • 集成测试:端到端工作流测试
  • 安全测试:凭据处理和权限验证
  • 平台特定测试:针对特定操作系统的功能验证
  • 边界情况测试:错误处理和边界条件测试

测试环境设置

测试会创建隔离的临时环境,不会影响您的系统或 FileMaker 安装。不过,某些测试可能需要:

  • 管理员/sudo 权限(用于权限提升测试)
  • 网络访问(用于下载模拟测试)
  • 足够的磁盘空间(用于备份创建测试)

许可证

此 JAR 替换器按原样提供,用于解决 CVE-2025-46295。使用时请遵守您的 FileMaker Server 许可协议和 Apache Commons 许可条款。

更新日志

版本 1.0.0

  • 初始版本
  • 支持 Windows、macOS 和 Ubuntu
  • 针对 CVE-2025-46295 的自动化 JAR 替换
  • commons-text 和 commons-lang3 JAR 文件替换
  • 全面的日志记录和备份功能
  • 集成 fmsadmin 的 Web Publishing Engine 管理
下载工具