Skip to content

Commit eb5c5e3

Browse files
committed
add Feign case :)
1 parent 2d0a57e commit eb5c5e3

File tree

7 files changed

+1195
-1016
lines changed

7 files changed

+1195
-1016
lines changed

README.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# fastjson 全版本漏洞复现
2+
23
By. Whoopsunix
34

45
# Why fastjson?
6+
57
fastjson复现简单、调用链多,很多时候反而更像是在看其他组件的序列化链,很适合拿来做java研究
68

79
所以起了个项目记录自己复现过的POC,顺便记录pom依赖,毕竟找环境还是挺麻烦的
@@ -10,23 +12,38 @@ fastjson复现简单、调用链多,很多时候反而更像是在看其他组
1012
https://github.com/Whoopsunix/fastjson_study
1113

1214
# 环境
13-
[环境](https://github.com/Whoopsunix/PPPVULNS/tree/master/fastjsonDemo)
1415

15-
# json框架区分、dnslog、版本探测、利用链探测
16+
[环境](https://github.com/Whoopsunix/PPPVULNS/tree/master/components/fastjsonDemo)
17+
18+
# json检测
19+
20+
通过实战案例记录不断更新,如何区分不同的框架、dnslog探测、版本探测、利用链探测
21+
1622
[fastjson check](fastjsonCheck/fastjsonCheck.md)
1723

1824
# 全版本poc合集
25+
1926
[1.2.24-1.2.80 poc](recurring.md)
2027

2128
# bypass
29+
30+
绕过手段
31+
2232
[bypass](bypass/bypass.md)
2333

34+
# 其他利用
35+
36+
二次反序列化、原生反序列化相关在其他项目中
37+
2438
# 感谢以下师傅的研究
25-
+ https://github.com/LeadroyaL/fastjson-blacklist fastjson黑白名单
26-
+ https://github.com/safe6Sec/Fastjson 目前最全的poc合集
27-
+ https://github.com/su18/hack-fastjson-1.2.80 1.2.80 POC
28-
+ https://github.com/safe6Sec/ShiroAndFastJson 1.2.80 poc含环境
29-
+ https://mp.weixin.qq.com/s/5mO1L5o8j_m6RYM6nO-pAA 版本区分
30-
+ https://b1ue.cn/archives/506.html 浅蓝博客
31-
+ https://github.com/knownsec/KCon/tree/master/2022 浅蓝kcon分享
32-
+ https://www.yulegeyu.com/2022/11/12/Java%E5%AE%89%E5%85%A8%E6%94%BB%E9%98%B2%E4%B9%8B%E8%80%81%E7%89%88%E6%9C%ACFastjson-%E7%9A%84%E4%B8%80%E4%BA%9B%E4%B8%8D%E5%87%BA%E7%BD%91%E5%88%A9%E7%94%A8/ 雨了个雨 低版本 bcel
39+
40+
+
41+
+ https://github.com/LeadroyaL/fastjson-blacklist fastjson黑白名单
42+
+ https://github.com/safe6Sec/Fastjson 目前最全的poc合集
43+
+ https://github.com/su18/hack-fastjson-1.2.80 1.2.80 POC
44+
+ https://github.com/safe6Sec/ShiroAndFastJson 1.2.80 poc含环境
45+
+ https://mp.weixin.qq.com/s/5mO1L5o8j_m6RYM6nO-pAA 版本区分
46+
+ https://b1ue.cn/archives/506.html 浅蓝博客
47+
+ https://github.com/knownsec/KCon/tree/master/2022 浅蓝kcon分享
48+
+ https://www.yulegeyu.com/2022/11/12/Java%E5%AE%89%E5%85%A8%E6%94%BB%E9%98%B2%E4%B9%8B%E8%80%81%E7%89%88%E6%9C%ACFastjson-%E7%9A%84%E4%B8%80%E4%BA%9B%E4%B8%8D%E5%87%BA%E7%BD%91%E5%88%A9%E7%94%A8/
49+
雨了个雨 低版本 bcel

bypass/bypass.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,75 @@ JSON.parse("{\"@type\":\"org.example.User\",\"username\":\"1\"}")
77
```
88

99
# WAF bypass
10+
1011
demo
12+
1113
```json
1214
{
13-
"@type":"org.example.User",
14-
"username":"1"
15+
"@type": "org.example.User",
16+
"username": "1"
1517
}
1618
```
1719

1820
# 编码绕过
21+
1922
fastjson 对 key,value 值会自动进行 hex 解码和 unicode解码
23+
2024
hex
25+
2126
```json
2227
{
23-
"\x40\x74\x79\x70\x65":"\x6f\x72\x67\x2e\x65\x78\x61\x6d\x70\x6c\x65\x2e\x55\x73\x65\x72",
24-
"username":"1"
28+
"\x40\x74\x79\x70\x65": "\x6f\x72\x67\x2e\x65\x78\x61\x6d\x70\x6c\x65\x2e\x55\x73\x65\x72",
29+
"username": "1"
2530
}
2631
```
2732

2833
unicode
34+
2935
```json
3036
{
31-
"@type":"\u006f\u0072\u0067\u002e\u0065\u0078\u0061\u006d\u0070\u006c\u0065\u002e\u0055\u0073\u0065\u0072",
32-
"username":"1"
37+
"@type": "\u006f\u0072\u0067\u002e\u0065\u0078\u0061\u006d\u0070\u006c\u0065\u002e\u0055\u0073\u0065\u0072",
38+
"username": "1"
39+
}
40+
41+
{
42+
"\u0040\u0074\u0079\u0070\u0065": "\u006f\u0072\u0067\u002e\u0065\u0078\u0061\u006d\u0070\u006c\u0065\u002e\u0055\u0073\u0065\u0072",
43+
"username": "1"
3344
}
3445
```
3546

3647
# 字符填充
48+
3749
```json
3850
{
39-
"@type":"org.example.User",
40-
"username":"1",
41-
"f":"a*20000"
51+
"@type": "org.example.User",
52+
"username": "1",
53+
"f": "a*20000"
4254
}
4355
```
4456

4557
二次反序列化
4658

4759
$ref
60+
4861
http://www.bmth666.cn/bmth_blog/2022/04/11/Fastjson%E6%BC%8F%E6%B4%9E%E5%AD%A6%E4%B9%A0/#%E9%A2%98%E7%9B%AE%E5%A4%8D%E7%8E%B0
4962

5063
编码
64+
5165
https://blog.csdn.net/fmyyy1/article/details/121674546
5266

53-
绕过 WAF ,在部分中间件中,multipart 支持指定 Content-Transformer-Encoding 可以使用 Base64 或 quoted-printable (QP 编码) 来绕过 WAF
67+
绕过 WAF ,在部分中间件中,multipart 支持指定 Content-Transformer-Encoding 可以使用 Base64 或 quoted-printable (QP 编码)
68+
来绕过 WAF
5469

5570
大量字符绕过 WAF
71+
5672
```
5773
[11111111111111111111111111111111111,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,...,{'\x40\u0074\x79\u0070\x65':xjava.lang.AutoCloseable"... ]]]]]
5874
5975
```
6076

6177
各种特性
78+
6279
```
6380
,new:[NaN,x'00',{,/*}*/'\x40\u0074\x79\u0070\x65':xjava.lang.AutoClosea ble"
6481
```
Loading
Loading
Loading

0 commit comments

Comments
 (0)