First update the repository and upgrade system
sudo apt-get update
sudo apt-get upgrade
Now install the Java runtime environment in Ubuntu Server
sudo apt-get install default-jre
Check the version of JRE
java -version
Now download WebGoat from: https://github.com/WebGoat/WebGoat/releases
https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M21/webgoat-server-8.0.0.M21.jar
wget https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M21/webgoat-server-8.0.0.M21.jar
Now if the java version you have installed is 8 or less then use the below command to run webgoat
java -jar webgoat-server-8.0.0.M21.jar
Or if your java version is 9 or higher then 9 then use the below command to run it :
java --add-modules java.xml.bind -jar webgoat-server-8.0.0.M21.jar
Now open up browser and navigate to WebGoat
http://(Server_IP_Address):8080/WebGoat
http://192.168.0.110:8080/WebGoat
we can also start WebGoat with a shell script
chmod +x webgoat.sh
./webgoat.sh
sudo apt-get update
sudo apt-get upgrade
Now install the Java runtime environment in Ubuntu Server
sudo apt-get install default-jre
Check the version of JRE
java -version
Now download WebGoat from: https://github.com/WebGoat/WebGoat/releases
https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M21/webgoat-server-8.0.0.M21.jar
wget https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M21/webgoat-server-8.0.0.M21.jar
Now if the java version you have installed is 8 or less then use the below command to run webgoat
java -jar webgoat-server-8.0.0.M21.jar
Or if your java version is 9 or higher then 9 then use the below command to run it :
java --add-modules java.xml.bind -jar webgoat-server-8.0.0.M21.jar
Now open up browser and navigate to WebGoat
http://(Server_IP_Address):8080/WebGoat
http://192.168.0.110:8080/WebGoat
we can also start WebGoat with a shell script
#!/bin/sh
java --add-modules java.xml.bind -jar webgoat-server-8.0.0.M21.jar
chmod +x webgoat.sh
./webgoat.sh