0x00 背景最近出了两个Struts漏洞,S2-032和S2-037。 都是官方插件REST出了问题,zone里面讨论也很热烈。我只代表个人观点和理解,如果理解有误,请批评指正。顺便聊聊里面的技术。 首先,看两个漏洞的描述: S2-033(CVE-2016-3087):
Remote Code Execution can be performed when using REST Plugin with ! operator when Dynamic Method Invocation is enabled.
S2-037:
Remote Code Execution can be performed when using REST Plugin.It is possible to p ...
0x00 基本原理建议阅读参考文章1的pdf,基本都是根据那篇文章进行分析的,这里单纯记录下我实验过程。 任意php文件都会处理一个上传请求,上传文件都会被暂时存储在一个临时目录下面。直到php页面完全处理完请求。
In particular he notes that if file_uploads = on is set in the PHP configuration file, then PHP will accept a file upload post to any PHP file. He also notes that the upload file will be stored in the tmp location, until the requested PHP pa ...
0x00 XStream组件功能
XStream可以轻易的将Java对象和xml文档相互转换,而且可以修改某个特定的属性和节点名称,而且也支持json的转换。
值得注意的是:
它转换对象时,不需要对象继承Serializable接口。 这极大的方便了反序列化攻击。
XStream简单序列化代码如下:
12345678910111213141516171819202122232425@Testpublic void testWriter(){ Person person = new Person(); //Set the properties using the setter methods //Note: This can also be done w ...