Skip to content

Commit c63fd2d

Browse files
committed
sync
1 parent 32c7743 commit c63fd2d

File tree

3 files changed

+873
-796
lines changed

3 files changed

+873
-796
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,21 @@ fastjson复现简单、调用链多,很多时候反而更像是在看其他组
66

77
所以起了个项目记录自己复现过的POC,顺便记录pom依赖,毕竟找环境还是挺麻烦的
88

9-
后续poc 环境 分析文章在 github 同步
9+
后续poc 环境 分析文章在 github 同步
1010
https://github.com/Whoopsunix/fastjson_study
1111

12-
# 环境见
13-
https://github.com/Whoopsunix/PPPVULNS
12+
# 环境
13+
[环境](https://github.com/Whoopsunix/PPPVULNS/tree/master/fastjsonDemo)
1414

1515
# json框架区分、dnslog、版本探测、利用链探测
1616
[fastjson check](fastjsonCheck/fastjsonCheck.md)
1717

1818
# 全版本poc合集
1919
[1.2.24-1.2.80 poc](recurring.md)
2020

21+
# bypass
22+
[bypass](bypass/bypass.md)
23+
2124
# 感谢以下师傅的研究
2225
+ https://github.com/LeadroyaL/fastjson-blacklist fastjson黑白名单
2326
+ https://github.com/safe6Sec/Fastjson 目前最全的poc合集
@@ -26,4 +29,4 @@ https://github.com/Whoopsunix/PPPVULNS
2629
+ https://mp.weixin.qq.com/s/5mO1L5o8j_m6RYM6nO-pAA 版本区分
2730
+ https://b1ue.cn/archives/506.html 浅蓝博客
2831
+ https://github.com/knownsec/KCon/tree/master/2022 浅蓝kcon分享
29-
+ 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
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

bypass/bypass.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
```java
2+
JSON.parse("{\"@type\":\"org.example.User\",\"username\":\"1\"}")
3+
4+
&User {
5+
username: 1
6+
}
7+
```
8+
9+
# WAF bypass
10+
demo
11+
```json
12+
{
13+
"@type":"org.example.User",
14+
"username":"1"
15+
}
16+
```
17+
18+
# 编码绕过
19+
fastjson 对 key,value 值会自动进行 hex 解码和 unicode解码
20+
hex
21+
```json
22+
{
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"
25+
}
26+
```
27+
28+
unicode
29+
```json
30+
{
31+
"@type":"\u006f\u0072\u0067\u002e\u0065\u0078\u0061\u006d\u0070\u006c\u0065\u002e\u0055\u0073\u0065\u0072",
32+
"username":"1"
33+
}
34+
```
35+
36+
# 字符填充
37+
```json
38+
{
39+
"@type":"org.example.User",
40+
"username":"1",
41+
"f":"a*20000"
42+
}
43+
```
44+
45+
二次反序列化
46+
47+
$ref
48+
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
49+
50+
编码
51+
https://blog.csdn.net/fmyyy1/article/details/121674546
52+
53+
绕过 WAF ,在部分中间件中,multipart 支持指定 Content-Transformer-Encoding 可以使用 Base64 或 quoted-printable (QP 编码) 来绕过 WAF
54+
55+
大量字符绕过 WAF
56+
```
57+
[11111111111111111111111111111111111,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,[11111111111111111111111111111111111... ,...,{'\x40\u0074\x79\u0070\x65':xjava.lang.AutoCloseable"... ]]]]]
58+
59+
```
60+
61+
各种特性
62+
```
63+
,new:[NaN,x'00',{,/*}*/'\x40\u0074\x79\u0070\x65':xjava.lang.AutoClosea ble"
64+
```
65+

0 commit comments

Comments
 (0)