A web-based, real-time multiplayer hacking simulation game designed to teach the basics of cybersecurity through a fun, interactive experience.
HackSim is an educational game that pits players against each other in a simulated network environment. Inspired by social deduction games like Among Us, it challenges players to think critically about cybersecurity from both an offensive (Red Team) and defensive (Blue Team) perspective.
The core of the game is a 3-player match where one player is secretly assigned the role of the Hacker, and the other two are Defenders. Using a simplified command-line interface, the Hacker must find and exploit a vulnerability to steal data, while the Defenders must use their logs, communication skills, and tools to identify and vote out the Hacker before time runs out.
Built with:
- Node.js
- Express
- Socket.IO
- Real-time Multiplayer: Play with friends in a live 3-player environment.
- Secret Roles: Experience the game as either the stealthy Hacker or a vigilant Defender.
- Social Deduction: Communicate with other players in the in-game chat to find the imposter or to deceive your targets.
- Interactive Terminal: Use a simplified, fun command-line interface to perform actions.
- Core Hacking Mechanics:
scanfor vulnerabilities.patchto secure your system.exploitto breach the target.logreadto find clues.voteto eject a suspect.
- Timed Rounds: A 10-minute timer creates a sense of urgency for both sides.
To get a local copy up and running, follow these simple steps.
Make sure you have Node.js and npm installed on your system.
- Clone the repo
git clone https://github.com/harsha260/HackSim.git
- Navigate to the project directory
cd HackSim - Initialize the project
npm init -y
- Install NPM packages
npm install express socket.io
- Run the server
node server.js
- Play the game!
- Open your web browser and navigate to
http://localhost:3000. - Open three separate browser tabs to the same address to simulate three players. The game will automatically start once the third player connects.
- Open your web browser and navigate to
Your objective is to find which of the two Defenders has the vulnerable system, exploit their open port, and win the game. Use your scan command to find the target and exploit to win. Stay anonymous and use the chat to sow confusion and blame others!
Your objective is to protect the network. Use logread frequently to check your system logs for suspicious activity like scans or failed exploits. Communicate with your fellow Defender in the chat to share information. Once you are sure who the Hacker is, use the vote command to kick them out. If you can't find the Hacker, you can also win by running out the 10-minute timer.
