Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6bdce9e
RegEx DoS
raybeorn Aug 13, 2012
45c0efd
Allow Users to SetCookies
raybeorn Aug 13, 2012
129a286
cleaned up a bit
raybeorn Aug 13, 2012
c405a4d
Add unsafe block exploit
fervidnerd Aug 13, 2012
0c46062
Add some description for Unsafe.aspx lesson. Fix compile issue
fervidnerd Aug 13, 2012
6066ec6
Add lesson for weak RNG. Al hooked up - need to complete lesson out o…
fervidnerd Aug 13, 2012
5c51d78
Delete DS_Store files and following conventions from: http://schacon.…
fervidnerd Aug 14, 2012
ef4b578
Hook up random lesson. A little too hard on the tutorial. Might need …
fervidnerd Aug 14, 2012
0a31bc3
Amend TODO
fervidnerd Aug 14, 2012
735775d
XmlInjection
raybeorn Aug 14, 2012
5618e84
Secure and HttpOnly Session Cookie
raybeorn Aug 14, 2012
8732408
updated todo
raybeorn Aug 14, 2012
155115d
Added Injection into headers
raybeorn Aug 15, 2012
419a744
Added VerbTampering example
raybeorn Aug 15, 2012
11655cc
Updated TODO
raybeorn Aug 15, 2012
3f1d732
Compile error under VS
fervidnerd Aug 17, 2012
a7580b5
Fix warning
fervidnerd Aug 17, 2012
01851e6
Hardcoded Password
raybeorn Aug 17, 2012
5f942f4
Fix problem with sqlite under certain circumstances where it doesn't …
fervidnerd Aug 20, 2012
9b83d3d
add header to enable disable xss protection for safari
fervidnerd Aug 21, 2012
f8a911a
Open conn for Sqlite when adding comments
fervidnerd Aug 21, 2012
e1c1394
Amend Readme
fervidnerd Aug 21, 2012
32f97e1
Ship Mono sqlite dll with project.
fervidnerd Aug 21, 2012
f5a0e89
Make rebuild more generic - so it works on Win32NT
fervidnerd Aug 22, 2012
0ad96b5
indent fix.
fervidnerd Aug 22, 2012
3b0a990
Change the way unsafe works so it DOSs the whole server
fervidnerd Aug 23, 2012
f26daa4
Use a very weak random gen
fervidnerd Aug 24, 2012
8a2c7f2
Disable HeaderChecking
raybeorn Feb 20, 2013
4a2cd9a
Added default.config to this branch
raybeorn Aug 13, 2013
7855ec9
Revert "Added default.config to this branch"
raybeorn Aug 13, 2013
408cd06
Merge branch 'new-lessons'
raybeorn Aug 13, 2013
5846bbf
there can be only one httpCookies
raybeorn Aug 13, 2013
7972315
Fix compilation problems
fervidnerd Jan 19, 2014
ee3322e
Fix issues with windows run'
fervidnerd Jan 19, 2014
7aaa833
Amend readme for better instructions
fervidnerd Jan 19, 2014
921bf94
Sentence Fragmentation
fervidnerd Jan 19, 2014
1c6cab1
Fix error where database is not open
fervidnerd Feb 22, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Project Files #
#################
*.userprefs
WebGoat/WebGoat.NET.pidb
WebGoat/bin
WebGoat/obj
*.pidb
*swp
bin
obj
WebGoat/App_Data/*.txt
WebGoat/App_Data/.DS_Store
WebGoat/App_Data/*.sqlite
*.sqlite*
WebGoat/Configuration/*.config

# Trash Files #
###############
.DS_Store
DB/.DS_Store
WebGoat/DB_Scripts/.DS_Store
76 changes: 59 additions & 17 deletions README
Original file line number Diff line number Diff line change
@@ -1,22 +1,64 @@

From the prompt, cd into the WebGoat.NET DB directory
***************************** Webgoat.NET **********************************
* Source Code: https://github.com/jerryhoff/WebGoat.NET
* Download zip: https://github.com/jerryhoff/WebGoat.NET/zipball/master
****************************************************************************

% cd /WebGoat.NET/DB
This web application is a learning platform that attempts to teach about
common web security flaws. It contains generic security flaws that apply to
most web applications. It also contains lessons that specifically pertain to
the .NET framework. The excercises in this app are intented to teach about
web security attacks and how developers can overcome them.

Start the mysql utility, giving the name (and password, if needed) of a user permission to create databases. For example, to use the default root user:
WARNING: THIS WEB APPLICATION CONTAINS NUMEROUS SECURITY VULNERABILITIES
WHICH WILL RENDER YOUR COMPUTER VERY INSECURURE WHILE RUNNING! IT IS HIGHLY
RECOMMENDED TO COMPLETELY DISCONNECT YOUR COMPUTER FROM ALL NETWORKS WHILE
RUNNING!

% mysql --user=root
Notes:
- Google Chrome performs filtering for reflected XSS attacks. These attacks
will not work unless chrome is run with the argument
--disable-xss-auditor.
- Some (but not all!) of the lessons require a working SQL database. Setup
guidelines are shown below.

Create the webgoat_coins database and load the schema. (Loading the schema the schema the first time will give error messages as it attemps to empty any existing tables, just ignore these.)
How To Build And Run under Mac OS X and Linux:
1. Prerequisites
a. Mono framework for your respective OS. It can be downloaded at
http://www.go-mono.com/mono-downloads/download.html. Make sure
that ALL components get installed, including GTK and xsp.
b. A DB for some of the lessions. Sqlite3 is recommended as it's
faster and easier to use for the purposes of these lessions.
Binaries can be found here: http://www.sqlite.org/download.html
2. Install the mono framework and sqlite3 binaries.
3. IMPORTANT: Make sure that the the mono executable is in your PATH.
4. Grab WebGoat.NET and cd into the root dir.
5. Run 'xbuild'. There may be a few warnings but there should be no
errors! If there are please let us know.
6. cd into the WebGoat project and run 'xsp4'. Then open your favorite
browser and go to http://localhost:8080 (or whatever port your
xsp4 is using if you're not using the default). Note: The first run
may take take some time as it's compiling everything on the fly.
7. If you see the WebGoat.NET page that means you're almost there! Next
step is to click on 'Set Up Database!'
8. You should see a form with a bunch of setup information for the
database. For 'Data Provider' choose Sqlite. For 'Data File Path' put
in 'db.sqlite3' and for 'Client Executable' put in the sqlite3
executable of your OS (usually /usr/bin/sqlite3).
9. Click on 'Test Configuration', followed by 'Rebuild Database' and
hopefully you should be good go! Enjoy your hackathon!

mysql> create database webgoat_coins;
mysql> use webgoat_coins;
mysql> source create_webgoatcoins.sql;

Load the table contents:

mysql> source load_webgoatcoins.sql;

Exit from mysql:

mysql> quit;
How to build and run under Windows:
1. Prerequisites:
a. Visual Studio 2010 and above.
b. Mysql database that's up and running with at least one user
aleady setup with full permissions.
2. Open WebGoat.sln file via Visual Studio, and click on debug.
3. You should see the WebGoat.NET page at which point click on
'Set Up Database'.
3. You should see a form with a bunch of setup information for the
database. For 'Data Provider' choose MySql. You'll need to fill in
the respective data entries for your mysql db. 'Client Executable'
and 'Data File Path' are not necessary for MySql so you can leave
them empty.
4. Click on 'Test Configuration', followed by 'Rebuild Database' and
hopefully you should be good go! Enjoy your hackathon!
3 changes: 1 addition & 2 deletions WebGoat/App_Code/CustomerLoginData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OWASP.WebGoat.NET
Expand Down Expand Up @@ -31,4 +30,4 @@ public String Message
}

}
}
}
13 changes: 8 additions & 5 deletions WebGoat/App_Code/DB/DbConstants.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System;
using System.IO;

namespace OWASP.WebGoat.NET.App_Code.DB
{
Expand All @@ -18,10 +19,12 @@ public class DbConstants
public const string DB_TYPE_MYSQL = "MySql";
public const string DB_TYPE_SQLITE = "Sqlite";
public const string CONFIG_EXT = "config";

//DB Scripts
public const string DB_CREATE_SCRIPT = "DB_Scripts/create_webgoatcoins.sql";
public const string DB_LOAD_MYSQL_SCRIPT = "DB_Scripts/load_webgoatcoins.sql";
public const string DB_LOAD_SQLITE_SCRIPT = "DB_Scripts/load_webgoatcoins_sqlite3.sql";
private const string SCRIPT_DIR = "DB_Scripts";
public static readonly string DB_CREATE_MYSQL_SCRIPT = Path.Combine(SCRIPT_DIR, "create_webgoatcoins.sql");
public static readonly string DB_CREATE_SQLITE_SCRIPT = Path.Combine(SCRIPT_DIR, "create_webgoatcoins_sqlite3.sql");
public static readonly string DB_LOAD_MYSQL_SCRIPT = Path.Combine(SCRIPT_DIR, "load_webgoatcoins.sql");
public static readonly string DB_LOAD_SQLITE_SCRIPT = Path.Combine(SCRIPT_DIR, "load_webgoatcoins_sqlite3.sql");
}
}
2 changes: 1 addition & 1 deletion WebGoat/App_Code/DB/MySqlDbProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public bool RecreateGoatDb()

log.Info("Running recreate");

int retVal1 = Math.Abs(Util.RunProcessWithInput(_clientExec, args, DbConstants.DB_CREATE_SCRIPT));
int retVal1 = Math.Abs(Util.RunProcessWithInput(_clientExec, args, DbConstants.DB_CREATE_MYSQL_SCRIPT));
int retVal2 = Math.Abs(Util.RunProcessWithInput(_clientExec, args, DbConstants.DB_LOAD_MYSQL_SCRIPT));

return Math.Abs(retVal1) + Math.Abs(retVal2) == 0;
Expand Down
Loading