Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shengqi158/fastjson-remote-code-execute-poc
fastjson remote code execute poc 直接用intellij IDEA打开即可 首先编译得到Test.class,然后运行Poc.java
https://github.com/shengqi158/fastjson-remote-code-execute-poc
Last synced: 2 months ago
JSON representation
fastjson remote code execute poc 直接用intellij IDEA打开即可 首先编译得到Test.class,然后运行Poc.java
- Host: GitHub
- URL: https://github.com/shengqi158/fastjson-remote-code-execute-poc
- Owner: shengqi158
- Created: 2017-05-02T05:43:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-16T03:55:33.000Z (about 2 years ago)
- Last Synced: 2024-08-01T09:22:26.597Z (6 months ago)
- Language: Java
- Homepage:
- Size: 10.2 MB
- Stars: 408
- Watchers: 10
- Forks: 137
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - shengqi158/fastjson-remote-code-execute-poc - fastjson remote code execute poc 直接用intellij IDEA打开即可 首先编译得到Test.class,然后运行Poc.java (Java)
README
fastjson remote code execute poc
直接用intellij IDEA打开即可
首先编译得到Test.class,然后运行Poc.java支持jdk1.7,1.8
该poc只能运行在fastjson-1.2.22到fastjson-1.2.24版本区间,因为fastjson从1.2.22版本才开始引入SupportNonPublicField详情分析:http://xxlegend.com/2017/04/29/title-%20fastjson%20%E8%BF%9C%E7%A8%8B%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96poc%E7%9A%84%E6%9E%84%E9%80%A0%E5%92%8C%E5%88%86%E6%9E%90/
基于JdbcRowSetImpl的Fastjson RCE PoC构造与分析:http://xxlegend.com/2017/12/06/%E5%9F%BA%E4%BA%8EJdbcRowSetImpl%E7%9A%84Fastjson%20RCE%20PoC%E6%9E%84%E9%80%A0%E4%B8%8E%E5%88%86%E6%9E%90/
其他参考:http://xxlegend.com/2017/11/23/Java%20JSON%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B9%8B%E6%AE%87-%E7%9C%8B%E9%9B%AA%E5%AE%89%E5%85%A8%E5%BC%80%E5%8F%91%E8%80%85%E5%B3%B0%E4%BC%9A/基于JNDI的poc,JdbcRowSetImplPoc.java
1,在远程服务器上运行server中的JNDIServer或者LdapServer
2,将Exploit.class放到上述服务指定的位置,一般都是web服务目录下
3,执行JdbcRowSetImplPoc.java## 注意事项:
启动JNDIServer或者LdapServer的时候 factoryLocation 一定得是ip后带斜杠,这个斜杠少不得,少了的话到web服务器的请求就变成了GET / 而不是正常的GET /Exploit.class,正常的示例如下:
224.206.180.18 - - [07/Dec/2017:02:11:15 -0500] "GET /Exploit.class HTTP/1.1" 200 860 "-" "Java/1.8.0_102"