Solving The WebGoat Labs Draft V2
Solving The WebGoat Labs Draft V2
Architecture Overview
1) All labs use a custom Action Handler that is invoked from the main WebGoat servlet
HammerHead.java
Controller
HammerHead
Servlet
Delegate
Request
Model
ActionHandlers
Browser &
Forward WebSession Database
Response
View
main.jsp
2) The Action Handler (lesson objects) will execute their business logic, load the data
into the WebGoat WebSession object, and then turn control over to the view
component (JSP)
3) The WebGoat presentation only allows for a lesson to write into the Lesson Content
portion of the webpage.
Main Header main.jsp
Navigation
Bar Lesson Page
Lesson Header CrossSiteScripting.jsp
RoleBasedAccessControl.jsp
SQLInjection.jsp
Sub-view Page
Lesson Content EditProfile.jsp
ListStaff
Login
SearchStaff
ViewProfile
Except for the CrossSiteScripting lab the JSPs do not require modification
2) All the labs are designed so the Method to be fixed has a _BACKUP method
which contains the original source code.
a. For Example: RoleBasedAccessControl/ListStaff.java has one method
where the developer is supposed to make their changes.
ListStaff.getAllEmployees( WebSession s, int userID) it also has a
corresponding ListStaff.getAllEmployees_BACKUP( …) method
b. The getAllEmployees method is the method you are supposed to fix in
order to solve the lesson.
3) RoleBasedAccessControl