From 15d80a3006b40eeee4f44afd93f262d55cba6efc Mon Sep 17 00:00:00 2001
From: "wirth.marcel"
" + "Tan #1 = 15648
" + "Tan #2 = 92156
"
+ + "You have following TANs:
" + "Tan #1 = 15648
" + "Tan #2 = 92156
"
+ "Tan #3 = 4879
" + "Tan #4 = 9458
" + "Tan #5 = 4879
";
}
diff --git a/main/project/JavaSource/org/owasp/webgoat/lessons/PasswordStrength.java b/main/project/JavaSource/org/owasp/webgoat/lessons/PasswordStrength.java
index 009463461..f435a22b0 100644
--- a/main/project/JavaSource/org/owasp/webgoat/lessons/PasswordStrength.java
+++ b/main/project/JavaSource/org/owasp/webgoat/lessons/PasswordStrength.java
@@ -7,6 +7,7 @@ import org.apache.ecs.Element;
import org.apache.ecs.ElementContainer;
import org.apache.ecs.StringElement;
import org.apache.ecs.html.BR;
+import org.apache.ecs.html.Div;
import org.apache.ecs.html.Input;
import org.apache.ecs.html.TD;
import org.apache.ecs.html.TR;
@@ -127,8 +128,11 @@ public class PasswordStrength extends LessonAdapter
ec.addElement(table);
ec.addElement(new BR());
ec.addElement(new BR());
+ Div div = new Div();
+ div.addAttribute("align", "center");
Element b = ECSFactory.makeButton("Go!");
- ec.addElement(b);
+ div.addElement(b);
+ ec.addElement(div);
} catch (Exception e)
{
s.setMessage("Error generating " + this.getClass().getName());
@@ -155,7 +159,7 @@ public class PasswordStrength extends LessonAdapter
public List
"
+ "As regular employee 'Tom', exploit weak access control to use the Delete function from the Staff List page. "
+ "Verify that Tom's profile can be deleted."
- + "The password for a user is always his prename..";
+ + "The password for a user is always his prename.";
}
else if (STAGE2.equals(stage))
{
@@ -191,25 +191,12 @@ public class RoleBasedAccessControl extends GoatHillsFinancial
try
{
- System.out.println("Solution: " + getLessonSolutionFileName(s));
src = readFromFile(new BufferedReader(new FileReader(s.getWebResource(getLessonSolutionFileName(s)))), false);
} catch (IOException e)
{
s.setMessage("Could not find the solution file");
src = ("Could not find the solution file");
}
-
-// Html html = new Html();
-//
-// Head head = new Head();
-// head.addElement(new Title(getLessonSolutionFileName(s)));
-//
-// Body body = new Body();
-// body.addElement(new StringElement(src));
-//
-// html.addElement(head);
-// html.addElement(body);
-
return src;
}
diff --git a/main/project/JavaSource/org/owasp/webgoat/lessons/SQLInjection/SQLInjection.java b/main/project/JavaSource/org/owasp/webgoat/lessons/SQLInjection/SQLInjection.java
index 8f69a2549..ff5dcca1d 100644
--- a/main/project/JavaSource/org/owasp/webgoat/lessons/SQLInjection/SQLInjection.java
+++ b/main/project/JavaSource/org/owasp/webgoat/lessons/SQLInjection/SQLInjection.java
@@ -1,6 +1,9 @@
package org.owasp.webgoat.lessons.SQLInjection;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.ecs.ElementContainer;
@@ -245,4 +248,27 @@ public class SQLInjection extends GoatHillsFinancial
{
return "LAB: SQL Injection";
}
+
+ @Override
+ public String getSolution(WebSession s) {
+ String src = null;
+
+ try
+ {
+ src = readFromFile(new BufferedReader(new FileReader(s.getWebResource(getLessonSolutionFileName(s)))), false);
+ } catch (IOException e)
+ {
+ s.setMessage("Could not find the solution file");
+ src = ("Could not find the solution file");
+ }
+ return src;
+ }
+
+ public String getLessonSolutionFileName(WebSession s) {
+ System.out.println("SOLUTION!!!");
+ String solutionFileName = null;
+ String stage = getStage(s);
+ solutionFileName = "/lesson_solutions/Lab SQL Injection/Lab " + stage + ".html";
+ return solutionFileName;
+ }
}
diff --git a/main/project/WebContent/lesson_plans/HowToWork.html b/main/project/WebContent/lesson_plans/HowToWork.html
index 06c71107e..b4e514d9d 100644
--- a/main/project/WebContent/lesson_plans/HowToWork.html
+++ b/main/project/WebContent/lesson_plans/HowToWork.html
@@ -4,7 +4,7 @@
Welcome to a short introduction to WebGoat.
Here you will learn how to use WebGoat and additional tools for the lessons.
WebGoat uses Apache Tomcat as server. It is setup to run on localhost. This configuration is for single user. If you want to use WebGoat in a laboratory or in diff --git a/main/project/WebContent/lesson_solutions/ClientSideFiltering.html b/main/project/WebContent/lesson_solutions/ClientSideFiltering.html index cf7f5b9c7..b8d320d97 100644 --- a/main/project/WebContent/lesson_solutions/ClientSideFiltering.html +++ b/main/project/WebContent/lesson_solutions/ClientSideFiltering.html @@ -22,11 +22,14 @@ to which you should not have access.
Solution:
This Lab consists of two Stages. In the first Stage you have to
get sensitive information . In the second one you have to fix the problem.
-
Use Firebug to solve this stage. If you are using IE you can try it with
-IEWatch.
+IEWatch.
Now write the salary into the text edit box and submit your answer! - -
In this stage you have to modify the clientSideFiltering.jsp which you will find under
the WebContent in the lessons/Ajax folder. The Problem is that
the server sends all information to the client. As you could see
even if it is hidden it is easy to find the sensitive date. In this
stage you will add a filter to the XPath queries. In this file you will find
-following construct:
+following construct:
StringBuffer sb = new StringBuffer();
@@ -56,10 +60,11 @@ following construct:
sb.append("/Employees/Employee/Salary ");
String expression = sb.toString();
-
This string will be used for the XPath query. You have to guarantee that a manger only
can see employees which are working for him. To archive this you can use
-filters in XPath. Following code will exactly do this:
+filters in XPath. Following code will exactly do this:
StringBuffer sb = new StringBuffer();
@@ -71,9 +76,9 @@ filters in XPath. Following code will exactly do this:
String expression = sb.toString();
-
Now only information is sent to your client you are authorized for. You can click on the button.
-
+