Vulnerability Analysis

CVE-2025-24813-PoC : Apache Tomcat 远程代码执行漏洞批量检测脚本

简介

CVE-2025-24813 是一个影响 Apache Tomcat 的远程代码执行(RCE)漏洞,允许攻击者通过发送一个 PUT 请求上传恶意的序列化会话文件,并通过 GET 请求触发反序列化,从而在服务器上执行任意代码。该漏洞已在野外被利用,且其利用条件相对简单,只需 Tomcat 使用文件存储会话且支持部分 PUT 请求即可。

脚本功能

CVE-2025-24813-PoC 脚本主要用于检测 Apache Tomcat 是否存在此漏洞。它支持批量检测和单个检测两种模式。

  • 批量检测:通过指定一个包含目标 URL 列表的文件(如 url.txt),脚本可以并发检测多个目标。使用方式为: bashpython poc.py -l url.txt -t 5 其中 -l 指定 URL 列表文件,-t 指定线程数。
  • 单个检测:如果只需要检测单个目标,可以直接指定目标 URL: bashpython poc.py -u your-ip

脚本原理

  1. 生成恶意序列化payload:使用工具如 ysoserial 生成一个恶意的序列化 Java 对象,用于触发远程代码执行。
  2. 上传payload:通过 PUT 请求将恶意 payload 上传到 Tomcat 的会话存储目录中。
  3. 触发反序列化:发送一个 GET 请求,包含指向恶意会话文件的 JSESSIONID,导致 Tomcat 反序列化并执行恶意代码。

注意事项

  • 使用目的:本脚本仅供网络安全研究与教育目的使用,不得用于非法目的或未经授权的系统测试。
  • 免责声明:作者不对任何由于使用本文信息而导致的直接或间接损害承担责任。

相关资源

更多关于 CVE-2025-24813 的 PoC 脚本和漏洞复现步骤,请参考相关网络安全论坛和博客文章。

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Best OSINT Tools for Journalists 2026: Verify Sources, Images and Claims

Journalists use OSINT to verify public information before publishing. In 2026, misinformation, AI-generated images, fake…

10 hours ago

Install Docker on Ubuntu 20.04: Complete Step-by-Step Guide

Docker is an open-source platform that lets you package and run applications inside containers. Each container…

20 hours ago

Install PostgreSQL on Ubuntu: Database Setup and Admin Guide

PostgreSQL (often called Postgres) is an open-source relational database system. It supports advanced features like JSON…

21 hours ago

Install Xrdp Remote Desktop on Ubuntu: Setup and Connect

Xrdp is an open-source server that lets you connect to your Ubuntu machine from another computer…

21 hours ago

Tomcat 9 on Ubuntu 20.04: Install, Configure, and Start

Apache Tomcat is an open-source web server and Java servlet container. It is one of the…

21 hours ago

Automatic Updates on Ubuntu: Set Up unattended-upgrades

Keeping your Ubuntu system updated is one of the best ways to protect it. Security…

22 hours ago