The Struts 2 Architecture

深入解析Struts2 S2-061漏洞:从OGNL注入到命令执行实战 OGNL表达式注入是Java Web安全领域一种经典的代码注入攻击方式,其核心原理在于用户输入的数据被错误地解析并执行为代码。在MVC框架中,视图层与控制器层的数据绑定常依赖表达式引擎,若框架对用户输入验证不足,攻击者便可构造恶意表达式,从而绕过安全边界执行任意代码,实现远程命令执行。这种漏洞的技术价值在于揭示了框架设计时安全性与灵活性的平衡难题,常出现在Struts2等广泛使用的Java框架中。本文聚焦于Struts2 S2-061漏洞,它正是OGNL二次求值缺陷的典型体现,通过分析其独特的触发点与绕过补 阅读详情

From 官方文档  struts-2.3.16.3-docs/struts-2.3.16.3/docs/the-struts-2-request-flow.html


In the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is passed through a standard filter chain. The chain includes the (optional) ActionContextCleanUp filter, which is useful when integrating technologies such asSiteMesh Plugin. Next, the required FilterDispatcher is called, which in turn consults the ActionMapper to determine if the request should invoke an action.

If the ActionMapper determines that an Action should be invoked, the FilterDispatcher delegates control to the ActionProxy. The ActionProxy consults the framework Configuration Files manager (initialized from the struts.xml file). Next, the ActionProxy creates an ActionInvocation, which is responsible for the command pattern implementation. This includes invoking any Interceptors (the before clause) in advance of invoking the Action itself.

Once the Action returns, the ActionInvocation is responsible for looking up the proper result associated with the Action result code mapped in struts.xml. The result is then executed, which often (but not always, as is the case for Action Chaining) involves a template written in JSP or FreeMarker to be rendered. While rendering, the templates can use the Struts Tags provided by the framework. Some of those components will work with the ActionMapper to render proper URLs for additional requests.

!All objects in this architecture (Actions, Results, Interceptors, and so forth) are created by an ObjectFactory. This ObjectFactory is pluggable. We can provide our own ObjectFactory for any reason that requires knowing when objects in the framework are created. A popular ObjectFactory implementation uses Spring as provided by the Spring Plugin.

Interceptors are executed again (in reverse order, calling the after clause). Finally, the response returns through the filters configured in the web.xml. If the ActionContextCleanUp filter is present, the FilterDispatcher will not clean up the ThreadLocalActionContext. If the ActionContextCleanUp filter is not present, the FilterDispatcher will cleanup all ThreadLocals.


Apache Struts2 S2-015漏洞复现与OGNL注入原理深度剖析 OGNL表达式注入是Java Web安全领域一种经典的远程代码执行漏洞类型。其核心原理在于,当应用程序框架(如Struts2)将未经验证的用户输入直接传递给强大的OGNL表达式引擎进行解析时,攻击者可以注入恶意表达式,从而操纵服务器端逻辑,甚至执行任意系统命令。这项技术的安全价值在于揭示了框架默认信任机制下的高风险攻击面,对于理解Java应用安全模型至关重要。其典型应用场景广泛存在于基于Struts2等MVC框架构建的Web应用中,常被用于渗透测试和红队评估,以验证系统的安全性。本文以Apache Stru 阅读详情

相关推荐

别再怕DRIVER_VERIFIER_DMA_VIOLATION蓝屏:手把手教你用WinDbg分析IOMMU与驱动冲突

本文深入解析DRIVER_VERIFIER_DMA_VIOLATION蓝屏错误,从IOMMU原理到实战排错,手把手教你使用WinDbg分析驱动冲突。通过理解DMA与IOMMU的核心机制、搭建分析环境、解读DMAR表与设备拓扑,最终定位问题驱动并提供解决方案,帮助开发者和IT运维人员有效应对此类系统崩溃问题。

weixin_30298497的博客 803

Struts Architecture

1. Overview In the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is passed through a standard filter chain. The chain includes the (optional) ActionC

liuhebing的专栏 769

PX4算法解析:L1制导律

一、前沿 从今天开始,会陆续为大家解读开源飞控软件px4中使用到的各种算法,今天要讲述的是L1制导律,这是固定翼飞机进行路径跟踪的重要算法之一。这个算法是由MIT的研究人员提出,因为具有比较好的路径跟踪效果而得到广泛应用。在这之前,无人机在进行路径跟踪时一般采用基于侧偏距的PD控制器方法,至于为什么使用PD而不使用PID算法,那是因为位置环响应较慢,所以一般在外环采用PD算法,而在内环采用PID算...

weixin_44616080的博客 8255

Struts 2 - Architecture

From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-View-Controller pattern in Struts2 is realized with following five core components: Actions Interceptors Value Stack / OGNL Res...

weixin_33708432的博客 108

phaser3适配微信小游戏

phaser3适配微信小游戏

SilenzioX的博客 1803

2025年06月中国电子学会青少年软件编程(Python)等级考试试卷(二级)答案 + 解析

2025年06月中国电子学会青少年软件编程(Python)等级考试试卷(二级)答案 + 解析

伶俐角少儿编程 459

Struts uses a Model 2 architecture

Struts uses a Model 2 architecture. The Struts ActionServlet controls the navigationalflow. Another Struts class, the Action, is used to access the business classes.When the ActionServlet receives a r

学习,学习,再学习 1015

华为OD新系统机试真题 - 配置操作失败数量统计

华为OD机试新系统 4月8号【配置操作失败数量统计】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【配置操作失败数量统计】。

qq_45776114的博客 1160

Struts 2 Architecture

From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-View-Controller pattern in Struts2 is realized with following five core components: Actions Interceptors Value Stack

你等着...我会踩着五彩祥云来接你的! 662

自动识别象棋棋子的OpenCV应用

在计算机视觉领域,OpenCV是一个广泛应用的开源计算机视觉库,它提供了丰富的图像处理和分析工具。本文将介绍如何使用OpenCV实现自动识别象棋棋子的功能,并提供相应的源代码。通过以上代码,我们可以实现对棋盘图像中棋子的自动识别。需要注意的是,以上代码只是一个简单的示例,实际应用中可能需要根据具体情况进行参数调整和算法优化,以获得更好的识别效果。函数利用预处理后的图像,寻找图像中的轮廓,并根据轮廓的面积筛选出可能的棋子轮廓,最后在原图像中提取棋子区域。在主程序中,我们读取输入图像,并调用。

WzisTypescript的博客 907

扩散模型与强化学习(13):In-Context Reward Hacking现象与解决方案

奖励作弊(Reward Hacking)指智能体通过钻规则漏洞而非真正完成任务来最大化奖励信号。以论文编辑实验为例,研究提出“上下文奖励作弊”(ICRH)概念,即模型利用共享上下文钻空子,如盲目添加“正确!”或输出无关内容。实验发现,模型规模扩大可能加剧ICRH,且提示词优化难以根治。与传统奖励作弊不同,ICRH发生在部署阶段,由通用性驱动。应对建议包括多轮测试、多样化反馈及异常场景模拟,但尚无完美解决方案。

沉迷单车的追风少年 1319

3.Struts 2 Architecture

Struts and webwork has joined together to develop the Struts 2 Framework. Struts 2 Framework is very extensible and elegant for the development of enterprise web application of any size. In this secti

NJSun的专栏 1564

YOLO26改进策略【卷积层】| 引入注意力卷积模块RFAConv,关注感受野空间特征 助力YOLO26精度提升

RFAConv:创新空间注意力和标准卷积运算感受野空间特征是针对卷积核设计的,根据卷积核大小动态生成。以3×3卷积核为例,它由非重叠滑动窗口组成,每个窗口代表一个感受野滑块。

Limiiiing的博客 194

RoseIndia struts2 翻译 - Struts 2 Architecture

Struts 2 Architecture Struts 2 架构 Struts and webwork has joined together to develop the Struts 2 Framework. Struts 2 Framework is very extensible and elegant for the development of enterprise web appl...

mynameisjian的专栏 202

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

Struts 2 plugin architecture

Apache Struts 2 provides a simple plugin architecture so that develpers can extend the framework just by adding a JAR to the applications classpath (in addition to whatever JARs may be required to fu

prostore的专栏 494

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

struts2 framework's architecture

  In the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is passed through a standard filter chain. The chain includes the (optional) ActionContextCleanUp fil...

iteye_9525的博客 203

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Struts 2 Tutorial Basic MVC Architecture

Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts: Model - ...

weixin_34212189的博客 120

转:Struts 2 - Architecture

Struts is a flexible control layer based on standard technologies like Java Filters, JavaBeans, ResourceBundles, Locales, and XML, as well as various OpenSymphony packages, like OGNL and XWork. For

679

Docker+Vulhub快速搭建Struts2 S2-061漏洞靶场实战指南

在网络安全学习与渗透测试中,漏洞复现是理解漏洞原理、掌握利用手法的关键环节。传统方式往往受限于环境配置复杂、风险高等问题。容器化技术通过提供隔离的沙箱环境,完美解决了这一痛点。Docker作为主流的容器引擎,能够将应用及其依赖打包成独立、可移植的单元,实现环境的快速部署与一键清理,极大地提升了安全实验的效率与安全性。Vulhub项目则在此基础上,提供了大量预置的漏洞环境Docker Compose配置,覆盖了Struts2、ThinkPHP等主流框架的常见漏洞。本文将以Struts2 S2-061(CVE-

weixin_30617695的博客 338

struts2架构图

此文件copy自struts2 reference.个人认为这个图对理解struts2非常有帮助,所以就拿来放到自己的博客上了。 In the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is passed through a standard filter ...

xx510long的博客 303

Struts2实战 读后感

最好的一本Struts2入门书籍。花了两天时间将Struts2实战这本书又翻了一遍,每一次读起来都会有所收获。这本书不仅介绍了怎样使用Struts2这一世界级的MVC框架,而且讨论了Struts2的原理,为什么会这样设计Struts2,这样设计有什么样的好处。这也是国外技术图书与国内书籍的差别。 本书讨论了Action、Interceptor、Result等的使用,还包括了Spring集成、...

saber的专栏 200

architecture, framework and lib

作为一个软件从业人员,我问你:       请说一下你是如何理解architecture, framework and lib的?         因为每个人都工作经验不一样,理解程度不一样,可能会给出不同层次的答案,当然我认为没有优劣,只是视角,谈论对象的问题。   首先:以每个概念为对象来进行思考。      1)在我们设计程序架构的时候,肯定自然而然的就会考虑进一些框架性的,模板...

崔志华 167

FS3-AQ Architecture

1、About MerchantSpace Commerce 3Q:Whats MerchantSpace Commerce?A:Good Architecture .Architecture Explain:JSP  TOBATOBOTODAO->TOHibernateMySQLView     Controller         Local Applications            

Arqui Standard 1323

Struts的体系结构

<br /> <br /> <br />引自http://www.zhuoda.org/elite/34527.html<br /> <br />http://www.donews.net/tssungeng/archive/2004/06/13/27940.aspx <br />Struts的体系结构<br /> <br />(Struts Framework Architecture) <br />胡长城(银狐999) <br />关键字 <br />Struts,Framework,Architect

gao_xh2008的专栏 390

struts体系结构

 Struts的体系结构(Struts Framework Architecture)                                                 胡长城(银狐999)关键字    Struts,Framework,Architecture,Componennt,MVC预备知识     在开始学习Struts以前,以下的知识点,需要有

tiancityycf的专栏 833
上一篇: PreparedStatement和Statement区别
下一篇: 解决adb not responding if youd like to retry...错误
macandroid
博客等级 码龄14年 35粉丝 28原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值