← Virtual projects
Node.js required
Free
Review to certify
Security Lab: Injection + Password Hashing
Break a vulnerable login, then fix it — learn SQL injection and why passwords must be hashed.
SQL injection defense
Password hashing
Input validation
Secure coding
HTTP security basics
AI can generate working login code that is still unsafe. This lab trains your security instincts.
Starter: /assets/templates/node-security-lab/
You will:
1) Reproduce SQL injection on /login/unsafe (classic ' OR '1'='1)
2) Switch to parameterized /login/safe
3) Compare plaintext vs bcrypt password storage
4) Register a user with hashed password; verify login works
5) Write a short threat note: what AI code often gets wrong
Submit: demo notes (what payload worked) + reflection (120+ chars).
Environment setup (start here)
1) Node.js LTS + folder C:\Users\YourName\node-security-lab 2) npm install (see SQL lab if better-sqlite3 fails) 3) npm run db:init && npm start 4) Open http://localhost:3002 — use the demo login form only on this URL.
1) ~/Documents/node-security-lab with starter files 2) npm install && npm run db:init && npm start 3) http://localhost:3002
How do I know it worked?
Common issues
Starter pack
Sign in to complete steps and earn an e-certificate.
Log in