├── src
└── main
│ ├── resources
│ ├── application.properties
│ └── templates
│ │ └── index.html
│ └── java
│ └── com
│ └── github
│ └── isafeblue
│ └── fastjson
│ ├── FastjsonAutotypeBypassDemoApplication.java
│ ├── entity
│ └── Comment.java
│ └── controller
│ └── CommentController.java
├── README.md
└── pom.xml
/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=80
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # fastjson-autotype-bypass-demo
2 | fastjson 1.2.68 版本有限制autotype bypass
3 |
4 | # 参考
5 |
6 | 《fastjson 1.2.68 autotype bypass 反序列化漏洞 gadget 的一种挖掘思路》:https://b1ue.cn/archives/382.html
7 |
8 | 《fastjson 1.2.68 最新版本有限制 autotype bypass》:https://b1ue.cn/archives/348.html
9 |
--------------------------------------------------------------------------------
/src/main/java/com/github/isafeblue/fastjson/FastjsonAutotypeBypassDemoApplication.java:
--------------------------------------------------------------------------------
1 | package com.github.isafeblue.fastjson;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FastjsonAutotypeBypassDemoApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FastjsonAutotypeBypassDemoApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/github/isafeblue/fastjson/entity/Comment.java:
--------------------------------------------------------------------------------
1 | package com.github.isafeblue.fastjson.entity;
2 |
3 | /**
4 | * @author 浅蓝
5 | * @email blue@ixsec.org
6 | * @since 2020/5/9 12:58
7 | */
8 | public class Comment {
9 |
10 | private String name;
11 | private String email;
12 | private String content;
13 |
14 | public String getName() {
15 | return name;
16 | }
17 |
18 | public void setName(String name) {
19 | this.name = name;
20 | }
21 |
22 | public String getEmail() {
23 | return email;
24 | }
25 |
26 | public void setEmail(String email) {
27 | this.email = email;
28 | }
29 |
30 | public String getContent() {
31 | return content;
32 | }
33 |
34 | public void setContent(String content) {
35 | this.content = content;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
| 序号 | 32 |姓名 | 33 |邮箱 | 34 |留言 | 35 | 36 | 37 |
|---|---|---|---|
| 39 | | 40 | | 41 | | 42 | |