Skip to content

Commit 287c952

Browse files
committed
(Update Vul: Struts2) 修正 struts2 配置问题
开启 devMode 后导致 s2-033, s2-037 PoC 执行失败
1 parent 497c6ae commit 287c952

6 files changed

Lines changed: 14 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## 获取并使用相关镜像
1212

13-
> 直接使用 docker 命令拉取相关镜像,并启动。需要查看相关环境的 tag
13+
> 直接使用 docker 命令拉取相关镜像,并启动。需要查看相关环境的 tag 可以直接在 dockerhub 查看或在具体的漏洞目录下查看 ReadME 文件。
1414
1515
以 Struts2 S2-037 漏洞环境为例:
1616

s/struts2/s2-037/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ RUN set -ex \
88
&& rm -rf /usr/local/tomcat/webapps/* \
99
&& chmod a+x /usr/local/tomcat/bin/*.sh
1010

11-
COPY struts2-rest.war /usr/local/tomcat/webapps/ROOT.war
11+
COPY src/struts2-rest.war /usr/local/tomcat/webapps/ROOT.war
1212
EXPOSE 8080
1313

1414
CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
15-
16-
# 1. docker build .
17-
# 2. docker run -d -p 80:8080 xxxxxx

s/struts2/s2-037/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ $ docker run -d -p 80:8080 medicean/vulapps:s_struts2_s2-037
3232
20160731
3333

3434
* 修正资源为本地路径
35+
36+
20160909
37+
38+
* 修正开启 devMode 后导致找不到类的问题
6.68 MB
Binary file not shown.

s/struts2/s2-devMode/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# S2-devMode Vul Demo
2-
FROM medicean/vulapps:s_struts2_s2-037
2+
FROM tomcat:8-jre8
33
44

5+
WORKDIR /tmp
6+
7+
RUN set -ex \
8+
&& rm -rf /usr/local/tomcat/webapps/* \
9+
&& chmod a+x /usr/local/tomcat/bin/*.sh
10+
11+
COPY src/struts2-rest.war /usr/local/tomcat/webapps/ROOT.war
512
EXPOSE 8080
613

714
CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
8-
9-
# 1. docker build .
10-
# 2. docker run -d -p 80:8080 xxxxxx

0 commit comments

Comments
 (0)