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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
spring-RCE-CVE-2022-22965 — CVE-2022-22965の教育的分析と概念実証エクスプロイト。JDK 9+でTomcat WARデプロイメントを使用したデータバインディングによるSpring MVC/WebFluxのリモートコード実行の脆弱性です。 | Kitploit
ツール/GitHubGitHub/enokiy/spring-rce-cve-2022-22965
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用学習と教育
GitHubenokiy/spring-rce-cve-2022-22965

spring-RCE-CVE-2022-22965

CVE-2022-22965の教育的分析と概念実証エクスプロイト。JDK 9+でTomcat WARデプロイメントを使用したデータバインディングによるSpring MVC/WebFluxのリモートコード実行の脆弱性です。

リポジトリを見る
194年前未レビュー

人気

すべて見る →

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

すべてのツールを探索

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

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

脆弱性の概要

最近、Spring で重大な CVE 脆弱性が報じられました。CVE 情報には"A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.(JDK 9+ 上で実行されている Spring MVC または Spring WebFlux アプリケーションは、データバインディングを介したリモートコード実行 (RCE) の影響を受ける可能性があります。具体的な悪用方法では、アプリケーションが WAR デプロイメントとして Tomcat 上で実行されている必要があります。アプリケーションが Spring Boot 実行可能 jar、つまりデフォルトの状態でデプロイされている場合、この悪用方法の影響を受けません。ただし、この脆弱性の性質はより一般的であり、他にも悪用する方法がある可能性があります)"。今回の分析では、この CVE を再現することで脆弱性の原理を学びます。

java Bean API

springmvc のパラメータバインディングの原理を見る前に、まず java Bean 関連の API をいくつか見てみましょう。

  • java Bean: 実際には仕様の一種であり、あるクラスがこの仕様を満たすと、そのクラスは他の特定のクラスから呼び出し可能になります。あるクラスが java Bean として使用される場合、そのクラスは一連のプライベートプロパティを持ち、public の get/is() または set() メソッドを介してプロパティの読み書きを行います。
  • Introspector(イントロスペクション): The Introspector class provides a standard way for tools to learn about the properties, events, and methods supported by a target Java Bean. For each of those three kinds of information, the Introspector will separately analyze the bean's class and superclasses looking for either explicit or implicit information and use that information to build a BeanInfo object that comprehensively describes the target bean.(Java が Java Bean クラスのプロパティ、イベント、およびメソッドに提供するデフォルトの処理方法です。たとえば、特定の bean クラスのプロパティ/メソッドを検索するときに、現在の bean クラスにそのプロパティが見つからない場合は、bean クラスの親クラスを検索するという規則などがあります。)
  • BeanInfo:Introspect on a Java Bean and learn about all its properties, exposed methods, and events.If the BeanInfo class for a Java Bean has been previously Introspected then the BeanInfo class is retrieved from the BeanInfo cache.(Java Bean をイントロスペクトして、そのすべてのプロパティ、公開されたメソッド、イベントを把握します。Java Bean の BeanInfo クラスが以前にイントロスペクトされた場合、BeanInfo クラスは BeanInfo キャッシュから取得されます。)
  • PropertyDescriptor: java Bean が一連のアクセッサメソッドを介して公開するプロパティを記述するために使用されます。

以下の java bean クラスを宣言します。```java public class User { private String name;

public User() {
}
public void setName(String name) {
    this.name = name;
}
public String getName() {
    return this.name;
}
public int getAge() {
    return 18;
}

}

次のテストコードを使用して、Introspector.getBeanInfoで取得される情報を確認します。```java
@Test
    public  void testIntrospector() throws IntrospectionException {
        BeanInfo beanInfo = Introspector.getBeanInfo(User.class);
        for (PropertyDescriptor pdesc:beanInfo.getPropertyDescriptors()){
            System.out.println("Property: " + pdesc.getName() + ",Class:" + pdesc.getPropertyType());
        }
//        for (MethodDescriptor md:beanInfo.getMethodDescriptors()) {
//            System.out.println("Method: " + md.getName());
//        }
    }

出力:```text Property: age,Class:int Property: class,Class:class java.lang.Class Property: name,Class:class java.lang.String

想定どおりのageとname以外にも、classプロパティがあり、クラス名はClassです。さらにIntrospector.getBeanInfo(Class.class)を呼び出せば、classLoaderなど、より多くの情報を取得できます:```text jdk11:
Property: annotatedInterfaces
Property: annotatedSuperclass
Property: annotation
Property: annotations
Property: anonymousClass
Property: array
Property: canonicalName
Property: class
Property: classLoader
Property: classes
Property: componentType
Property: constructors
Property: declaredAnnotations
Property: declaredClasses
Property: declaredConstructors
Property: declaredFields
Property: declaredMethods
Property: declaringClass
Property: enclosingClass
Property: enclosingConstructor
Property: enclosingMethod
Property: enum
Property: enumConstants
Property: fields
Property: genericInterfaces
Property: genericSuperclass
Property: interface
Property: interfaces
Property: localClass
Property: memberClass
Property: methods
Property: modifiers
Property: module
Property: name
Property: nestHost
Property: nestMembers
Property: package
Property: packageName
Property: primitive
Property: protectionDomain
Property: signers
Property: simpleName
Property: superclass
Property: synthetic
Property: typeName
Property: typeParameters

また、異なるJDKバージョンでIntrospector.getBeanInfo(Class.class)から取得される情報の違いを比較します。上はjdk-11での出力、下はJDK8での出力です:```text jdk8: Property: annotatedInterfaces Property: annotatedSuperclass Property: annotation Property: annotations Property: anonymousClass Property: array Property: canonicalName Property: class Property: classLoader Property: classes Property: componentType Property: constructors Property: declaredAnnotations Property: declaredClasses Property: declaredConstructors Property: declaredFields Property: declaredMethods Property: declaringClass Property: enclosingClass Property: enclosingConstructor Property: enclosingMethod Property: enum Property: enumConstants Property: fields Property: genericInterfaces Property: genericSuperclass Property: interface Property: interfaces Property: localClass Property: memberClass Property: methods Property: modifiers Property: name Property: package Property: primitive Property: protectionDomain Property: signers Property: simpleName Property: superclass Property: synthetic Property: typeName Property: typeParameters

The INPUT section is empty — no source text was provided to translate. Please supply the Markdown content for chunk 11.```text
Property: annotatedInterfaces
Property: annotatedSuperclass
Property: annotation
Property: annotations
Property: anonymousClass
Property: array
Property: canonicalName
Property: class
Property: classLoader
Property: classes
Property: componentType
Property: constructors
Property: declaredAnnotations
Property: declaredClasses
Property: declaredConstructors
Property: declaredFields
Property: declaredMethods
Property: declaringClass
Property: enclosingClass
Property: enclosingConstructor
Property: enclosingMethod
Property: enum
Property: enumConstants
Property: fields
Property: genericInterfaces
Property: genericSuperclass
Property: interface
Property: interfaces
Property: localClass
Property: memberClass
Property: methods
Property: modifiers
Property: module
Property: name
Property: package
Property: packageName
Property: primitive
Property: protectionDomain
Property: signers
Property: simpleName
Property: superclass
Property: synthetic
Property: typeName
Property: typeParameters

jdk9ではJDK8に比べてmoduleとpackageNameの2つの属性が追加され、JDK11ではmoduleとpackageNameの属性に加えてnestHostとnestMembersのさらに2つの属性があります。

ツールをダウンロード