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

groupdel Command in Linux: Remove a Group and Audit Files

The groupdel command in Linux removes a group from the system. It deletes the group's entry from /etc/group and /etc/gshadow,…

12 hours ago

wc Command in Linux: Count Lines, Words, Characters, and Bytes

The wc command in Linux counts lines, words, characters, and bytes in files or standard input. It…

12 hours ago

top Command in Linux: Monitor Processes and Resource Usage

The top command in Linux provides a real-time view of running processes and system resource usage. From…

12 hours ago

usermod Command in Linux: Modify User Accounts and Groups

The usermod command in Linux modifies existing user account attributes. You can use it to manage group…

12 hours ago

sort Command in Linux: Sort Text, Numbers, Columns, and More

The sort command in Linux reads lines from files or standard input and writes them to standard…

2 days ago

wall Command in Linux: Broadcast Messages to Logged-In Users

The wall command in Linux sends a message to the terminals of all currently logged-in users. The…

2 days ago