forked from WebGoat/WebGoat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/WebGoat/WebGoat into dev…
…elop
- Loading branch information
Showing
33 changed files
with
416 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
webgoat-container/src/main/resources/static/js/goatApp/goatApp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
webgoat-container/src/main/resources/static/js/libs/jquery-2.1.4.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
webgoat-container/src/main/resources/static/js/libs/jquery-2.2.4.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
webgoat-container/src/main/resources/static/js/libs/jquery-base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// AMD (Asynchronous Module Definition) wrapper for jQuery 1.8 | ||
define([ | ||
// Load the jQuery source file | ||
'/WebGoat/js/libs/jquery-2.2.4.min.js' | ||
], | ||
function(){ | ||
// Tell Require.js that this module returns a reference to jQuery | ||
return $; // Return the global scope object | ||
}); |
9 changes: 9 additions & 0 deletions
9
webgoat-container/src/main/resources/static/js/libs/jquery-vuln.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// AMD (Asynchronous Module Definition) wrapper for jQuery 1.8 | ||
define([ | ||
// Load the jQuery source file | ||
'/WebGoat/js/libs/jquery-2.1.4.min.js' | ||
], | ||
function(){ | ||
// Tell Require.js that this module returns a reference to jQuery | ||
return $.noConflict(true); // Return the global scope object | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...essons/http-basics/src/main/java/org/owasp/webgoat/plugin/HttpBasicsInterceptRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.owasp.webgoat.plugin; | ||
|
||
import org.owasp.webgoat.endpoints.AssignmentEndpoint; | ||
import org.owasp.webgoat.endpoints.AssignmentHints; | ||
import org.owasp.webgoat.endpoints.AssignmentPath; | ||
import org.owasp.webgoat.lessons.AttackResult; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import java.io.IOException; | ||
|
||
/** | ||
* ************************************************************************************************* | ||
* | ||
* | ||
* This file is part of WebGoat, an Open Web Application Security Project | ||
* utility. For details, please see http://www.owasp.org/ | ||
* | ||
* Copyright (c) 2002 - 20014 Bruce Mayhew | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free Software | ||
* Foundation; either version 2 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
* Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* | ||
* Getting Source ============== | ||
* | ||
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository | ||
* for free software projects. | ||
* | ||
* For details, please see http://webgoat.github.io | ||
* | ||
* @author Bruce Mayhew <a href="http://code.google.com/p/webgoat">WebGoat</a> | ||
* @created October 28, 2003 | ||
*/ | ||
@AssignmentPath("/HttpBasics/intercept-request") | ||
public class HttpBasicsInterceptRequest extends AssignmentEndpoint { | ||
|
||
@RequestMapping(method = RequestMethod.GET) | ||
public @ResponseBody AttackResult completed(HttpServletRequest request) throws IOException { | ||
if (request.getHeader("x-request-intercepted").toLowerCase().equals("true") && request.getParameter("changeMe").equals("Requests are tampered easily")) { | ||
return trackProgress(AttackResult.success("Well done, you tampered the request as expected")); | ||
} else { | ||
return trackProgress(AttackResult.failed("Please try again. Make sure to make all the changes. And case sensitivity may matter ... or not, you never know!")); | ||
} | ||
} | ||
} |
Binary file added
BIN
+6 KB
webgoat-lessons/http-basics/src/main/resources/plugin/HttpBasics/.DS_Store
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>http-proxies</artifactId> | ||
<packaging>jar</packaging> | ||
<parent> | ||
<groupId>org.owasp.webgoat.lesson</groupId> | ||
<artifactId>webgoat-lessons-parent</artifactId> | ||
<version>8.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
</project> |
59 changes: 59 additions & 0 deletions
59
...ssons/http-proxies/src/main/java/org/owasp/webgoat/plugin/HttpBasicsInterceptRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.owasp.webgoat.plugin; | ||
|
||
import org.owasp.webgoat.endpoints.AssignmentEndpoint; | ||
import org.owasp.webgoat.endpoints.AssignmentHints; | ||
import org.owasp.webgoat.endpoints.AssignmentPath; | ||
import org.owasp.webgoat.lessons.AttackResult; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import java.io.IOException; | ||
|
||
/** | ||
* ************************************************************************************************* | ||
* | ||
* | ||
* This file is part of WebGoat, an Open Web Application Security Project | ||
* utility. For details, please see http://www.owasp.org/ | ||
* | ||
* Copyright (c) 2002 - 20014 Bruce Mayhew | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free Software | ||
* Foundation; either version 2 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
* Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* | ||
* Getting Source ============== | ||
* | ||
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository | ||
* for free software projects. | ||
* | ||
* For details, please see http://webgoat.github.io | ||
* | ||
* @author Bruce Mayhew <a href="http://code.google.com/p/webgoat">WebGoat</a> | ||
* @created October 28, 2003 | ||
*/ | ||
@AssignmentPath("/HttpProxies/intercept-request") | ||
public class HttpBasicsInterceptRequest extends AssignmentEndpoint { | ||
|
||
@RequestMapping(method = RequestMethod.GET) | ||
public @ResponseBody AttackResult completed(HttpServletRequest request) throws IOException { | ||
if (request.getHeader("x-request-intercepted").toLowerCase().equals("true") && request.getParameter("changeMe").equals("Requests are tampered easily")) { | ||
return trackProgress(AttackResult.success("Well done, you tampered the request as expected")); | ||
} else { | ||
return trackProgress(AttackResult.failed("Please try again. Make sure to make all the changes. And case sensitivity may matter ... or not, you never know!")); | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
webgoat-lessons/http-proxies/src/main/java/org/owasp/webgoat/plugin/HttpProxies.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package org.owasp.webgoat.plugin; | ||
|
||
import com.beust.jcommander.internal.Lists; | ||
import org.owasp.webgoat.lessons.Category; | ||
import org.owasp.webgoat.lessons.NewLesson; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* ************************************************************************************************ | ||
* This file is part of WebGoat, an Open Web Application Security Project utility. For details, | ||
* please see http://www.owasp.org/ | ||
* <p> | ||
* Copyright (c) 2002 - 20014 Bruce Mayhew | ||
* <p> | ||
* This program is free software; you can redistribute it and/or modify it under the terms of the | ||
* GNU General Public License as published by the Free Software Foundation; either version 2 of the | ||
* License, or (at your option) any later version. | ||
* <p> | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* <p> | ||
* You should have received a copy of the GNU General Public License along with this program; if | ||
* not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
* 02111-1307, USA. | ||
* <p> | ||
* Getting Source ============== | ||
* <p> | ||
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software | ||
* projects. | ||
* <p> | ||
* | ||
* @author WebGoat | ||
* @version $Id: $Id | ||
* @since October 12, 2016 | ||
*/ | ||
public class HttpProxies extends NewLesson { | ||
@Override | ||
public Category getDefaultCategory() { | ||
return Category.GENERAL; | ||
} | ||
|
||
@Override | ||
public List<String> getHints() { | ||
return Lists.newArrayList(); | ||
} | ||
|
||
@Override | ||
public Integer getDefaultRanking() { | ||
return 2; | ||
} | ||
|
||
@Override | ||
public String getTitle() { | ||
return "http-proxies.title"; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "HttpProxies"; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
webgoat-lessons/http-proxies/src/main/resources/plugin/HttpProxies/html/HttpProxies.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
|
||
<html xmlns:th="http://www.thymeleaf.org"> | ||
|
||
<div class="lesson-page-wrapper"> | ||
<!-- reuse this lesson-page-wrapper block for each 'page' of content in your lesson --> | ||
<!-- include content here. Content will be presented via asciidocs files, | ||
which you put in src/main/resources/plugin/lessonplans/{lang}/{fileName}.adoc --> | ||
<div class="adoc-content" th:replace="doc:HttpBasics_ProxyIntro1.adoc"></div> | ||
</div> | ||
|
||
<div class="lesson-page-wrapper"> | ||
<!-- reuse this lesson-page-wrapper block for each 'page' of content in your lesson --> | ||
<!-- include content here. Content will be presented via asciidocs files, | ||
which you put in src/main/resources/plugin/lessonplans/{lang}/{fileName}.adoc --> | ||
<div class="adoc-content" th:replace="doc:HttpBasics_ProxyIntro2.adoc"></div> | ||
</div> | ||
|
||
<div class="lesson-page-wrapper"> | ||
<!-- reuse this lesson-page-wrapper block for each 'page' of content in your lesson --> | ||
<!-- include content here. Content will be presented via asciidocs files, | ||
which you put in src/main/resources/plugin/lessonplans/{lang}/{fileName}.adoc --> | ||
<div class="adoc-content" th:replace="doc:HttpBasics_ProxyIntro3.adoc"></div> | ||
</div> | ||
|
||
<div class="lesson-page-wrapper"> | ||
<!-- stripped down without extra comments --> | ||
<div class="adoc-content" th:replace="doc:HttpBasics_ProxyIntercept.adoc"></div> | ||
<div class="attack-container"> | ||
<div class="assignment-success"><i class="fa fa-2 fa-check hidden" aria-hidden="true"></i></div> | ||
<form class="attack-form" accept-charset="UNKNOWN" name="intercept-request" | ||
method="POST" | ||
action="/WebGoat/HttpBasics/intercept-request" | ||
enctype="application/json;charset=UTF-8"> | ||
|
||
<input type="text" value="doesn't matter really" name="changeMe" /> | ||
<input type="submit" value="Submit" /> | ||
|
||
</form> | ||
<div class="attack-feedback"></div> | ||
<div class="attack-output"></div> | ||
</div> | ||
</div> | ||
</html> |
File renamed without changes
File renamed without changes
Binary file added
BIN
+55.7 KB
...proxies/src/main/resources/plugin/HttpProxies/images/proxy-intercept-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+205 KB
...roxies/src/main/resources/plugin/HttpProxies/images/proxy-intercept-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.