Skip to content

imharshitaa/playbox

Repository files navigation

Playbox Vulnerable Lab Environment

WARNING: This project is intentionally insecure. It is for learning, training, and testing only. Run inside an isolated VM or an offline Docker host. Do not expose these services to the internet or production networks.

What This Is

Playbox is a collection of deliberately vulnerable mini-services grouped by domain. Each domain exposes OWASP Top 10 (2021) style endpoints plus extra classic issues (SQLi, XSS, CORS, etc.). The goal is to provide a safe local playground for security testing, training, and tooling demos.

What You Get

Domains and their lab surfaces:

  • Web app lab (Flask, HTML) with XSS, CSRF, path traversal, uploads, etc.
  • API lab (Flask, JSON) with SQLi, IDOR, weak auth, CORS, SSRF, etc.
  • AI lab (Flask) with LLM-style prompts and agent-style tool execution
  • Network lab (Flask + TCP) with unsafe length framing and HTTP wrappers
  • Cloud lab (Flask) with insecure policies, metadata SSRF, misconfig examples
  • Gateway (nginx) that routes unified paths: /labs/web/, /labs/api/, /labs/ai/, /labs/network/, /labs/cloud/

Quick Start (Docker)

docker compose up --build -d

Gateway URLs (path-based):

If you want http://playbox/..., add 127.0.0.1 playbox to your hosts file.

Local Run (No Docker)

Prereqs:

  • Python 3
  • pip packages: flask, requests

Install deps:

pip install -r requirements.txt

Start services:

./run_local.sh

Optional local gateway (path-based /labs/... on one port):

./run_gateway_local.py

Gateway runs at: http://localhost:8081

Notes:

  • The local gateway is a minimal Python reverse proxy. For the full nginx gateway, use Docker.
  • Each service still runs on its own port locally.

Direct Ports (Local Access)

OWASP Top 10 (2021) Endpoint Pattern

Every domain exposes endpoints for:

  • A01: Broken Access Control
  • A02: Cryptographic Failures
  • A03: Injection
  • A04: Insecure Design
  • A05: Security Misconfiguration
  • A06: Vulnerable and Outdated Components
  • A07: Identification and Authentication Failures
  • A08: Software and Data Integrity Failures
  • A09: Security Logging and Monitoring Failures
  • A10: Server-Side Request Forgery (SSRF)

Examples:

Repo Layout

  • gateway/ -> Nginx reverse proxy for unified lab URLs
  • vuln_webapp/ -> Web app lab
  • vuln_api/ -> API lab
  • vuln_ai/ -> AI lab (LLM + agent behaviors)
  • vuln_network/ -> TCP server + HTTP network lab endpoints
  • vuln_cloud/ -> Cloud lab API + MinIO
  • run_local.sh -> Local runner for all services
  • run_gateway_local.py -> Local reverse proxy gateway
  • requirements.txt -> Local Python dependencies

Security Notice

This repository is intentionally vulnerable. Use only in isolated environments. Do not expose it to any public network or production system.

Hosted Demo (Render Free)

This repo includes a Render Blueprint that deploys a single public service which runs all labs behind a gateway. After you deploy, you'll get a URL like: https://playbox.onrender.com/labs/

Steps: create a free Render account, click "New" -> "Blueprint" and connect this repo, Render will read render.yaml and build the service, then open your public URL and access /labs/web/, /labs/api/, /labs/ai/, /labs/network/, /labs/cloud/.

Notes: free Render instances sleep when idle and may take time to wake. Set the Render service name to playbox to get https://playbox.onrender.com/. Update the README link after your deployment to point to your real Render URL. The gateway shows a safety disclaimer at / and /labs/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors