Skip to content

psgtech-caa/hackthebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ Hack The Box 2026 - Operation Cipher Strike

Beast-Inspired Cybersecurity Competition Event

Status Story Implementation License

Help RAW agent Veera Raghavan save 1,200 hostages. Decode. Infiltrate. Survive. Win.


๐ŸŽฌ THE STORY

February 1, 2026, 2:00 AM - Coimbatore, India

A shopping mall is under siege. 1,200 hostages trapped inside.
Umar Saif, a terrorist with a personal vendetta, demands the release of a captured militant.
The Home Minister secretly helps the terrorists.
A cyber-attack (Operation BLACKOUT) will hit India's tech hub on Valentine's Day.

Veera Raghavan, a broken RAW agent with PTSD from a mission gone wrong, is the only one who can stop this.
But he needs YOUR cyber team (CERT-In interns) to help from outside.

Your Mission:

  • ๐Ÿ” Decode intercepted transmissions
  • ๐Ÿ’ป Crack terrorist databases
  • ๐Ÿ”“ Defuse the cyber-attack logic bomb
  • โฐ Stop the Operation BLACKOUT in the next 7 hours
  • ๐Ÿ† Save 1,200 lives + 50,000 jobs + national security

Based on the 2022 Tamil film "Beast" starring Vijay โ€“ adapted for your cybersecurity competition.


๐Ÿ“‚ Documentation Structure

docs/
โ”œโ”€โ”€ DELIVERY-COMPLETE.md          โญ Executive Summary
โ”œโ”€โ”€ MASTER-INDEX.md               ๐Ÿ“– Complete File Index
โ”œโ”€โ”€ README-STORY.md               ๐Ÿ“– Role-Based Paths
โ”œโ”€โ”€ PROJECT-SUMMARY.md            ๐ŸŽฏ Next Steps
โ”œโ”€โ”€ story/
โ”‚   โ”œโ”€โ”€ BEAST-STORY-NARRATIVE.md  ๐ŸŽฌ Full Story (15,000 words)
โ”‚   โ”œโ”€โ”€ CHALLENGE-STORY-MAP.md    ๐Ÿ“‹ 9 Challenges Mapped
โ”‚   โ””โ”€โ”€ VISUAL-STORY-FLOW.md      ๐ŸŽจ Timeline & Marketing
โ””โ”€โ”€ implementation/
    โ”œโ”€โ”€ COMIC-BOOK-IMPLEMENTATION.md  ๐ŸŽจ Visual Novel Guide
    โ”œโ”€โ”€ INTEGRATION-GUIDE.md          ๐Ÿ› ๏ธ Technical Steps
    โ”œโ”€โ”€ IMAGE-GENERATION-PROMPTS.md   ๐Ÿ“ธ AI Illustrations
    โ””โ”€โ”€ IMPLEMENTATION-CHECKLIST.md   โœ… Progress Tracker

๐Ÿš€ QUICK START

For Decision Makers (5 min read)

  1. DELIVERY-COMPLETE.md โ€“ Mission overview
  2. PROJECT-SUMMARY.md โ€“ Implementation recommendations
  3. Decision: Choose tier (Minimal/Comic Book/Premium)

For Developers (Start here)

  1. COMIC-BOOK-IMPLEMENTATION.md โ€“ Visual novel guide
  2. INTEGRATION-GUIDE.md โ€“ Technical integration
  3. CHALLENGE-STORY-MAP.md โ€“ Challenge data

For Designers

  1. COMIC-BOOK-IMPLEMENTATION.md โ€“ Character specs
  2. IMAGE-GENERATION-PROMPTS.md โ€“ AI generation prompts

For Marketers

  1. VISUAL-STORY-FLOW.md โ€“ Social media templates

For Project Managers

  1. IMPLEMENTATION-CHECKLIST.md โ€“ Progress tracking

โœจ WHAT'S INCLUDED

๐Ÿ“– Complete Story Package (~37,000 words)

  • โœ… Cinematic narrative based on Beast (2022)
  • โœ… 9 CTF challenges mapped to story moments
  • โœ… Character bios and dialogue for 9 characters
  • โœ… Linear progression (Prologue โ†’ 5 Acts โ†’ Epilogue)

๐ŸŽจ Comic Book Visual Novel Implementation

  • โœ… Character illustration specifications (15 images)
  • โœ… AI generation prompts for all characters
  • โœ… CSS speech bubble components
  • โœ… Responsive design (mobile, tablet, desktop)
  • โœ… No video/audio complexity (just images + text)

๐Ÿ› ๏ธ Implementation Guide

  • โœ… 3 effort tiers (Minimal/Comic Book/Premium)
  • โœ… Database schema updates
  • โœ… React component templates
  • โœ… Technical integration steps
  • โœ… Quality checklist
  • ๐ŸŒ Three.js Animated Background (cyber grid, particles)
  • ๐ŸŽญ GSAP Smooth Animations (60 FPS transitions)
  • ๐Ÿ“ฑ Desktop-Optimized (1280px minimum, no mobile needed)
  • โšก Real-Time Updates (WebSocket activity feed)

๐Ÿ“Š Expected Impact

  • +15-20% participation increase
  • +20% completion rate improvement
  • +25% return rate for future events
  • 90%+ satisfaction vs 75% baseline

๐Ÿ’ฐ Implementation Tiers

Tier Time Cost Impact
Minimal 2-3 days $0 Medium
Comic Book โญ 1-2 weeks $100-500 High
Premium 3-4 weeks $500+ Max

๐Ÿ“š STORY AT A GLANCE

Protagonist: Veera Raghavan (RAW Agent)
Crisis: 1,200 hostages in mall siege
Antagonist: Umar Saif (Terrorist leader)
Cyber Threat: Operation BLACKOUT (Feb 14 deadline)
Stakes: 50,000 jobs + โ‚น2,000 crore + national infrastructure

Based On: Beast (2022) Tamil film starring Vijay


๐ŸŽฏ YOUR NEXT STEP

  1. Review: docs/DELIVERY-COMPLETE.md
  2. Decide: Implementation tier
  3. Read: docs/PROJECT-SUMMARY.md
  4. Assign: Team roles

๐Ÿ”— IMPORTANT LINKS

Link Purpose
docs/MASTER-INDEX.md File index & quick reference
docs/story/BEAST-STORY-NARRATIVE.md Full story (15,000 words)
docs/implementation/COMIC-BOOK-IMPLEMENTATION.md Visual novel guide
docs/implementation/IMAGE-GENERATION-PROMPTS.md AI character prompts
docs/implementation/INTEGRATION-GUIDE.md Technical integration
docs/implementation/IMPLEMENTATION-CHECKLIST.md Progress tracker

๐Ÿš€ QUICK START

# 1. Review the delivery
open docs/DELIVERY-COMPLETE.md

# 2. Choose your tier
open docs/PROJECT-SUMMARY.md

# 3. Start reading based on your role
# Developers โ†’ docs/implementation/COMIC-BOOK-IMPLEMENTATION.md
# Designers โ†’ docs/implementation/IMAGE-GENERATION-PROMPTS.md
# Marketers โ†’ docs/story/VISUAL-STORY-FLOW.md
# Managers โ†’ docs/implementation/IMPLEMENTATION-CHECKLIST.md

๐Ÿ“ž HELP & SUPPORT


๐ŸŽฌ THE VISION

Transform your Hack The Box competition from a standard CTF into an unforgettable cinematic experience where participants:

โœ… Feel emotionally connected to characters
โœ… Experience real stakes (saving 1,200 lives)
โœ… Get professional animations and visuals
โœ… Remember this event for YEARS
โœ… Tell their friends about the amazing story


๐Ÿ“ Project Info

Created: February 10, 2026
Status: โœ… Production Ready
Total Documentation: ~37,000 words across 11 files
Story Basis: Beast (2022) by Nelson Dilipkumar


๐Ÿ† LET'S BUILD SOMETHING LEGENDARY

Start here: docs/DELIVERY-COMPLETE.md ๐Ÿš€

Help Veera Raghavan save 1,200 hostages. The city's fate rests in your hands.

  • Port numbers

3. Start the Platform

docker compose up --build

First startup takes 3-5 minutes (downloading images, building, database migration)

4. Access the Platform

Once you see both services running:

5. Login

Admin Account:

  • Username: admin
  • Password: admin123

Test Accounts:

  • Username: user1 to user5
  • Password: test123

๐Ÿ“ฑ For LAN Access

To access from other devices on your network:

  1. Find your machine's IP address:

    # Windows
    ipconfig
    
    # Linux/Mac
    ifconfig
  2. Access from other devices:

    • Frontend: http://YOUR_IP:3000
    • Example: http://192.168.1.100:3000
  3. Update .env for LAN mode:

    NEXT_PUBLIC_API_URL=http://YOUR_IP:3001/api
  4. Restart containers:

    docker compose down
    docker compose up --build

๐ŸŽฎ Usage Guide

For Participants

  1. Register/Login at http://localhost:3000
  2. Create or Join a Team - Required to submit flags
  3. View Challenges - Navigate to Challenges page
  4. Submit Flags - Enter flags to earn points
  5. Check Scoreboard - Live rankings updated every 10 seconds

For Admins

  1. Login as Admin (credentials above)

  2. Go to Admin Panel at http://localhost:3000/admin

  3. Manage Rounds:

    • Activate rounds to make challenges available
    • Complete rounds when finished
    • Lock Round 3 after first team wins (automatic)
  4. Create Challenges:

    • Select a round
    • Enter title, description, points
    • Set the flag (will be encrypted)
    • Optional: Add hints, max attempts
  5. Monitor Competition:

    • View real-time statistics
    • Track submissions
    • Monitor team progress

๐Ÿ—๏ธ Architecture

hack-the-box/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ frontend/          # Next.js application
โ”‚   โ”‚   โ”œโ”€โ”€ app/          # Pages (App Router)
โ”‚   โ”‚   โ”œโ”€โ”€ components/   # UI components
โ”‚   โ”‚   โ””โ”€โ”€ lib/          # API client, utilities
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ backend/          # NestJS API
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ auth/     # JWT authentication
โ”‚       โ”‚   โ”œโ”€โ”€ users/    # User management
โ”‚       โ”‚   โ”œโ”€โ”€ teams/    # Team operations
โ”‚       โ”‚   โ”œโ”€โ”€ rounds/   # Round control
โ”‚       โ”‚   โ”œโ”€โ”€ challenges/  # Challenge CRUD
โ”‚       โ”‚   โ”œโ”€โ”€ submissions/ # Flag validation
โ”‚       โ”‚   โ”œโ”€โ”€ scoreboard/  # Live rankings
โ”‚       โ”‚   โ””โ”€โ”€ admin/    # Admin operations
โ”‚       โ”‚
โ”‚       โ””โ”€โ”€ prisma/       # Database schema & migrations
โ”‚
โ”œโ”€โ”€ docker-compose.yml    # Container orchestration
โ””โ”€โ”€ .env                 # Configuration

๐Ÿ” Security Features

  • Password Hashing: bcrypt (10 rounds)
  • Flag Storage: Flags stored as bcrypt hashes
  • JWT Auth: Secure token-based authentication
  • Rate Limiting: 10 requests per minute default
  • Role-Based Access: PARTICIPANT, ADMIN, JUDGE
  • Input Validation: All endpoints validated
  • SQL Injection Protection: Prisma ORM

๐ŸŽฏ Round Types Explained

Round 1: Decode the Secret

  • Static cryptography challenges
  • Base64, Caesar cipher, XOR, etc.
  • Fixed scores per challenge
  • No attempt limits (unless set)

Round 2: Find & Crack

  • Hash cracking challenges
  • MD5, SHA-256, etc.
  • Rate-limited submissions (5 per minute)
  • Max attempts enforced per challenge

Round 3: Catch the Flag

  • Single final challenge
  • First team to submit correct flag wins
  • Round automatically locks after first correct submission
  • Highest point value

๐Ÿ› ๏ธ Management Commands

Stop the Platform

docker compose down

View Logs

docker compose logs -f

Reset Database (keeps structure)

Use Admin Panel โ†’ Danger Zone โ†’ Reset Competition

Or manually:

docker compose down -v
docker compose up --build

Seed Database Again

docker compose exec backend npm run prisma:seed

Backup Database

docker compose exec postgres pg_dump -U hackthebox hackthebox > backup.sql

๐Ÿ“Š Seeded Data

The platform comes pre-loaded with:

  • 1 Admin user
  • 5 Test participants
  • 3 Rounds (Round 1 active by default)
  • 6 Sample challenges:
    • 3 in Round 1 (100-200 points each)
    • 2 in Round 2 (250-300 points each)
    • 1 in Round 3 (1000 points)

Sample Challenge Solutions

Round 1:

  1. Base64 Basics โ†’ HackTheBox2026
  2. Caesar Cipher โ†’ Welcome The Box
  3. Simple XOR โ†’ easy

Round 2:

  1. MD5 Hash Cracker โ†’ password
  2. SHA-256 Mystery โ†’ password123

Round 3:

  1. The Final Flag โ†’ HTB{y0u_4r3_th3_ch4mp10n}

๐Ÿ› Troubleshooting

Port Already in Use

# Find and stop conflicting services
docker compose down
# Or change ports in .env

Database Connection Failed

# Wait for postgres to be ready (check logs)
docker compose logs postgres

# Restart if needed
docker compose restart backend

Frontend Can't Connect to Backend

  • Check NEXT_PUBLIC_API_URL in .env
  • Ensure backend is running: docker compose ps
  • Check backend logs: docker compose logs backend

Build Errors

# Clean rebuild
docker compose down -v
docker compose build --no-cache
docker compose up

๐Ÿ”ง Development Mode

To run in development (with hot reload):

Backend:

cd apps/backend
npm install
npm run start:dev

Frontend:

cd apps/frontend
npm install
npm run dev

Update .env:

NEXT_PUBLIC_API_URL=http://localhost:3001/api

๐Ÿ“ˆ Scaling for 100+ Users

Current setup handles 100 users easily. For more:

  1. Increase Docker Resources:

    • Docker Desktop โ†’ Settings โ†’ Resources
    • Set CPU: 4+ cores, RAM: 8+ GB
  2. Database Tuning:

    • Add to docker-compose.yml under postgres:
      command: postgres -c max_connections=200
  3. Rate Limiting:

    • Adjust in apps/backend/src/app.module.ts

๐ŸŽจ Customization

Change Theme Colors

Edit apps/frontend/app/globals.css - CSS variables

Add Custom Challenges

Use Admin Panel or directly via API:

POST /api/admin/challenges
{
  "roundId": "...",
  "title": "My Challenge",
  "description": "...",
  "flag": "solution",
  "points": 300,
  "order": 1
}

Modify Scoring

Edit apps/backend/src/submissions/submissions.service.ts

๐Ÿ“ API Documentation

Key Endpoints

Authentication:

  • POST /api/auth/register - Create account
  • POST /api/auth/login - Login

Teams:

  • POST /api/teams - Create team
  • POST /api/teams/join - Join team
  • GET /api/teams - List all teams

Challenges:

  • GET /api/rounds/current - Active round
  • GET /api/challenges - All challenges

Submissions:

  • POST /api/submissions - Submit flag

Scoreboard:

  • GET /api/scoreboard - Live rankings

All endpoints require JWT token in Authorization: Bearer <token> header (except auth routes).

๐Ÿ“„ License

This is an educational project for CTF competitions. Use responsibly.

๐Ÿค Support

For issues or questions:

  1. Check logs: docker compose logs
  2. Verify all services running: docker compose ps
  3. Review troubleshooting section above

๐ŸŽ‰ Credits

Built with:

  • Next.js 15
  • NestJS 10
  • PostgreSQL 16
  • Redis 7
  • shadcn/ui components
  • Tailwind CSS

Ready to hack? Start the platform and let the competition begin! ๐Ÿš€

About

Need to add

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages