Shiro RememberMe 1.2.4 反序列化导致的命令执行漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

Author: [rungobier (知道创宇404安全实验室)](http://blog.knownsec.com/2016/08/apache-shiro-java/) ### 概述 Apache Shiro 在 Java 的权限及安全验证框架中占用重要的一席之地,在它编号为550的 issue 中爆出严重的 Java 反序列化漏洞。下面,我们将模拟还原此漏洞的场景以及分析过程。 ### 0x01 漏洞场景还原 首先,需要获取 Apache Shiro 存在漏洞的源代码,具体操作如下: ``` git clone https://github.com/apache/shiro.git git checkout shiro-root-1.2.4 cd ./shiro/samples/web ``` 为了配合生成反序列化的漏洞环境,需要添加存在漏洞的 jar 包,编辑 pom.xml 文件,添加如下行: ``` <!-- 需要设置编译的版本 --> <properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties> ... <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <!-- 这里需要将jstl设置为1.2 --> <version>1.2</version> <scope>runtime</scope> </dependency> ..... <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <version>4.0</version> </dependency> <dependencies> ``` 修改完成 pom.xml 文件后,开始使用 mvn 进行存在漏洞环境的 war 包进行编译. 最终可以将 target 目录下生成的 samples-web-1.2.4.war 文件拷贝至...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息