Giter Club home page Giter Club logo

webgoat.net's Introduction

WebGoat.NET version 0.3

Build status

build .NET 8

The next generation of the WebGoat example project to demonstrate OWASP TOP 10 vulnerabilities

This is a re-implementation of the original WebGoat project for .NET.

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 exercises in this app are intended to teach about web security attacks and how developers can overcome them.

WARNING!:

THIS WEB APPLICATION CONTAINS NUMEROUS SECURITY VULNERABILITIES WHICH WILL RENDER YOUR COMPUTER VERY INSECURE WHILE RUNNING! IT IS HIGHLY RECOMMENDED TO COMPLETELY DISCONNECT YOUR COMPUTER FROM ALL NETWORKS WHILE RUNNING!

Notes:

  • Google Chrome performs filtering for reflected XSS attacks. These attacks will not work unless chrome is run with the argument --disable-xss-auditor.

Requirements

  • .NET 8 SDK

How to build and run

1. Running in a Docker container

The provided Dockerfile is compatible with both Linux and Windows containers.
To build a Docker image, execute the following command:

docker build --pull --rm -t webgoat.net .

Please note that Linux image is already built by pipeline and can be pulled from here.

Linux containers

To run the webgoat.net image, execute the following command:

docker run --rm -d -p 5000:80 --name webgoat.net webgoat.net

WebGoat.NET website should be accessible at http://localhost:5000.

Windows containers

To run webgoat.net image, execute the following command:

docker run --rm --name webgoat.net webgoat.net

Windows containers do not support binding to localhost. To access the website, you need to provide the IP address of your Docker container. To obtain the IP, execute the following command:

docker exec webgoat.net ipconfig

The output will include the IP of the 'webgoat.net' container, for example:

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::1967:6598:124:cfa3%4
   IPv4 Address. . . . . . . . . . . : 172.29.245.43
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.29.240.1

In the above example, you can access the WebGoat.NETCore website at http://172.29.245.43.

Stopping Docker container

To stop the webgoat.net container, execute the following command:

docker stop webgoat.net

2. Run locally using dotnet.exe (Kestrel)

  1. Build and publish WebGoat.NET with the following command:
dotnet publish -c release -o ./app 

The web application will be deployed to the app folder in the current directory.

  1. Execute the web application on localhost with the following command:
dotnet ./app/WebGoat.NET.dll --urls=http://localhost:5000

The the WebGoat.NET website will be accessible at the URL specified with the --urls parameter: http://localhost:5000.

3. Run using a script

The WebGoat.NET projects ships with scripts that allow you to conveniently run the web application. The following scripts are located in the the "script" directory in the root of the project:

  • runInDocker.bat - Runs the application in a Docker container on Windows.
  • runInDocker.sh - Runs the application in a Docker container on Linux.
  • runLocal.bat - Runs the application locally on Windows.
  • runLocal.sh - Runs the application locally on Linux.

Known issues:

  1. The latest OWASP Top 10 is not covered. The uncovered vulnerabilities need to be added to the code base.
  2. Educational documents/trainings for any categories of the latest OWASP Top 10 are not available.

webgoat.net's People

Contributors

annastuchlik avatar donex31 avatar jzielnik avatar ma-rybak avatar silvenga avatar tobyash86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

webgoat.net's Issues

Random order of products on product list

Feedback from Dave W.:

In the products list, can you sort the list alphabetically by product name? It seems weird to have this apparently random order, which I understand is ordered by product ID.

Document minimal requirements to run WebGoat

Feedback from Dave W.:

In the readme, or somewhere, can you add the tools required to install/run it outside of Docker? I.e., exactly what .NET installer you need, and anything else. (e.g., .NET Core SDK?). And the minimum version of each would be helpful too.

Bring back ClickJacking example or remove it completely

For now, ClickJacking does not work. We need to find out if it does have any sense to bring it back (e.g. the ASP.NET Core may be secured against it). If we will drop it, we need to remove all the ClickJacking content (e.g. from About).

No app icon in the browser

Feedback from Dave W.:

Can you add a web icon to the app, so there is an Icon for this app in the browser? Ideally some kind of WebGoatdotNET icon.

Message about empty credit card field is needed

login to WebGOAT
create order, use credit cart and select 'Remember this credit card number for next time I check out'.
Create next order, at checkout credit card is specified - OK.
Clear credit card field and click Place order (credit card field is empty).
Instead of message 'Please provide valid card number' I get
image

Cart not cleared after logout

Feedback from Dave W.:

Logout doesn't clear my cart (or do anything else?) - On purpose vuln??

We need to consider if this may be used in the context of newest Top 10. Otherwise, we need to fix it.

Remove raw SQL usage from the codebase

There are some raw SQL queries in the code. We should consider using EF Core instead.
For some reason EF does not work properly in the checkout, we need to find out why and fix it.

Make it easier to enter a valid credit card number

Feedback from Dave W.:

I was trying to enter a credit card and I keep getting "That card is not valid. Please enter a valid card."

Can you provide an explanation of what is legal? Either in a tooltip/or in the error message.

Rename docker image for WebGoat

Feedback from Dave W.:

For the docker stuff, I think maybe the image/container should be called webgoatdotnet to distinguish it from original webgoat (for Java)?

About page: content needs to be updated to OWASP Top 10 2021

Currently, the supported version of OWASP Top 10 is 2010. In general, we should update the WebGoat project to be compatible (contain vulnerabilities) of the newest standard.

I think we need to delay the update. Possibly a new OWASP version may be released before we will finalize the work. Also, first, we should include the vulnerabilities in the code.

Improve WebGoat.NET branding

We should keep WebGoat.NET as the name of web app. We need to make sure that we use it across entire application and GitHub project.

Search bar is case sensitive

When typing to search bar for products currently you need to be case-sensitive which seems to be a bad idea. Most search bars ignore casing.

About: validate content

Feedback from Dave W.:

There are a number of references on this page to specific .NET technology, which I suspect is not valid anymore. For example:
"Other Notes: When a user registers, he must enter a username and company name. His customerId will be based on CompanyName. His contact Name will be his UserName. Customer.ContactName cannot be changed once set or the link between ASP.NET's authentication and the Northwind tables will be broken."

Extend readme by supplemental docker scripts

Feedback from Dave W.:

In the readme, for both docker run commands, please add --rm to both commands so the container is removed when it is stopped. Otherwise, when you try to run it again, it will complain there is already a container with that name. Can you also add instructions on how to stop the containers (docker stop webgoat).

Doubled User Name on register page

Feedback from Dave W.:

On the Register page, there is a User Name field in both the Account Info and Address blocks. Can you eliminate the 2nd one, or rename it to just 'Name' and list it first?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.