File size: 4,010 Bytes
98cdced
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Troubleshooting

## Docker is unavailable

`python lab.py preflight` reports `Docker CLI: NOT FOUND` or an inaccessible engine.

- Install/start Docker Desktop and enable WSL 2 integration on Windows.
- Confirm `docker version` and `docker compose version` work in the same terminal used for the lab.
- Until then, run only unit tests and `python lab.py validate`; do not interpret static validation as deployment.

## Wazuh fails during setup

- Use only the controller's pinned `v4.14.10` files; do not clone `main` or mix release tags.
- On Linux/WSL, set the indexer prerequisite on the Docker host: `sudo sysctl -w vm.max_map_count=262144`. Persist it through the host's normal sysctl configuration.
- Inspect `.vendor/wazuh-docker/single-node` and run `docker compose ps` there.
- Certificate generation must complete before the stack starts.
- Initial downloads and indexer startup can take several minutes.
- Do not fix startup errors by deleting volumes; that destroys evidence and credentials.

## Wazuh dashboard is not reachable

Use `https://127.0.0.1:5443`, not the upstream default port 443. Expect a self-signed-certificate warning. Run `python lab.py status` and inspect manager/indexer/dashboard logs.

## WAF starts but Juice Shop is unreachable

- Confirm both services are in the same profile: `docker compose --profile core ps`.
- Confirm the backend remains `http://juice-shop:3000` and `range_net` is internal.
- An internal network intentionally prevents the target containers from reaching the internet; image pulls are performed by Docker, not by Juice Shop.
- Check `docker compose logs waf` and `docker compose logs juice-shop`.

## WAF blocks a legitimate exercise

Start at paranoia level 1. Use `WAF_MODE=DetectionOnly` temporarily to compare behavior, inspect rule IDs in logs, and add a narrowly scoped exclusion only after understanding the false positive. Restore `WAF_MODE=On` after the exercise.

## Nmap command is rejected

The controller intentionally accepts only explicit targets and a small option allowlist. Examples:

```bash
python lab.py scan waf -- -sV --top-ports 100
python lab.py scan juice-shop -- -sT -p 3000
```

Targets beginning with `-`, shell metacharacters, scripts, output paths, and arbitrary extra targets are rejected. Use a separate manually controlled container only if an advanced exercise needs other options.

## MobSF cannot perform dynamic analysis

The provided image/path is for static analysis. Configure a separate supported Android emulator/VM and follow MobSF's dynamic-analysis documentation. Do not treat a successful APK upload as proof that dynamic instrumentation is available.

## Ollama or copilot has no AI output

- The copilot works without a model using deterministic fallback.
- Run `python lab.py pull-model` after `python lab.py up ai`.
- Check `docker compose logs ollama` and `docker compose logs soc-copilot`.
- A small CPU model can be slow; the default request timeout is 90 seconds and can be changed in `.env`.
- New Wazuh alerts below `MIN_RULE_LEVEL=10` are intentionally ignored.
- Existing alerts are skipped on first run to avoid a large backlog; deliberately set `PROCESS_EXISTING_ALERTS=1` to import them.

## Named volume is missing

Use the controller rather than raw Compose commands. `up ai`, `up blue`, and `wazuh-setup` create the shared Wazuh/WAF volumes. To create them manually:

```bash
docker volume create cyber-range-wazuh-logs
docker volume create cyber-range-waf-logs
```

## Host memory pressure

Run `python lab.py down`, stop Security Onion/GOAD, and start only one profile. Use `core`, then `blue`, `mobile`, or `ai` separately. Full GOAD is not a good fit for a 32 GiB Windows host once the host OS and other applications are included.

## Static validation dependencies

The controller and copilot use the Python standard library. YAML validation requires PyYAML:

```bash
python -m pip install -r requirements-dev.txt
python -m unittest discover -s tests -v
python validate.py
```