update readme
This commit is contained in:
26
README.md
26
README.md
@@ -1,21 +1,21 @@
|
|||||||
## Exploit Lab
|
# Exploit Lab
|
||||||
|
|
||||||
Overview
|
## Overview
|
||||||
- Lightweight Docker Compose lab for binary analysis/exploitation built on Kali.
|
- Lightweight Docker Compose lab for binary analysis/exploitation built on Kali.
|
||||||
- Provides common tools (gcc, gdb, pwntools, radare2, binwalk, strace, ltrace, etc.) in a non-privileged container with challenge files mounted read-only.
|
- Provides common tools (gcc, gdb, pwntools, radare2, binwalk, strace, ltrace, etc.) in a non-privileged container with challenge files mounted read-only.
|
||||||
|
|
||||||
Requirements
|
## Requirements
|
||||||
- Docker Engine and Docker Compose (v2) installed.
|
- Docker Engine and Docker Compose (v2) installed.
|
||||||
- Enough disk space for image build (several hundred MB+).
|
- Enough disk space for image build (several hundred MB+).
|
||||||
- Optional: adjust UID/GID if your host user isn't 1000.
|
- Optional: adjust UID/GID if your host user isn't 1000.
|
||||||
|
|
||||||
Repository layout (example)
|
## Repository layout (example)
|
||||||
- docker-compose.yml
|
- docker-compose.yml
|
||||||
- kali/Dockerfile
|
- kali/Dockerfile
|
||||||
- challenge/ ← drop your challenge ZIP/files here (mounted read-only)
|
- challenge/ ← drop your challenge ZIP/files here (mounted read-only)
|
||||||
- README.md
|
- README.md
|
||||||
|
|
||||||
Quick start
|
## Quick start
|
||||||
1. Place challenge files in ./challenge
|
1. Place challenge files in ./challenge
|
||||||
2. Build and start the lab (background):
|
2. Build and start the lab (background):
|
||||||
```
|
```
|
||||||
@@ -34,12 +34,12 @@ Quick start
|
|||||||
docker compose down
|
docker compose down
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes about safety & file locations
|
### Notes about safety & file locations
|
||||||
- Mounted challenge directory is read-only inside the container at /home/kali/challenge.
|
- Mounted challenge directory is read-only inside the container at /home/kali/challenge.
|
||||||
- Writable workspace: the named volume /home/kali/work and /tmp inside the container.
|
- Writable workspace: the named volume /home/kali/work and /tmp inside the container.
|
||||||
- The runtime image is non-privileged and has restricted capabilities (per docker-compose.yml), but it shares the host kernel — for maximal isolation use a disposable VM and document that in your report.
|
- The runtime image is non-privileged and has restricted capabilities (per docker-compose.yml), but it shares the host kernel — for maximal isolation use a disposable VM and document that in your report.
|
||||||
|
|
||||||
Typical workflow inside container
|
### Typical workflow inside container
|
||||||
- Inspect files without executing:
|
- Inspect files without executing:
|
||||||
file /home/kali/challenge/app
|
file /home/kali/challenge/app
|
||||||
sha256sum /home/kali/challenge/*
|
sha256sum /home/kali/challenge/*
|
||||||
@@ -49,15 +49,15 @@ Typical workflow inside container
|
|||||||
cp -r /home/kali/challenge /home/kali/work/challenge1
|
cp -r /home/kali/challenge /home/kali/work/challenge1
|
||||||
- Run debugging/reversing tools from the venv-provided PATH (pwntools, etc.) — venv is at /opt/venv and is on PATH in the image.
|
- Run debugging/reversing tools from the venv-provided PATH (pwntools, etc.) — venv is at /opt/venv and is on PATH in the image.
|
||||||
|
|
||||||
Rebuilding or updating tools
|
### Rebuilding or updating tools
|
||||||
- After editing the Dockerfile, rebuild:
|
- After editing the Dockerfile, rebuild:
|
||||||
`docker compose build --no-cache`
|
`docker compose build --no-cache`
|
||||||
`docker compose up -d`
|
`docker compose up -d`
|
||||||
|
|
||||||
Networking
|
### Networking
|
||||||
- By default runtime network is disabled (network_mode: "none") to reduce risk. If you need network, edit docker-compose.yml and remove or change network_mode, then rebuild.
|
- By default runtime network is disabled (network_mode: "none") to reduce risk. If you need network, edit docker-compose.yml and remove or change network_mode, then rebuild.
|
||||||
|
|
||||||
Common commands
|
## Common commands
|
||||||
- Start foreground (logs): `docker compose up --build`
|
- Start foreground (logs): `docker compose up --build`
|
||||||
- Start background: `docker compose up -d`
|
- Start background: `docker compose up -d`
|
||||||
- Exec shell: `docker compose exec exploit-lab /bin/bash`
|
- Exec shell: `docker compose exec exploit-lab /bin/bash`
|
||||||
@@ -66,15 +66,15 @@ Common commands
|
|||||||
- Rebuild image: `docker compose build --no-cache`
|
- Rebuild image: `docker compose build --no-cache`
|
||||||
- Stop and remove: `docker compose down`
|
- Stop and remove: `docker compose down`
|
||||||
|
|
||||||
Troubleshooting
|
## Troubleshooting
|
||||||
- Build errors about pip/PEP 668: the Dockerfile uses a Python virtualenv (/opt/venv). If you change Python steps, prefer venv over system pip.
|
- Build errors about pip/PEP 668: the Dockerfile uses a Python virtualenv (/opt/venv). If you change Python steps, prefer venv over system pip.
|
||||||
- Malformed Docker config warnings: fix or move ~/.docker/config.json.
|
- Malformed Docker config warnings: fix or move ~/.docker/config.json.
|
||||||
- Missing Dockerfile during build: ensure dockerfile is at the path referenced by docker-compose.yml (build.context and build.dockerfile).
|
- Missing Dockerfile during build: ensure dockerfile is at the path referenced by docker-compose.yml (build.context and build.dockerfile).
|
||||||
|
|
||||||
Customization tips
|
## Customization tips
|
||||||
- Change host UID mapping: edit Dockerfile USER_UID/USER_GID or the compose user field to match your host user.
|
- Change host UID mapping: edit Dockerfile USER_UID/USER_GID or the compose user field to match your host user.
|
||||||
- Add/remove tools in kali/Dockerfile apt install list.
|
- Add/remove tools in kali/Dockerfile apt install list.
|
||||||
- If you need angr, add its build deps and install inside the venv (longer build).
|
- If you need angr, add its build deps and install inside the venv (longer build).
|
||||||
|
|
||||||
License
|
## License
|
||||||
- MIT
|
- MIT
|
||||||
|
|||||||
Reference in New Issue
Block a user