Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://127.0.0.1:6080/vnc.html> (password `kalilab`). Each lab's README covers its usage.

Expand Down
7 changes: 7 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
37 changes: 37 additions & 0 deletions webgoat/README.md
Original file line number Diff line number Diff line change
@@ -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 <http://127.0.0.1:6080/vnc.html>.
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.
14 changes: 14 additions & 0 deletions webgoat/compose.yaml
Original file line number Diff line number Diff line change
@@ -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]
Loading