> For the complete documentation index, see [llms.txt](https://www.breaching-defenses.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.breaching-defenses.com/lab/elk.md).

# ELK

## Setting Up ELK

### Installing ELK

```
cd C:\Users\$($env:USERNAME)\Desktop\Breaching-Defenses.com
docker-compose up
```

### Enroll agent

Now that we have setup elk we want to enroll our agents.

Read the token from `ELK/token`/`elastictoken` and modify LabSources/CustomRoles/Elastic\_agent/HostStart.ps1 line 21 to:

`C:\Tools\ELK\elastic-agent\elastic-agent.exe install --insecure -f  -url=http://elk.breachdefs.com:28220 --enrollment-token=<TOKEN>;`
