i am total noob starting to work with ubuntu. I am trying to set up Ubuntu Server with Webgoat 5.4. I downloaded the file "Webgoat-5.4-OWASP_Standard_Win32.zip" and tried to run the "webgoat.sh" with the command

sudo sh webgoat.sh start8080

, but i receive the result: "Please set Java_Home to a Java 1.5 JDK Install".

I am trying to Install Java 1.5 but none of the comments on the Internet are working for me.

With the command :

ls /usr/lib/jvm/ 

I receive the output: default-java, java-1.8.0-openjdk-amd64, java-8-openjdk-amd64.

I am wondering how I can Install Java 5 in this specific folder.

Furthermore I need to edit the file webgoat.sh and I am wondering if this code will work with Java 5 to start Webgoat:

export JAVA_HOME=/usr/lib/jvm/Java-1-5-0.sun

Moreover I am wondering whether someone knows how to make webgoat accessable from the Internet. I would be happy about some advice because I am strugglin with this problem, too.

I hope you guys can help me out.

  • Decide which issue you want resolved: java_home path, install java or install webgoat! – George Udosen Feb 22 '17 at 20:10
  • Well I Want to get Webgoat Working and hence I Need to install Java 1.5 and set Java_Home to a Java 1.5. – M.Blank Feb 22 '17 at 20:13
  • why are you using java 5 and not java 8 or 9? – George Udosen Feb 22 '17 at 20:13
  • I am using "java-1.8.0-openjdk-amd64" , but I need to set it to 5 to get Webgoat working. – M.Blank Feb 22 '17 at 20:16
  • your ubuntu version? – George Udosen Feb 22 '17 at 20:20

First of, you are trying to install an version of Webgoat and the java you have is ok to run it. Now these are the steps are followed to install it:

  1. Place java in your path so Webgoat would see it.

    • open your .bashrc file:

      • In the terminal edit the .bashrc file with nano /home/$USER/.bashrc
      • Add the following lines to the file:

        export JAVA_PATH="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
        export PATH=$PATH:$JAVA_HOME
      • Run this from terminal: source ~/.bashrc
  2. Download Webgoat from here, select the Quick Start - easy run option. The link is in step two.

  3. Run Webgoat with the following commands:

    java -jar WebGoat-6.0.1-war-exec.jar
    java -jar WebGoat-6.0.1-war-exec.jar -httpPort 9090
    • Please note: first command runs on port 8080, and second command on port 9090. Which of course you can change to any port of your liking.
    • When you run either of these, the terminal will spit out lots of error messages please ignore and run step 4.
  4. Verify Webgoat is running:

    # or if using second command


WARNING 1: While running this program your machine will be extremely vulnerable to attack. You should to disconnect from the Internet while using this program.

WARNING 2: This program is for educational purposes only. If you attempt these techniques without authorization, you are very likely to get caught. If you are caught engaging in unauthorized hacking, most companies will fire you. Claiming that you were doing security research will not work as that is the first thing that all hackers claim.




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.