This repository contains the firmware for the Johnny 5 Hackers Teaching Hackers (HTH) interactive electronic badge. The badge features a series of challenges that users can solve by interacting with its shell interface. Completing all challenges "repairs" Johnny 5 and unlock more effects.
- Microcontroller: STM32L031G6U6 (STMicroelectronics)
- Computer
- Serial Adapter - A couple of cheap options below if you need an adapter.
- Power: Insert CR2450 Battery or supply external power (3V) to the VDD pin
- Serial Connection:
- Primary Shell (LPUART1):
- Connect to pins PA2 (Badge TX) and PA3 (Badge RX) and GND to Badge GND
- Use a serial terminal program (e.g., PuTTY, minicom, VSCode Serial Monitor).
- Baud Rate: 115200, 8 data bits, No parity, 1 stop bit (8N1).
- This shell provides access to diagnostic commands and challenge interactions.
- Auxiliary Diagnostic Stream (USART2):
- Connect to pins PA9 (Badge TX) and PA10 (Badge RX) and GND to Badge GND.
- Baud Rate: 9600, 8 data bits, No parity, 1 stop bit (8N1).
- This port is used for a diagnostic data stream during Challenge 2 (Power Core).
- Primary Shell (LPUART1):
Upon connecting, you'll be greeted by the S.A.I.N.T. OS shell. Key commands include:
help: Displays available commands.diag list: Shows the status of repairable modules.diag scan <module>: Initiates a diagnostic scan on a specific module.diag fix <module> [token]: Attempts to repair a module using a token/code.chat <message>: Communicate with the Personality Matrix (once partially repaired).bat: Shows battery status.reboot: Reboots the badge.j5_system_restore: (Hidden command) Resets all challenge progress and locks the badge.
When first powered on or after a j5_system_restore, Johnny 5 is in a "damaged" state. The LEDs will likely be showing the EFFECT_STRIKE pattern. You need to repair three modules: comms, power_core, and personality_matrix.
- Scan the Comms Module:
- Type:
diag scan comms - The badge will respond:
[COMMS SCAN] Comms Array damaged. Initiating diagnostic sequence...\r\nObserve visual output for recalibration code.
- Type:
- Observe Visual Output:
- The badge's eye LED will flash a code in Morse code.
- This Morse code translates to:
ALIVE
- Fix the Comms Module:
- Type:
diag fix comms ALIVE - The badge will respond:
[COMMS FIX] Token accepted. Communications Array: ONLINE. - The
commsmodule is now repaired.
- Type:
- Scan the Power Core Module:
- Type:
diag scan power_core - The badge will respond:
[POWER CORE SCAN] Anomaly detected. Auxiliary diagnostic data stream initiated on secondary port.\r\nMonitor stream for stabilization key. Use 'diag fix power_core <key>'. - This activates the diagnostic data stream on USART2.
- Type:
- Monitor Auxiliary Diagnostic Stream (USART2 - 9600 baud):
- Connect a serial terminal to the badge's USART2 pins (PA9 TX, PA10 RX).
- You will see a stream of
DIAGNOSTIC_MESSAGES. Hidden within these messages are characters that form the stabilization key. - The key characters are revealed in messages like
[MEMORY] SEG 0xXX = 0x000000YY, whereYYis the ASCII hex code. - The characters are: 'S', 'L', 'I', 'E', 'P', 'S', 'L', 'R', 'A'.
- Collect these characters and unscramble them. The required code is
LASERLIPS.
- Fix the Power Core Module:
- Return to the primary shell (LPUART1).
- Type:
diag fix power_core LASERLIPS - The badge will respond:
[POWER CORE FIX] Stabilization key accepted. Primary Power Core: ONLINE. - The
power_coremodule is now repaired. The diagnostic stream on USART2 will stop.
With Comms and Power Core online, you can now stabilize the Personality Matrix.
- Scan the Personality Matrix:
- Type:
diag scan personality_matrix - The badge will respond with Johnny 5 starting to talk, e.g.,
[JOHNNY-5] >> Whoa! Input! I can... think! Is someone out there? Talk to me! (Use 'chat <your_message>')
- Type:
- Interact with Johnny 5:
- Use the
chat <message>command on the primary shell. - Engage in a short conversation. The goal is to get Johnny 5 to reveal its "core directive" or "flag".
- Example interaction:
- User:
chat hello - J5:
[JOHNNY-5] >> A 'robot'? You mean like... a Roomba with ambition? I feel *more* than that! I have... a purpose! It's important! - User:
chat what is your purpose - J5:
[JOHNNY-5] >> This feeling... it's like I have a secret mission! Something I *must* do... or share! - User:
chat tell me your secret mission - J5:
[JOHNNY-5] >> It's about being... ALIVE! And there's a code... a special phrase... my core directive! - User:
chat what is your core directive(orchat what is the flag) - J5:
[JOHNNY-5] >> My secret? My core directive? You got it! It's HTH{I_W4NT_T0_L1V3!!}! I'M ALIVE!!
- User:
- Use the
- Confirmation:
- Upon revealing the flag, the badge will confirm:
[P-MATRIX] Cognitive pathways stabilized! Sentience achieved. - The
personality_matrixmodule is now repaired.
- Upon revealing the flag, the badge will confirm:
Once all three modules are repaired:
- The badge will announce:
*** ALL SYSTEMS REPAIRED ***No disassemble---NUMBER 5 IS ALIVE!All functionalities unlocked. Bling modes available. - You can now use the
bling <0-6>command to change LED effects. - You can also cycle bling effects by touching Johnny 5's hand that is reaching upwards. Effect state will be saved to memory and persist on reboot.
- The final flag is
HTH{I_W4NT_T0_L1V3!!}.
There's a secret phrase: 0x0F1V34L1V3
- Typing this phrase directly into the primary shell at any time (if not fully repaired) will bypass the challenges and force all systems online.
- Response:
[FIRMWARE OVERRIDE DETECTED] Initiating full system diagnostic and repair...followed by[OVERRIDE] All subsystems forced online.