diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d09271 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_* diff --git a/README.md b/README.md new file mode 100644 index 0000000..b4e265e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# VulApps + +> 收集各种漏洞环境,为方便使用,统一采用 Dockerfile 形式 + +## S + +* Struts2[./struts2/] diff --git a/struts2/README.md b/struts2/README.md new file mode 100644 index 0000000..39d4f37 --- /dev/null +++ b/struts2/README.md @@ -0,0 +1,5 @@ +# Struts2 VulApps + + * S2-032[./s2-032/] + * S2-033(与 s2-037 相同)[./s2-037/] + * S2-037[./s2-037/] diff --git a/struts2/s2-032/Dockerfile b/struts2/s2-032/Dockerfile new file mode 100644 index 0000000..84ab1ae --- /dev/null +++ b/struts2/s2-032/Dockerfile @@ -0,0 +1,24 @@ +# S2-032 Vul Demo +FROM tomcat:8-jre8 +MAINTAINER Medici.Yan@Gmail.com + +ENV S2_VERSION 2.3.20.1 +ENV APP_ZIP_URL http://archive.apache.org/dist/struts/2.3.20.1/struts-$S2_VERSION-apps.zip + +WORKDIR /tmp + +RUN set -ex \ + && rm -rf /usr/local/tomcat/webapps/* \ + && curl -fSL "$APP_ZIP_URL" -o struts-apps.zip \ + && curl -fSL "$TOMCAT_TGZ_URL.asc" struts-apps.zip.asc \ + && gpg --batch --verify struts-apps.zip.asc struts-apps.zip \ + && unzip -j struts-apps.zip -d struts-apps \ + && mv struts-apps/apps/struts2-showcase.war /usr/local/tomcat/webapps/ROOT.war \ + && rm -rf struts-* + +EXPOSE 8080 + +CMD ["/usr/local/tomcat/bin/catalina.sh", "run"] + +# 1. docker build . +# 2. docker run -d -p 80:8080 xxxxxx diff --git a/struts2/s2-037/Dockerfile b/struts2/s2-037/Dockerfile new file mode 100644 index 0000000..d4f6050 --- /dev/null +++ b/struts2/s2-037/Dockerfile @@ -0,0 +1,24 @@ +# S2-033, S2-037 Vul Demo +FROM tomcat:8-jre8 +MAINTAINER Medici.Yan@Gmail.com + +ENV S2_VERSION 2.3.20.1 +ENV APP_ZIP_URL http://archive.apache.org/dist/struts/2.3.20.1/struts-$S2_VERSION-apps.zip + +WORKDIR /tmp + +RUN set -ex \ + && rm -rf /usr/local/tomcat/webapps/* \ + && curl -fSL "$APP_ZIP_URL" -o struts-apps.zip \ + && curl -fSL "$TOMCAT_TGZ_URL.asc" struts-apps.zip.asc \ + && gpg --batch --verify struts-apps.zip.asc struts-apps.zip \ + && unzip -j struts-apps.zip -d struts-apps \ + && mv struts-apps/apps/struts2-rest-showcase.war /usr/local/tomcat/webapps/ROOT.war \ + && rm -rf struts-* + +EXPOSE 8080 + +CMD ["/usr/local/tomcat/bin/catalina.sh", "run"] + +# 1. docker build . +# 2. docker run -d -p 80:8080 xxxxxx