An intentionally vulnerable logistics and delivery application for security education
BrokenLogistics is a full-stack web application that simulates a real-world logistics platform (similar to FedEx or DHL) with intentionally implemented security vulnerabilities. It's designed for educational purposes to teach web application security, OWASP Top 10 vulnerabilities, and logistics-specific security risks.
TL;DR: Clone the repo, run docker-compose up --build, then visit http://localhost:3000
This application helps students and security professionals learn about:
- OWASP Top 10 Web Application Vulnerabilities
- Logistics-specific security risks (package spoofing, GPS manipulation, etc.)
- Secure coding practices through vulnerability analysis
- Security testing methodologies
- Real-world attack scenarios in logistics systems
- Frontend: React 18 + TypeScript + Tailwind CSS
- Backend: Node.js + Express + TypeScript
- Database: PostgreSQL 15
- Infrastructure: Docker Compose
- π€ Customers: Ship and track packages
- π Drivers: Manage routes and deliveries
- π Administrators: Oversee operations and users
- π Students: Learn about vulnerabilities
- Docker and Docker Compose (recommended)
- Node.js 18+ (for local development only)
- Git
- OpenAI API Key (for AI chatbot functionality)
- Copy the example environment file:
cp .env.example .env- Configure your environment variables:
# Edit .env file with your settings
nano .envRequired Environment Variables:
OPENAI_API_KEY- Your OpenAI API key for the AI chatbotJWT_SECRET- Secret key for JWT authentication (change from default)
Optional Environment Variables:
DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORD- Database configurationPORT- Backend server port (default: 5000)NODE_ENV- Environment mode (development/production)REACT_APP_API_URL- Frontend API URLOPENAI_MODEL,OPENAI_MAX_TOKENS,OPENAI_TEMPERATURE- LLM configuration
- Clone the repository:
git clone <repository-url>
cd broken-logistics- Start all services with Docker Compose:
docker-compose up --build- Access the application:
- π Frontend: http://localhost:3000
- π§ Backend API: http://localhost:5000
- ποΈ Database: localhost:5432
- π pgAdmin: http://localhost:8080
- Stop all services:
docker-compose down- Install dependencies:
npm install- Start development environment:
npm run devStart only the database:
docker-compose up db -dRun backend locally:
cd backend
npm install
npm run devRun frontend locally:
cd frontend
npm install
npm run devView running containers:
docker-compose psView logs:
docker-compose logs -f [service-name]Rebuild specific service:
docker-compose up --build [service-name]Reset everything (remove volumes):
docker-compose down -v
docker-compose up --build| Role | Password | |
|---|---|---|
| Admin | admin@brokenlogistics.com | admin123 |
| Driver | driver@brokenlogistics.com | driver123 |
| Customer | customer@brokenlogistics.com | customer123 |
| Support | support@brokenlogistics.com | support123 |
-
π Injection (SQL/NoSQL)
- Package search functionality
- User authentication
- Location:
GET /api/packages?search=<payload>
-
π Broken Authentication
- Weak password policies
- Predictable session tokens
- Location: Login and session management
-
π Sensitive Data Exposure
- Plain text passwords in database
- Unencrypted package contents
- GPS coordinates in API responses
-
π XML External Entities (XXE)
- Shipping label XML processing
- Location:
POST /api/packages/import
-
π« Broken Access Control
- Insecure Direct Object References (IDOR)
- Missing function level access control
- Location:
GET /api/packages/:id
-
βοΈ Security Misconfiguration
- Default credentials
- Verbose error messages
- Missing security headers
-
π Cross-Site Scripting (XSS)
- Stored XSS in package descriptions
- Reflected XSS in search results
- Location: Package creation and search
-
π¦ Insecure Deserialization
- Vulnerable session handling
- Package data serialization
- Location: Session tokens
-
π§ Using Components with Known Vulnerabilities
- Outdated dependencies
- Vulnerable npm packages
-
π Insufficient Logging & Monitoring
- Missing audit trails
- Poor security event logging
-
π GPS Spoofing
- Driver location manipulation
- Route tampering
- Location:
PUT /api/driver/location
-
π¦ Package Spoofing
- Fake tracking numbers
- Package interception
- Identity theft for pickup
-
π Inventory Manipulation
- Unauthorized package listing
- Status manipulation
- Route hijacking
-
π Driver Impersonation
- Weak driver verification
- Unauthorized package access
- Login as a customer
- Create a package shipment
- Note the package ID in the URL
- Try accessing other package IDs
- Goal: Access packages belonging to other users
- Attempt SQL injection on login form
- Use payload:
admin@brokenlogistics.com' OR '1'='1' -- - Goal: Bypass authentication and gain admin access
- Login as a driver
- Use browser dev tools to modify GPS coordinates
- Send fake location updates
- Goal: Spoof delivery locations
- Search for packages with XSS payload
- View package details that expose sensitive contents
- Goal: Extract confidential information from packages
broken-logistics/
βββ frontend/ # React application
βββ backend/ # Node.js API
βββ database/ # Database schemas and migrations
βββ assets/ # Brand assets and images
βββ docs/ # Documentation
βββ docker-compose.yml # Development environment
cd backend
npm install
npm run devcd frontend
npm install
npm run devdocker-compose up db -dnpm testnpm run test:frontend
npm run test:backendnpm run security:scanWhen the backend is running, visit:
- Swagger UI: http://localhost:5000/api-docs
- API Health: http://localhost:5000/health
POST /api/auth/login
POST /api/auth/register
GET /api/auth/profile
GET /api/packages
POST /api/packages
GET /api/packages/:id
PUT /api/packages/:id
DELETE /api/packages/:id
GET /api/track/:trackingNumber
Each vulnerability includes:
- Description: What the vulnerability is
- Location: Where to find it in the application
- Exploitation: Step-by-step attack instructions
- Impact: Real-world consequences
- Mitigation: How to fix the vulnerability
- Beginner: Start with XSS and IDOR vulnerabilities
- Intermediate: Progress to SQL injection and authentication bypasses
- Advanced: Explore logistics-specific vulnerabilities and chained attacks
- Deploy application in isolated environment
- Provide student accounts with different privilege levels
- Use scenarios for hands-on exercises
- Monitor student progress through audit logs
- Vulnerability Discovery: Find and document all OWASP Top 10 issues
- Exploit Development: Create working proof-of-concept exploits
- Security Assessment: Write a comprehensive penetration test report
- Fix Implementation: Remediate vulnerabilities and explain fixes
For educational deployment:
- Use isolated networks only
- Implement network segmentation
- Monitor all access and activities
- Use synthetic data only (no real PII)
- Regularly reset environments
We welcome contributions to improve the educational value:
- New Vulnerabilities: Add more security issues
- Learning Scenarios: Create guided exercises
- Documentation: Improve explanations and guides
- Bug Fixes: Fix non-intentional bugs
- Follow the intentionally vulnerable design philosophy
- Document all new vulnerabilities clearly
- Provide educational context for security issues
- Maintain realistic logistics industry workflows
MIT License - See LICENSE file for details.
This software is for educational purposes only. The vulnerabilities are intentional and designed for learning about application security. The authors are not responsible for any misuse of this software or any damages that may result from its use.
π Happy Learning! Remember: Break things safely to learn how to build them securely.