diff --git a/LKWA/Dockerfile b/LKWA/Dockerfile new file mode 100644 index 0000000..eeb2fe1 --- /dev/null +++ b/LKWA/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:18.04 +MAINTAINER weev3 +ENV TZ=Europe/Minsk +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update +RUN apt-get -y update && apt-get install -y apache2 php +COPY . /var/www/html/ +RUN chmod -R 777 /var/www/html/phar_deserial/uploads +COPY config/start.sh /usr/local/bin +COPY config/apache2.conf /etc/apache2/apache2.conf +COPY config/php.ini /etc/php/7.2/apache2/php.ini +RUN rm -rf /var/www/html/index.html +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf +RUN a2enmod php7.2 +RUN a2enmod rewrite +RUN chmod +x /usr/local/bin/start.sh +RUN service apache2 restart +CMD ["/usr/local/bin/start.sh"] +EXPOSE 80 diff --git a/LKWA/docker-compose.yml b/LKWA/docker-compose.yml new file mode 100644 index 0000000..99a29ea --- /dev/null +++ b/LKWA/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.0' +services: + web: + build: . + ports: + - "3000:80" + container_name: "lkwa" diff --git a/README.md b/README.md index 065ac71..6650031 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ vulstudy是专门收集当下流行的漏洞学习平台,并将其制作成doc |10|[DSVW](https://github.com/stamparm/DSVW)|综合|[Miroslav Stampar](https://github.com/stamparm)|python| |11|[vulnerable-node](https://github.com/cr0hn/vulnerable-node)|综合|[cr0hn](https://github.com/cr0hn)|NodeJS| |12|[MCIR](https://github.com/SpiderLabs/MCIR)|综合|[Spider Labs](https://github.com/SpiderLabs)|php| +|13|[XSS挑战之旅](https://github.com/SpiderLabs/MCIR)|XSS|未知|php| ## 0x01 安装 @@ -50,7 +51,7 @@ cd vulstudy docker-compose up -d #启动容器 docker-compose stop #停止容器 ``` -![主界面](doc/vulstudy.jpg) +![主界面](doc/vulstudy.png) ## 0x3 FAQ **1.第一次启动bWAPP容器访问其主页会报错如下:** diff --git a/Webug/Dockerfile b/Webug/Dockerfile new file mode 100644 index 0000000..820836f --- /dev/null +++ b/Webug/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:trusty +MAINTAINER Area39@163.com +RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse"> /etc/apt/sources.list +RUN apt-get update \ + && apt-get install -y mysql-server apache2 php5 php5-mysql +COPY sql /root/ +RUN /etc/init.d/mysql start &&\ + mysql -e "grant all privileges on *.* to 'root'@'%' identified by 'toor';"&&\ + mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'toor';"&&\ + mysql -u root -ptoor -e "show databases;" &&\ + mysql -u root -ptoor --default-character-set=utf8 /tmp/my.cnf \ + && mv /tmp/my.cnf /etc/mysql/my.cnf +COPY webug /var/www/html +RUN rm /var/www/html/index.html &&\ + chown www-data:www-data /var/www/html -R &&\ + rm -rf /root/* +COPY httpd-foreground /usr/bin +EXPOSE 80 +CMD ["httpd-foreground"] diff --git a/Webug/httpd-foreground b/Webug/httpd-foreground new file mode 100644 index 0000000..5695274 --- /dev/null +++ b/Webug/httpd-foreground @@ -0,0 +1,12 @@ + +#!/bin/bash +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /usr/local/apache2/logs/httpd.pid +service mysql start +apache2ctl start +while test "1" = "1" +do +sleep 1000 +done diff --git a/XSS-challenge-tour/Dockerfile b/XSS-challenge-tour/Dockerfile new file mode 100755 index 0000000..40e5a3f --- /dev/null +++ b/XSS-challenge-tour/Dockerfile @@ -0,0 +1,9 @@ +FROM php:5.6-apache + +MAINTAINER c0ny1 + +# set DirectoryIndex:index.htm +COPY docker-php.conf /etc/apache2/conf-enabled/ + +RUN rm -rf /var/www/html/* +ADD ./src/ /var/www/html/ diff --git a/XSS-challenge-tour/docker-compose.yml b/XSS-challenge-tour/docker-compose.yml new file mode 100755 index 0000000..96b92e9 --- /dev/null +++ b/XSS-challenge-tour/docker-compose.yml @@ -0,0 +1,7 @@ +version: '2' +services: + web: + #build: . + image: c0ny1/xss-challenge-tour:latest + ports: + - "8091:80" diff --git a/XSS-challenge-tour/docker-php.conf b/XSS-challenge-tour/docker-php.conf new file mode 100755 index 0000000..683d4ab --- /dev/null +++ b/XSS-challenge-tour/docker-php.conf @@ -0,0 +1,12 @@ + + SetHandler application/x-httpd-php + + +DirectoryIndex disabled +DirectoryIndex index.php index.html index.htm + + + Options -Indexes + AllowOverride All + + diff --git a/XSS-challenge-tour/src/chk.js b/XSS-challenge-tour/src/chk.js new file mode 100755 index 0000000..734ad91 --- /dev/null +++ b/XSS-challenge-tour/src/chk.js @@ -0,0 +1,4 @@ +window.alert = function() + { + confirm("完成的不错!"); +} diff --git a/XSS-challenge-tour/src/index.php b/XSS-challenge-tour/src/index.php new file mode 100755 index 0000000..d9a530e --- /dev/null +++ b/XSS-challenge-tour/src/index.php @@ -0,0 +1,13 @@ + + + +欢迎来到XSS挑战 + + +

欢迎来到XSS挑战

+
+

点击图片开始你的XSS之旅吧!

+ + + + diff --git a/XSS-challenge-tour/src/index.png b/XSS-challenge-tour/src/index.png new file mode 100755 index 0000000..185ccec Binary files /dev/null and b/XSS-challenge-tour/src/index.png differ diff --git a/XSS-challenge-tour/src/level1.php b/XSS-challenge-tour/src/level1.php new file mode 100755 index 0000000..68a8e78 --- /dev/null +++ b/XSS-challenge-tour/src/level1.php @@ -0,0 +1,29 @@ + + + + +欢迎来到level1 + + +

欢迎来到level1

+欢迎用户".$str.""; +?> +
+payload的长度:".strlen($str).""; +?> + + + + + + diff --git a/XSS-challenge-tour/src/level1.png b/XSS-challenge-tour/src/level1.png new file mode 100755 index 0000000..99664cd Binary files /dev/null and b/XSS-challenge-tour/src/level1.png differ diff --git a/XSS-challenge-tour/src/level10.php b/XSS-challenge-tour/src/level10.php new file mode 100755 index 0000000..54dcf97 --- /dev/null +++ b/XSS-challenge-tour/src/level10.php @@ -0,0 +1,36 @@ + + + + +欢迎来到level10 + + +

欢迎来到level10

+","",$str11); +$str33=str_replace("<","",$str22); +echo "

没有找到和".htmlspecialchars($str)."相关的结果.

".'
+ +
'; +?> +
+payload的长度:".strlen($str).""; +?> + + + + diff --git a/XSS-challenge-tour/src/level10.png b/XSS-challenge-tour/src/level10.png new file mode 100755 index 0000000..3901a91 Binary files /dev/null and b/XSS-challenge-tour/src/level10.png differ diff --git a/XSS-challenge-tour/src/level11.php b/XSS-challenge-tour/src/level11.php new file mode 100755 index 0000000..b2ddb0c --- /dev/null +++ b/XSS-challenge-tour/src/level11.php @@ -0,0 +1,36 @@ + + + + +欢迎来到level11 + + +

欢迎来到level11

+","",$str11); +$str33=str_replace("<","",$str22); +echo "

没有找到和".htmlspecialchars($str)."相关的结果.

".'
+ +
'; +?> +
+payload的长度:".strlen($str).""; +?> + + diff --git a/XSS-challenge-tour/src/level11.png b/XSS-challenge-tour/src/level11.png new file mode 100755 index 0000000..10bf45b Binary files /dev/null and b/XSS-challenge-tour/src/level11.png differ diff --git a/XSS-challenge-tour/src/level12.php b/XSS-challenge-tour/src/level12.php new file mode 100755 index 0000000..b262893 --- /dev/null +++ b/XSS-challenge-tour/src/level12.php @@ -0,0 +1,37 @@ + + + + +欢迎来到level12 + + +

欢迎来到level12

+","",$str11); +$str33=str_replace("<","",$str22); +echo "

没有找到和".htmlspecialchars($str)."相关的结果.

".'
+ +
'; +?> +
+payload的长度:".strlen($str).""; +?> + + + diff --git a/XSS-challenge-tour/src/level12.png b/XSS-challenge-tour/src/level12.png new file mode 100755 index 0000000..8d9dfbe Binary files /dev/null and b/XSS-challenge-tour/src/level12.png differ diff --git a/XSS-challenge-tour/src/level13.php b/XSS-challenge-tour/src/level13.php new file mode 100755 index 0000000..da657c0 --- /dev/null +++ b/XSS-challenge-tour/src/level13.php @@ -0,0 +1,38 @@ + + + + +欢迎来到level13 + + +

欢迎来到level13

+","",$str11); +$str33=str_replace("<","",$str22); +echo "

没有找到和".htmlspecialchars($str)."相关的结果.

".'
+ +
'; +?> +
+payload的长度:".strlen($str).""; +?> + + + diff --git a/XSS-challenge-tour/src/level13.png b/XSS-challenge-tour/src/level13.png new file mode 100755 index 0000000..01c4d6c Binary files /dev/null and b/XSS-challenge-tour/src/level13.png differ diff --git a/XSS-challenge-tour/src/level14.php b/XSS-challenge-tour/src/level14.php new file mode 100755 index 0000000..5f3253f --- /dev/null +++ b/XSS-challenge-tour/src/level14.php @@ -0,0 +1,10 @@ + + + +欢迎来到level14 + + +

欢迎来到level14

+
这关成功后不会自动跳转。成功者点我进level15
+ + diff --git a/XSS-challenge-tour/src/level15.php b/XSS-challenge-tour/src/level15.php new file mode 100755 index 0000000..4dbc97c --- /dev/null +++ b/XSS-challenge-tour/src/level15.php @@ -0,0 +1,22 @@ + + + + + +欢迎来到level15 + +

欢迎来到第15关,自己想个办法走出去吧!

+

+'; +?> + + diff --git a/XSS-challenge-tour/src/level15.png b/XSS-challenge-tour/src/level15.png new file mode 100755 index 0000000..00516b4 Binary files /dev/null and b/XSS-challenge-tour/src/level15.png differ diff --git a/XSS-challenge-tour/src/level16.php b/XSS-challenge-tour/src/level16.php new file mode 100755 index 0000000..0687b73 --- /dev/null +++ b/XSS-challenge-tour/src/level16.php @@ -0,0 +1,30 @@ + + + + +欢迎来到level16 + + +

欢迎来到level16

+".$str5.""; +?> +
+payload的长度:".strlen($str5).""; +?> + + + diff --git a/XSS-challenge-tour/src/level16.png b/XSS-challenge-tour/src/level16.png new file mode 100755 index 0000000..d0e1945 Binary files /dev/null and b/XSS-challenge-tour/src/level16.png differ diff --git a/XSS-challenge-tour/src/level17.php b/XSS-challenge-tour/src/level17.php new file mode 100755 index 0000000..19086af --- /dev/null +++ b/XSS-challenge-tour/src/level17.php @@ -0,0 +1,26 @@ + + + + +欢迎来到level17 + + +

欢迎来到level17

+"; +?> +

成功后,点我进入下一关

+ + + + + + + + diff --git a/XSS-challenge-tour/src/level18.php b/XSS-challenge-tour/src/level18.php new file mode 100755 index 0000000..097b6e7 --- /dev/null +++ b/XSS-challenge-tour/src/level18.php @@ -0,0 +1,23 @@ + + + + +欢迎来到level18 + + +

欢迎来到level18

+"; +?> + + + + + diff --git a/XSS-challenge-tour/src/level19.php b/XSS-challenge-tour/src/level19.php new file mode 100755 index 0000000..24fd110 --- /dev/null +++ b/XSS-challenge-tour/src/level19.php @@ -0,0 +1,22 @@ + + + + +欢迎来到level19 + + +

欢迎来到level19

+'; +?> + + + + diff --git a/XSS-challenge-tour/src/level2.php b/XSS-challenge-tour/src/level2.php new file mode 100755 index 0000000..5a58ca2 --- /dev/null +++ b/XSS-challenge-tour/src/level2.php @@ -0,0 +1,34 @@ + + + + +欢迎来到level2 + + +

欢迎来到level2

+没有找到和".htmlspecialchars($str)."相关的结果.".'
+
+ + +
+
'; +?> +
+payload的长度:".strlen($str).""; +?> + + + + + + diff --git a/XSS-challenge-tour/src/level2.png b/XSS-challenge-tour/src/level2.png new file mode 100755 index 0000000..501f92b Binary files /dev/null and b/XSS-challenge-tour/src/level2.png differ diff --git a/XSS-challenge-tour/src/level20.php b/XSS-challenge-tour/src/level20.php new file mode 100755 index 0000000..aa1aa0f --- /dev/null +++ b/XSS-challenge-tour/src/level20.php @@ -0,0 +1,21 @@ + + + + +欢迎来到level20 + + +

欢迎来到level20

+'; +?> + + + diff --git a/XSS-challenge-tour/src/level3.php b/XSS-challenge-tour/src/level3.php new file mode 100755 index 0000000..1417bda --- /dev/null +++ b/XSS-challenge-tour/src/level3.php @@ -0,0 +1,30 @@ + + + + +欢迎来到level3 + + +

欢迎来到level3

+没有找到和".htmlspecialchars($str)."相关的结果."."
+
+ + +
+
"; +?> +
+payload的长度:".strlen($str).""; +?> + + diff --git a/XSS-challenge-tour/src/level3.png b/XSS-challenge-tour/src/level3.png new file mode 100755 index 0000000..6f4365d Binary files /dev/null and b/XSS-challenge-tour/src/level3.png differ diff --git a/XSS-challenge-tour/src/level4.php b/XSS-challenge-tour/src/level4.php new file mode 100755 index 0000000..de6e56d --- /dev/null +++ b/XSS-challenge-tour/src/level4.php @@ -0,0 +1,34 @@ + + + + +欢迎来到level4 + + +

欢迎来到level4

+","",$str); +$str3=str_replace("<","",$str2); +echo "

没有找到和".htmlspecialchars($str)."相关的结果.

".'
+
+ + +
+
'; +?> +
+payload的长度:".strlen($str3).""; +?> + + + + diff --git a/XSS-challenge-tour/src/level4.png b/XSS-challenge-tour/src/level4.png new file mode 100755 index 0000000..0f7ca9d Binary files /dev/null and b/XSS-challenge-tour/src/level4.png differ diff --git a/XSS-challenge-tour/src/level5.php b/XSS-challenge-tour/src/level5.php new file mode 100755 index 0000000..a968589 --- /dev/null +++ b/XSS-challenge-tour/src/level5.php @@ -0,0 +1,33 @@ + + + + +欢迎来到level5 + + +

欢迎来到level5

+没有找到和".htmlspecialchars($str)."相关的结果.".'
+
+ + +
+
'; +?> +
+payload的长度:".strlen($str3).""; +?> + + + diff --git a/XSS-challenge-tour/src/level5.png b/XSS-challenge-tour/src/level5.png new file mode 100755 index 0000000..e9666e2 Binary files /dev/null and b/XSS-challenge-tour/src/level5.png differ diff --git a/XSS-challenge-tour/src/level6.php b/XSS-challenge-tour/src/level6.php new file mode 100755 index 0000000..711d6fa --- /dev/null +++ b/XSS-challenge-tour/src/level6.php @@ -0,0 +1,37 @@ + + + + +欢迎来到level6 + + +

欢迎来到level6

+没有找到和".htmlspecialchars($str)."相关的结果.".'
+
+ + +
+
'; +?> +
+payload的长度:".strlen($str6).""; +?> + + + + diff --git a/XSS-challenge-tour/src/level6.png b/XSS-challenge-tour/src/level6.png new file mode 100755 index 0000000..0f0ff0c Binary files /dev/null and b/XSS-challenge-tour/src/level6.png differ diff --git a/XSS-challenge-tour/src/level7.php b/XSS-challenge-tour/src/level7.php new file mode 100755 index 0000000..13e080c --- /dev/null +++ b/XSS-challenge-tour/src/level7.php @@ -0,0 +1,35 @@ + + + + +欢迎来到level7 + + +

欢迎来到level7

+没有找到和".htmlspecialchars($str)."相关的结果.".'
+
+ + +
+
'; +?> +
+payload的长度:".strlen($str6).""; +?> + + diff --git a/XSS-challenge-tour/src/level7.png b/XSS-challenge-tour/src/level7.png new file mode 100755 index 0000000..68403f2 Binary files /dev/null and b/XSS-challenge-tour/src/level7.png differ diff --git a/XSS-challenge-tour/src/level8.jpg b/XSS-challenge-tour/src/level8.jpg new file mode 100755 index 0000000..5a2fbba Binary files /dev/null and b/XSS-challenge-tour/src/level8.jpg differ diff --git a/XSS-challenge-tour/src/level8.php b/XSS-challenge-tour/src/level8.php new file mode 100755 index 0000000..6d3f5a0 --- /dev/null +++ b/XSS-challenge-tour/src/level8.php @@ -0,0 +1,39 @@ + + + + +欢迎来到level8 + + +

欢迎来到level8

+ +
+ + +
+'; +?> +
友情链接'; +?> +
+payload的长度:".strlen($str7).""; +?> + + diff --git a/XSS-challenge-tour/src/level9.php b/XSS-challenge-tour/src/level9.php new file mode 100755 index 0000000..ecf7e20 --- /dev/null +++ b/XSS-challenge-tour/src/level9.php @@ -0,0 +1,46 @@ + + + + +欢迎来到level9 + + +

欢迎来到level9

+ +
+ + +
+'; +?> +
友情链接'; + } +else +{ + echo '

友情链接
'; +} +?> +
+payload的长度:".strlen($str7).""; +?> + + diff --git a/XSS-challenge-tour/src/level9.png b/XSS-challenge-tour/src/level9.png new file mode 100755 index 0000000..e169825 Binary files /dev/null and b/XSS-challenge-tour/src/level9.png differ diff --git a/XSS-challenge-tour/src/xsf01.swf b/XSS-challenge-tour/src/xsf01.swf new file mode 100755 index 0000000..91b426b Binary files /dev/null and b/XSS-challenge-tour/src/xsf01.swf differ diff --git a/XSS-challenge-tour/src/xsf02.swf b/XSS-challenge-tour/src/xsf02.swf new file mode 100755 index 0000000..3273af5 Binary files /dev/null and b/XSS-challenge-tour/src/xsf02.swf differ diff --git a/XSS-challenge-tour/src/xsf03.swf b/XSS-challenge-tour/src/xsf03.swf new file mode 100755 index 0000000..dfb1a60 Binary files /dev/null and b/XSS-challenge-tour/src/xsf03.swf differ diff --git a/XSS-challenge-tour/src/xsf04.swf b/XSS-challenge-tour/src/xsf04.swf new file mode 100755 index 0000000..13bf8e3 Binary files /dev/null and b/XSS-challenge-tour/src/xsf04.swf differ diff --git a/doc/vulstudy.jpg b/doc/vulstudy.jpg deleted file mode 100644 index 232ef52..0000000 Binary files a/doc/vulstudy.jpg and /dev/null differ diff --git a/doc/vulstudy.png b/doc/vulstudy.png new file mode 100644 index 0000000..be3546c Binary files /dev/null and b/doc/vulstudy.png differ diff --git a/docker-compose.yml b/docker-compose.yml index a7b92a1..8da3f94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,6 +59,11 @@ services: ports: - "88:80" + Xss_challenge_tour: + image: c0ny1/xss-challenge-tour:latest + ports: + - "8091:80" + dsvw: image: c0ny1/dsvw:v0.1m ports: diff --git a/www/index.css b/www/index.css index cad18cb..f53a7f0 100644 --- a/www/index.css +++ b/www/index.css @@ -29,7 +29,7 @@ td{ #Box { max-width : 800px; - max-height : 600px; + /*max-height : 600px;*/ background-color : rgba(255, 255, 255, .7); margin-left : auto; margin-right : auto; diff --git a/www/index.html b/www/index.html index b507ca3..f628bc1 100644 --- a/www/index.html +++ b/www/index.html @@ -17,7 +17,7 @@ -
+

vulstudy

@@ -121,6 +121,13 @@ 综合 Spider Labs php + + + 13 + XSS挑战之旅 + XSS + 未知 + php diff --git a/xvwa/Dockerfile b/xvwa/Dockerfile new file mode 100644 index 0000000..c985862 --- /dev/null +++ b/xvwa/Dockerfile @@ -0,0 +1,46 @@ +FROM phusion/baseimage:0.9.15 + +# Ensure UTF-8 +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + +ENV HOME /root + +RUN /etc/my_init.d/00_regen_ssh_host_keys.sh + +CMD ["/sbin/my_init"] + +# Nginx-PHP Installation +RUN apt-get update +RUN apt-get install --reinstall ca-certificates +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y vim curl wget build-essential python-software-properties software-properties-common php5 +RUN apt-get update +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --force-yes php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl\ + php5-gd php5-mcrypt php5-intl php5-imap php5-tidy + +RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/fpm/php.ini +RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/cli/php.ini + +RUN sed -i "s/allow_url_include =.*/allow_url_include = On/" /etc/php5/fpm/php.ini +RUN sed -i "s/allow_url_include =.*/allow_url_include = On/" /etc/php5/cli/php.ini + +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nginx + +RUN echo "daemon off;" >> /etc/nginx/nginx.conf +RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf +RUN sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php5/fpm/php.ini + +RUN mkdir -p /var/www +ADD build/default /etc/nginx/sites-available/default +RUN mkdir /etc/service/nginx +ADD build/nginx.sh /etc/service/nginx/run +RUN chmod +x /etc/service/nginx/run +RUN mkdir /etc/service/phpfpm +ADD build/phpfpm.sh /etc/service/phpfpm/run +RUN chmod +x /etc/service/phpfpm/run + +EXPOSE 80 +# End Nginx-PHP + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/xvwa/docker-compose.yml b/xvwa/docker-compose.yml new file mode 100644 index 0000000..a2e58fe --- /dev/null +++ b/xvwa/docker-compose.yml @@ -0,0 +1,12 @@ +web: + build: . + ports: + - "8000:80" + volumes: + - ./:/var/www + links: + - db +db: + image: orchardup/mysql + environment: + MYSQL_DATABASE: xvwa