Author: Xu FC
Platform: Ubuntu 16.04.3 LTS
Java 安装
- 请选择Java8,不要使用Java9,WebGoat目前与Java9有很多兼容性问题。
- 导入Webupd8 PPA
add-apt-repository -y ppa:webupd8team/java
apt-get update
- 安装 java8:
apt-get install oracle-java8-installer
- 设置为默认jdk
update-java-alternatives -s java-8-oracle
apt install oracle-java8-set-default
- 安装完成验证
root@66:/usr/local# java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
WebGoat 安装
Standalone 安装
- 下载WebGoat:
wget https://github.com/WebGoat/WebGoat/releases/download/7.1/webgoat-container-7.1-exec.jar
- 运行WebGoat:
java -jar webgoat-container-7.1-exec.jar -httpPort=8081
源码安装
- 安装 maven:
apt install maven
- Clone WebGoat:
git clone https://github.com/WebGoat/WebGoat.git
- 编译安装 WebGoat
cd WebGoat
mvn clean install -D maven.test.skip
- WebGoat 配置文件
WebGoat/webgoat-container/src/main/resources/application.properties
, 可在该文件中修改server.address 和 server.port - 启动 WebGoat:
mvn -pl webgoat-server spring-boot:run
-
注册一个新用户
Register new user
-
安装完成
WebGoat
网友评论