mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-22 03:38:03 +00:00
237d606d6aab3472dfd0a60eec94216c4dbcb3b9
Mission 3: Intelligence Gathering & Network Reconnaissance - ENTROPY Cell: Zero Day Syndicate - SecGen Scenario: Information Gathering: Scanning - New Mechanics: RFID keycard cloning, network reconnaissance - Difficulty: Intermediate (Mission 3 of Season 1) - Playtime: 60-75 minutes Key Features: - Undercover operation at WhiteHat Security Services (Zero Day front) - RFID cloning mechanics introduction - Network scanning integration (nmap, netcat, distcc exploitation) - Multi-encoding puzzle (ROT13, Hex, Base64) - Major revelation: Zero Day sold M2 hospital ransomware exploit - First direct mention of "The Architect" (campaign arc progression) - Double agent vs. arrest moral choice Campaign Connections: - Reveals cross-cell coordination (M2 hospital attack traced to Zero Day) - Sets up Zero Day as recurring antagonist - Introduces The Architect as mysterious coordinator - Client list connects M1 (Social Fabric), M2 (Ransomware Inc), M4 (Critical Mass) CyBOK Areas: - Network Security (port scanning, service enumeration, banner grabbing) - Systems Security (distcc exploitation CVE-2004-2687) - Applied Cryptography (multiple encoding types, pattern recognition) - Security Operations (intelligence correlation, systematic investigation) README includes: - Executive summary and mission overview - 9-stage development workflow (same as M1, M2) - Technical challenges breakdown (RFID, network recon, encoding) - Narrative arc (3 acts: undercover → infiltration → revelation) - Key NPCs (Victoria Sterling, James Park, Cipher references) - LORE opportunities (client lists, exploit catalog, Architect requirements) - Good practices from M1 & M2 - Critical decisions needed before Stage 0 - Risk assessment - Development timeline estimate (70-97 hours design) Status: Ready for Stage 0 initialization
BreakEscape Rails Engine
Cybersecurity training escape room game as a mountable Rails Engine.
Features
- 24+ cybersecurity escape room scenarios
- Server-side progress tracking with 2-table schema
- Randomized passwords per game instance via ERB
- JIT Ink script compilation for NPC dialogue
- Polymorphic player support (User/DemoUser)
- Pundit authorization
- RESTful API for game state management
- Session-based state persistence
Installation
In your Gemfile:
gem 'break_escape', path: 'path/to/break_escape'
Then:
bundle install
rails break_escape:install:migrations
rails db:migrate
rails db:seed # Optional: creates missions from scenarios
Mounting in Host App
In your config/routes.rb:
mount BreakEscape::Engine => "/break_escape"
Usage
Standalone Mode (Development)
export BREAK_ESCAPE_STANDALONE=true
rails server
# Visit http://localhost:3000/break_escape/
Mounted Mode (Production)
Mount in Hacktivity or another Rails app. The engine will use the host app's current_user via Devise.
Configuration
# config/initializers/break_escape.rb
BreakEscape.configure do |config|
config.standalone_mode = false # true for development
config.demo_user_handle = 'demo_player'
end
Database Schema
break_escape_missions- Scenario metadata (name, display_name, published, difficulty)break_escape_games- Player state + scenario snapshot (JSONB)break_escape_demo_users- Standalone mode only (optional)
API Endpoints
GET /games/:id/scenario- Scenario JSON (ERB-generated)GET /games/:id/ink?npc=X- NPC script (JIT compiled from .ink)GET /games/:id/bootstrap- Initial game dataPUT /games/:id/sync_state- Sync player statePOST /games/:id/unlock- Validate unlock attemptPOST /games/:id/inventory- Update inventory
Architecture
ERB Scenario Generation
Scenarios are stored as .json.erb templates and rendered on-demand with randomized values:
<%= random_password %>- Generates unique password per game<%= random_pin %>- Generates unique 4-digit PIN<%= random_code %>- Generates unique hex code
JIT Ink Compilation
NPC dialogue scripts compile on first request (~300ms):
- Check if
.jsonexists and is newer than.ink - If needed, run
inklecateto compile - Cache compiled JSON for subsequent requests
State Management
Player state stored in JSONB column:
- Current room and unlocked rooms
- Inventory and collected items
- NPC encounters
- Global variables (synced with client)
- Health and minigame state
Testing
rails test
License
AGPL v3 - See LICENSE file for details
Documentation
See HACKTIVITY_INTEGRATION.md for integration guide.
Description
Languages
JavaScript
86.5%
Ink
7%
HTML
2.9%
CSS
2.5%
Ruby
0.9%
Other
0.2%