security - Struts2 + 类加载器漏洞 + 如何重现

标签 security struts2 classloader

如何重现安全问题 CVE-2014-0094 。我用谷歌搜索但找不到任何相同的引用。

最佳答案

成功了。

我必须启用日志记录(对于 ognl 包)才能查看错误。

class.classLoader.resource.dircontext.docBase=someText等参数传递给struts2应用程序。

localhost:8080/sampleApp/showlogin.do?class.classLoader.resource.diretext.docBase=someText

然后在日志中我会看到类似这样的内容。

java.lang.IllegalArgumentException: Document base base does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

应用解决方法后,我在日志中没有看到上述错误。

引用: http://www.brentron.com/safe/web/9248.html http://isayan.cocolog-nifty.com/diary/2014/04/s2-020.html

关于security - Struts2 + 类加载器漏洞 + 如何重现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23341344/

相关文章:

java - 为什么ClassLoader中没有.getURLs()?

security - 如何防止 Node.js/Express 提供我的应用程序的源代码?

security - 考虑摩尔定律的密码强度检查器?

java - 当操作类实现 ParameterAware 时,无法从 Junit 中的请求获取数据

java - 将具有 hibernate 对象的 api 转换为多个应用程序的服务

java - 以编程方式填充 JVM 永久代 (PermGen) 内存区域

security - Jenkins 构建不会在 OWASP 依赖检查器发现漏洞的管道阶段失败

google-chrome - 仅 Chrome 上的 ERR_SSL_VERSION_OR_CIPHER_MISMATCH 错误

java - 如何模拟<嵌套:root> from Struts 1 in Struts 2?

java - Struts 2.3.x 和 Struts 2.5.x 有什么区别