From d2b5f7b47dd7a93573f99550afe30ce82b408283 Mon Sep 17 00:00:00 2001 From: Aaron <7063649+ahcodedev@users.noreply.github.com> Date: Wed, 11 Nov 2026 12:22:41 -0800 Subject: [PATCH 1/2] Add OWASP Web Goat lab --- README.md | 1 + justfile | 7 +++++++ webgoat/README.md | 37 +++++++++++++++++++++++++++++++++++++ webgoat/compose.yaml | 14 ++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 webgoat/README.md create mode 100644 webgoat/compose.yaml diff --git a/README.md b/README.md index 67e4675..25b3efe 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Requires Docker. Each lab pairs a deliberately vulnerable target with a shared [ | [DVWA](dvwa/README.md) | One page per vulnerability class (PHP) | `just dvwa-up` | `just dvwa-down` | | [crAPI](crapi/README.md) | Vulnerable API application (microservices) | `just crapi-up` | `just crapi-down` | | [DVGA](dvga/README.md) | Vulnerable GraphQL API (Python) | `just dvga-up` | `just dvga-down` | +| [WebGoat](webgoat/README.md) | Guided lessons with WebWolf helper (Java) | `just webgoat-up` | `just webgoat-down` | After starting a lab, open the Kali desktop at (password `kalilab`). Each lab's README covers its usage. diff --git a/justfile b/justfile index 26103b9..5ec66bd 100644 --- a/justfile +++ b/justfile @@ -45,6 +45,12 @@ dvga-up ttl="120": (lab-up "dvga" ttl) # Stop the DVGA lab dvga-down: lab-down +# Start the WebGoat lab; it shuts itself down after `ttl` minutes +webgoat-up ttl="120": (lab-up "webgoat" ttl) + +# Stop the WebGoat lab +webgoat-down: lab-down + # Labs share the Kali desktop port, so only one runs at a time. [private] lab-up dir ttl: lab-down @@ -60,3 +66,4 @@ lab-down: docker compose -f dvwa/compose.yaml down docker compose -f crapi/compose.yaml down docker compose -f dvga/compose.yaml down + docker compose -f webgoat/compose.yaml down diff --git a/webgoat/README.md b/webgoat/README.md new file mode 100644 index 0000000..f9181ef --- /dev/null +++ b/webgoat/README.md @@ -0,0 +1,37 @@ +# OWASP WebGoat lab + +[OWASP WebGoat](https://owasp.org/www-project-webgoat/) is a deliberately insecure Java web application for learning web security. Lessons explain a vulnerability and then ask you to exploit it. WebWolf, a helper app that plays the attacker's server (file hosting, a mailbox and a request catcher), runs in the same container. + +## Usage + +```sh +just webgoat-up # build and start +just webgoat-down # stop +``` + +1. Run `just webgoat-up`. +2. Open the [Kali desktop](../kali/README.md) at . +3. In the Kali browser, go to `http://webgoat:8080/WebGoat`. +4. Register your own account (username of 6 or more lowercase characters). WebWolf is at `http://webgoat:9090/WebWolf` and uses the same login. + +## Services + +| Service | Image | Purpose | +| --------- | ----------------- | --------------------------------------------------------------- | +| `webgoat` | `webgoat/webgoat` | WebGoat on port 8080 (`/WebGoat`), WebWolf on 9090 (`/WebWolf`) | +| `kali` | `lab-kali` | Attacker desktop | +| `gateway` | `alpine/socat` | Publishes the Kali desktop on `127.0.0.1:6080` | + +## How the lab behaves + +- **Isolated**: the target and Kali sit on an internal Docker network with no internet access. The target is not published to the host, so it is reachable only from inside Kali. +- **Auto-off**: the lab shuts itself down after 2 hours. Pass minutes to change it, for example `just webgoat-up 30`. The timer only applies when the lab is started through `just`. +- **One lab at a time**: starting this lab stops any other lab that is running. +- **Resets on stop**: WebGoat keeps no data between runs, so accounts and lesson progress are lost when the lab stops. Files under `/home/kali` are kept; see the [Kali desktop](../kali/README.md). + +## Notes + +- The image name `webgoat/webgoat` comes from the official repo README. It is pinned by digest in `compose.yaml`. +- `WEBGOAT_HOST` and `WEBWOLF_HOST` are set to `webgoat` so links between the two apps use the service name. +- Docker shows the container as `unhealthy`: the image's built-in healthcheck calls `curl`, which the image does not include. The apps still work. +- Burp Suite and ZAP are installed in Kali. diff --git a/webgoat/compose.yaml b/webgoat/compose.yaml new file mode 100644 index 0000000..46ab485 --- /dev/null +++ b/webgoat/compose.yaml @@ -0,0 +1,14 @@ +name: webgoat + +include: + - ../kali/compose.yaml + +services: + # WebGoat (8080) and WebWolf (9090) run in the same container. + webgoat: + image: webgoat/webgoat:latest@sha256:95c23e70502d0e0e11a826a73889e2ca93f965171202c17c0c59353ba67be86a + environment: + # Host names WebGoat uses in links (default 127.0.0.1); the image already binds 0.0.0.0. + WEBGOAT_HOST: webgoat + WEBWOLF_HOST: webgoat + networks: [lab] From ba4113f4f1ac566ba8f2f66ea0dd748295c1ba12 Mon Sep 17 00:00:00 2001 From: Aaron <7063649+ahcodedev@users.noreply.github.com> Date: Wed, 11 Nov 2026 12:50:05 -0800 Subject: [PATCH 2/2] Retrigger CI