diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java index 6083aefc1..51997f810 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java @@ -307,6 +307,9 @@ public class HammerHead extends HttpServlet s.setHasHackableAdmin( screen.getRole() ); + //More bookkeeping here to see if the user was able to force browse to the + //config URL. + s.setHasHackableConfig( s.getRequest().getRequestURI()); lesson.handleRequest( s ); s.setCurrentMenu( lesson.getCategory().getRanking() ); } @@ -346,7 +349,7 @@ public class HammerHead extends HttpServlet // in order to satisfy the remote admin lesson. s.setHasHackableAdmin( screen.getRole() ); - + lesson.handleRequest( s ); s.setCurrentMenu( lesson.getCategory().getRanking() ); } diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/ForcedBrowsing.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/ForcedBrowsing.java index f191920f0..53b65f4f5 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/ForcedBrowsing.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/ForcedBrowsing.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.ecs.Element; +import org.apache.ecs.ElementContainer; import org.apache.ecs.StringElement; import org.owasp.webgoat.session.WebSession; @@ -14,8 +15,8 @@ import org.owasp.webgoat.session.WebSession; * under the GPL. You should read and accept the LICENSE before you use, modify and/or redistribute * this software. * - * @author Jeff Williams Aspect Security - * @created October 28, 2003 + * @author Sherif Koussa Macadamian Technologies. + * @created November 02, 2006 */ public class ForcedBrowsing extends LessonAdapter { @@ -28,8 +29,18 @@ public class ForcedBrowsing extends LessonAdapter */ protected Element createContent( WebSession s ) { - // just to get the generic how to text. - return super.createContent(s); + ElementContainer ec = new ElementContainer(); + + if ( s.completedHackableConfig() ) + { + makeSuccess( s ); + } + else + { + ec.addElement( "Can you try to force browse to the config page which " + + "should only be accessed by maintenance personnel."); + } + return ec; } @@ -53,15 +64,14 @@ public class ForcedBrowsing extends LessonAdapter public List getHints() { List hints = new ArrayList(); - hints.add( "Lesson Hint 1" ); - hints.add( "Lesson Hint 2" ); - + hints.add( "Try to guess the URL for the config page" ); + hints.add( "The config page is guessable and hackable" ); + hints.add( "Play with the URL and try to guess what the can you replace 'attack' with." ); + return hints; } - - private final static Integer DEFAULT_RANKING = new Integer(15); protected Integer getDefaultRanking() @@ -80,7 +90,7 @@ public class ForcedBrowsing extends LessonAdapter public Element getCredits() { - return new StringElement("This screen created by: Your name could go here"); + return new StringElement("This screen created by: Sherif Koussa"); } } diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/LogSpoofing.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/LogSpoofing.java index ed689d92a..ab3b5094b 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/LogSpoofing.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/LogSpoofing.java @@ -19,6 +19,16 @@ import org.apache.ecs.html.Table; import org.apache.ecs.html.PRE; import org.apache.ecs.HtmlColor; +/** + * Copyright (c) 2002 Free Software Foundation developed under the custody of the Open Web + * Application Security Project (http://www.owasp.org) This software package org.owasp.webgoat.is published by OWASP + * under the GPL. You should read and accept the LICENSE before you use, modify and/or redistribute + * this software. + * + * @author Sherif Koussa Macadamian Technologies + * @created October 28, 2006 + */ + public class LogSpoofing extends LessonAdapter { private static final String USERNAME = "username"; diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java index d92b15090..1211e5241 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java @@ -225,6 +225,8 @@ public class WebSession private String feedbackAddress = "webgoat@aspectsecurity.com"; private boolean completedHackableAdmin = false; + + private boolean completedHackableConfig = false; private int currentMenu; @@ -724,6 +726,16 @@ public class WebSession return ( completedHackableAdmin ); } + /** + * Has the user ever hacked the hackable config URL + * + * @return The hackable config value + */ + public boolean completedHackableConfig() + { + return ( completedHackableConfig ); + } + /** * Gets the authenticated attribute of the WebSession object * @@ -1103,6 +1115,14 @@ public class WebSession } } + public void setHasHackableConfig ( String url) + { + if ( config.indexOf("config") >= 0) + { + completedHackableConfig = true; + } + } + /** * @return Returns the isDebug. */ diff --git a/ webgoat/main/project/WebContent/WEB-INF/web.xml b/ webgoat/main/project/WebContent/WEB-INF/web.xml index 94720c354..f595a0d4c 100644 --- a/ webgoat/main/project/WebContent/WEB-INF/web.xml +++ b/ webgoat/main/project/WebContent/WEB-INF/web.xml @@ -227,6 +227,11 @@ /attack + + WebGoat + /config + + LessonSource /source diff --git a/ webgoat/main/project/WebContent/database/webgoat.mdb b/ webgoat/main/project/WebContent/database/webgoat.mdb index 35f49ec88..6796f1e65 100644 Binary files a/ webgoat/main/project/WebContent/database/webgoat.mdb and b/ webgoat/main/project/WebContent/database/webgoat.mdb differ diff --git a/ webgoat/main/project/WebContent/lesson_plans/ForcedBrowsing.html b/ webgoat/main/project/WebContent/lesson_plans/ForcedBrowsing.html index 134656b75..71c4235fa 100644 --- a/ webgoat/main/project/WebContent/lesson_plans/ForcedBrowsing.html +++ b/ webgoat/main/project/WebContent/lesson_plans/ForcedBrowsing.html @@ -1,9 +1,21 @@ -
-

Lesson Plan Title: How to Exploit Forced Browsing

-
- +
+

Lesson Plan Title:Forced Browsing.

+
+

Concept / Topic To Teach:

-How to Exploit Forced Browsing +How to Exploit Forced Browsing. +
+
+

+How the attacks works: +

+Forced browsing is a technique used by attackers to gain access to resources that are not referenced, but are nevertheless accessible. + +One technique is to manipulate the URL in the browser by deleting sections from the end until an unprotected directory is found +

General Goal(s):

-This lesson needs a creator! - \ No newline at end of file + +* Your goal should be to try to guess the URL for the "config" interface.
+* The "config" URL is only available to the maintenance personnel.
+* The application doesn't check for horizontal priveleges. +