Skip to content
/ DVBLab Public

This course uses a deliberately vulnerable banking application to demonstrate common security vulnerabilities, their impact, and how to fix them. The application is built with Flask (backend) and React (frontend).

Notifications You must be signed in to change notification settings

mamgad/DVBLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DVBank Lab: Hands-on Web Security with Python & React

A Practical Guide to Secure Code Review and Web Application Security

Welcome to DVBank Lab, an intentionally vulnerable banking application designed for learning secure code review and web application security. This project serves as both a hands-on learning environment and a comprehensive course in identifying, understanding, and fixing security vulnerabilities.

Inspired by DVWA (Damn Vulnerable Web Application), this project aims to provide a modern, full-stack vulnerable application specifically focused on banking security scenarios.

🎯 Demo

Dashboard

Dashboard Demo

Transaction System

Transactions Demo

Profile Features

Profile Features

🎯 Educational Objectives

This project helps you master:

  • Secure code review techniques
  • Vulnerability identification and exploitation
  • Security fix implementation
  • Security assessment methodologies
  • Secure coding practices

πŸ› οΈ Technology Stack

Backend

  • Python 3.9+
  • Flask Framework
  • SQLAlchemy ORM
  • JWT Authentication
  • SQLite Database

Frontend

  • React 18
  • TailwindCSS
  • Lucide Icons
  • Modern UI/UX

Development & Deployment

  • Docker & Docker Compose
  • Git Version Control
  • Development Tools Integration

πŸ“š Module Index

Detailed course materials can be found in the following files:

Module Description Link
0. Methodology Secure Code Review Methodology πŸ“˜ Module 0
1. Application Reconnaissance Application Reconnaissance & Attack Surface Mapping πŸ“˜ Module 1
2. Software Composition Analysis Dependency Security Analysis πŸ“˜ Module 2
3. Authentication & Authorization Authentication & Authorization Vulnerabilities πŸ“˜ Module 3
4. SQL Injection SQL Injection Vulnerabilities πŸ“˜ Module 4
5. Input Validation Input Validation Vulnerabilities πŸ“˜ Module 5
6. API Security API Security Best Practices πŸ“˜ Module 6
7. Secure Coding Secure Coding Practices πŸ“˜ Module 7
8. Static Analysis Automated Static Analysis with Semgrep πŸ“˜ Module 8

Each module contains:

  • Theoretical background
  • Vulnerable code examples
  • Exploitation techniques
  • Prevention methods
  • Hands-on exercises
  • Additional resources

πŸš€ Quick Start

Prerequisites

  • Python 3.9 or higher
  • Node.js 16 or higher
  • Docker and Docker Compose (optional)
  • Git

Docker Setup (Recommended)

# Clone repository
git clone https://github.com/mamgad/DVBLab.git
cd DVBLab

# Launch application
docker-compose up --build

Manual Setup

Backend (Python/Flask)

# Clone repository
git clone https://github.com/mamgad/DVBLab.git
cd DVBLab

# Backend setup
cd backend
python -m venv venv

# Activate virtual environment
source venv/bin/activate  # Linux/macOS
.\venv\Scripts\activate   # Windows

# Install dependencies
pip install -r requirements.txt

# Start server
python app.py

Frontend (React)

# In a new terminal
cd frontend
npm install
npm start

Access the Application

Test Credentials

  • Username: alice, Password: password123
  • Username: bob, Password: password123

πŸ—οΈ Project Structure

vulnerable-bank/
β”œβ”€β”€ backend/                  # Flask backend
β”‚   β”œβ”€β”€ routes/              # API endpoints
β”‚   β”‚   β”œβ”€β”€ auth_routes.py   # Authentication
β”‚   β”‚   └── transaction_routes.py  # Transactions
β”‚   β”œβ”€β”€ app.py              # Main application
β”‚   β”œβ”€β”€ models.py           # Database models
β”‚   └── requirements.txt    # Python dependencies
β”œβ”€β”€ frontend/               # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   └── App.js        # Main app component
β”‚   └── package.json      # Node dependencies
β”œβ”€β”€ course/               # Educational content
β”‚   β”œβ”€β”€ modules/         # Course modules
β”‚   └── exercises/       # Practice materials
└── docker-compose.yml   # Docker configuration

πŸ”’ Security Features

Authentication System

  • JWT-based authentication
  • Password hashing
  • Session management

Transaction System

  • Money transfers
  • Balance tracking
  • Transaction history

User Management

  • User registration
  • Profile management
  • Role-based access

🎯 Learning Objectives

Vulnerability Categories

  1. Authentication Bypass
  2. Authorization Flaws
  3. Input Validation
  4. Business Logic Flaws
  5. API Security Issues

Security Skills

  1. Code Review Techniques
  2. Vulnerability Assessment
  3. Security Testing
  4. Fix Implementation

⚠️ Security Notice

This application contains INTENTIONAL security vulnerabilities for educational purposes:

  1. SQL Injection vulnerabilities
  2. Insecure JWT implementation
  3. Missing input validation
  4. IDOR vulnerabilities
  5. Race conditions
  6. Weak password policies

DO NOT:

  • Deploy to production
  • Use real credentials
  • Use production data
  • Host publicly

🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request
  4. Follow security guidelines

πŸ“š Additional Resources

Documentation

External Resources

πŸ™ Acknowledgments

  • OWASP Foundation
  • DVWA - The original inspiration for this project
  • Security research community
  • Open source contributors

⚠️ Disclaimer

This application contains intentional security vulnerabilities for educational purposes. The creators are not responsible for any misuse or damage caused by this application. Use at your own risk and only in a controlled, isolated environment.


Legal Notice

Β© 2024 All Rights Reserved.

This educational material is provided for learning purposes only. The code examples and vulnerabilities demonstrated are for educational use in a controlled environment. The authors and contributors are not responsible for any misuse of the information provided.

Note: All code examples contain intentional vulnerabilities for educational purposes. Do not use in production environments.

About

This course uses a deliberately vulnerable banking application to demonstrate common security vulnerabilities, their impact, and how to fix them. The application is built with Flask (backend) and React (frontend).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published