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

How AI Puts Data Security at Risk

Artificial Intelligence (AI) is changing how industries operate, automating processes, and driving new innovations. However,…

3 weeks ago

The Evolution of Cloud Technology: Where We Started and Where We’re Headed

Image credit:pexels.com If you think back to the early days of personal computing, you probably…

4 weeks ago

The Evolution of Online Finance Tools In a Tech-Driven World

In an era defined by technological innovation, the way people handle and understand money has…

4 weeks ago

A Complete Guide to Lenso.ai and Its Reverse Image Search Capabilities

The online world becomes more visually driven with every passing year. Images spread across websites,…

4 weeks ago

How Web Application Firewalls (WAFs) Work

General Working of a Web Application Firewall (WAF) A Web Application Firewall (WAF) acts as…

2 months ago

How to Send POST Requests Using curl in Linux

How to Send POST Requests Using curl in Linux If you work with APIs, servers,…

2 months ago