存在漏洞的 Struts2 应用程序
要求
- Maven (https://maven.apache.org)
- Struts <= 2.5.10
CVE-2017-5638 - Apache Struts 2 多部分表单 RCE
要求
- 定位一个发出多部分表单 POST 的 URL
开始使用
- 可以通过以下 Maven 命令启动应用程序/服务器:
mvn jetty:run。
- 对以下 URL http://localhost:8080/fileupload 运行漏洞利用程序 (https://www.exploit-db.com/exploits/41570/)
CVE: 2017-98505 - Apache Struts 2 REST 插件 RCE
要求
- Struts REST 插件
- Struts Convention 插件
- 存在一个可 POST 的创建项 REST URL。例如:
http://localhost:8080/pizza/1。重要的是遵循 struts2 插件命名约定以自动连接所有内容。
开始使用
- 可以通过以下 Maven 命令启动应用程序/服务器:
mvn jetty:run。
payload.xml 文件包含要 POST 到易受攻击的应用程序/REST 接口的 XML 载荷。
payload.txt 文件的第 17 行可以更新以运行任意命令。当前设置为启动 calc.exe (Windows)。对于 Linux 等系统,请替换为 /bin/sh。
curl -v -H "Content-Type:application/xml" -X POST -d @payload.txt http://localhost:8080/shapes/1