Skip to content

Repository files navigation

🧸 ToyStore VulnLab β€” Intentionally Vulnerable E‑commerce App (Local Training Lab)

ToyStore VulnLab is a deliberately insecure, Amazon‑style toy shopping web app built for learning Web App VAPT through hands‑on practice.
Run it locally, break it safely, and sharpen your skills against OWASP Top 10 issues using real workflows: login, cart, checkout, admin panel, and more.


✨ Why this repo exists

Security skills improve fastest when you can see the bug, exploit it, and then fix it.

This project is designed as a controlled vulnerable lab where you can:

  • Practice Web Application Penetration Testing
  • Reproduce real-world vulnerability patterns
  • Learn how bugs behave in auth, sessions, API calls, DB queries
  • Improve both attacker mindset + defender thinking

βœ… Perfect for: Students β€’ Bug bounty beginners β€’ VAPT practice β€’ OWASP Top 10 training
⚠️ Not for production use.


🧩 What you get inside

ToyStore VulnLab includes typical e‑commerce modules:

  • User signup / login / sessions
  • Product listing + search
  • Cart & checkout flow
  • Orders / payments simulation
  • Admin panel features (intentionally unsafe in places)
  • Dockerized DB initialization

🎯 Vulnerabilities covered (OWASP-aligned)

This lab intentionally contains vulnerable patterns based on OWASP Top 10:

  • βœ… Injection (SQLi-like patterns / unsafe queries)
  • βœ… Broken Access Control (IDOR / missing role checks)
  • βœ… Identification & Authentication failures
  • βœ… Security Misconfiguration
  • βœ… Insecure Design decisions (by intention)
  • βœ… Data exposure / weak validation flows
  • βœ… Logging gaps / monitoring weaknesses

πŸ“Œ See: VULNERABILITY_MATRIX.md for the full list + mapping.


πŸ—οΈ Tech Stack

  • Node.js / Express (server)
  • PostgreSQL (database)
  • Docker + Docker Compose (local environment)
  • SQL init scripts in /db

πŸš€ Quick Start (Recommended)

1) Requirements

Make sure you have:

  • Docker + Docker Compose installed
  • Node.js (optional if you run only via Docker)

2) Run the lab

git clone https://github.com/Itachi-Hacks/toy-store-vuln.git
cd toy-store-vuln-COMPLETE
docker compose up --build

The app will start locally (check terminal output for the exact port).

βœ… You can also use the included start scripts:

chmod +x start.sh
./start.sh

or

chmod +x start-simple.sh
./start-simple.sh

πŸ” Default accounts (if seeded)

Some builds may insert demo users during DB init.

If you don’t see credentials mentioned on startup, check:

  • SETUP.md
  • db/init.sql

πŸ“š How to use this repo (Training Workflow)

βœ… Beginner path (safe + structured)

  1. Start the lab locally
  2. Open TESTING_GUIDE.md
  3. Follow modules in order:
    • Authentication testing
    • Authorization / access control
    • Input validation & injection
    • Session management
    • Admin routes
  4. Document findings like a real report:
    • Impact
    • Steps to reproduce
    • Payload
    • Fix recommendation

βœ… Tools you can practice with

You can test this lab using:

  • Browser DevTools
  • Burp Suite / OWASP ZAP
  • curl / httpie
  • sqlmap (only locally)
  • Nmap (localhost only)
  • Custom scripts

πŸ§ͺ Local testing notes

This repo is meant to run only in a local isolated environment:

βœ… Allowed:

  • Localhost scanning
  • Docker network traffic inspection
  • Testing payloads for learning

❌ Not allowed:

  • Deploying publicly
  • Scanning external targets
  • Using it against systems you don’t own

πŸ“‚ Repo structure (high level)

toy-store-vuln-COMPLETE/
β”œβ”€β”€ web-app.js                  # Main Node.js app
β”œβ”€β”€ docker-compose.yml          # App + DB containers
β”œβ”€β”€ Dockerfile                  # App image build
β”œβ”€β”€ db/
β”‚   └── init.sql                # Database schema + seed data
β”œβ”€β”€ SETUP.md                    # Setup & environment info
β”œβ”€β”€ TESTING_GUIDE.md            # Step-by-step testing guide
β”œβ”€β”€ VULNERABILITY_MATRIX.md     # Vulnerability mapping table
β”œβ”€β”€ UPDATES.md                  # Change log / updates
└── start.sh / start-simple.sh  # Quick run scripts

πŸ›‘οΈ Fixing mode (optional challenge)

Want to level up?

After finding vulnerabilities, try to patch the app:

  • Sanitize + validate user input
  • Add server-side authorization checks
  • Use parameterized queries everywhere
  • Lock down admin routes
  • Improve error handling & logging
  • Add rate-limiting / basic security headers

Then compare your fixes with secure coding best practices.


🧾 Documentation

Useful project docs included in this repo:

  • SETUP.md β†’ Setup steps & environment details
  • TESTING_GUIDE.md β†’ VAPT walkthrough tasks
  • VULNERABILITY_MATRIX.md β†’ Vulnerabilities + OWASP mapping
  • UPDATES.md β†’ Changes & version notes

🀝 Contributing

This is a learning repo β€” contributions are welcome:

  • Add new vulnerable modules (with labels)
  • Improve documentation clarity
  • Add fixes behind a secure branch
  • Improve DB seed data and realism

βœ… Please keep vulnerabilities intentional and documented.


πŸ“œ License & Disclaimer

Educational use only.
This project is intentionally vulnerable and must be used only in controlled environments.

By using this repo, you agree that:

  • You will not deploy it publicly
  • You will use it only for legal, ethical practice
  • You are responsible for your own actions

⭐ If this helped you

If you learned something from this project:

  • Star the repo ⭐
  • Share it with your security friends πŸ§ πŸ”’
  • Build your own β€œsecure version” fork πŸ› οΈ

Happy (ethical) hacking! 🧸πŸ”₯

About

🧸 Vulnerable Toy Store web app for practicing Web VAPT safely in a Docker lab. πŸ›‘οΈ Learn and test OWASP Top 10 vulnerabilities with real-world examples. πŸš€ Perfect for beginners + pentesters to sharpen skills locally without risk.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages