dorkhub

nsec-badge

Software from the NorthSec badge

nsec
HTML607 forksupdated 2 months ago
visit the demogit clone https://github.com/nsec/nsec-badge.gitnsec/nsec-badge

NorthSec 2025 badge

Brought to you by the Team badge of NorthSec.

Overview


Hardware

The NorthSec 2025 badge is loosely based on the ESP32-C3 design with an ESP32-C3 microcontroller (ESP32-C3-WROOM-02-N4) which is used to drive several periphery devices:

The badge is powered through a USB-C port or through 3 AAA batteries.

If you wish to hack your badge or create a new one based on the hardware. All the information is available here.

Building the firmware

The firmware is based on the Espressif IoT Development Framework. The build system uses PlatformIO to easily manage the dependencies.

You can install it on Debian / Ubuntu in a python virtualenv with these commands:

sudo apt install python3-virtualenv

virtualenv .venv
. .venv/bin/activate

pip install platformio

The installation procedure for your OS may differ a little, please consult the PlatformIO documentation if you have any difficulties.

Once the installation is complete you can build the firmware:

# Conference firmware
pio run -e conference

# CTF firmware
pio run -e ctf

Flashing

Flash the firmware with this command:

# Conference firmware
pio run -t upload -e conference

# CTF firmware
pio run -t upload -e ctf

If multiple badges are connected, you can select which badge will be flash with the --upload-port <port_name> option:

# Conference firmware
pio run -t upload -e conference --upload-port <port_name>

To improve the upload speed, you can skip the build validation/process with the -t nobuild option:

# Conference firmware
pio run -t upload -t nobuild -e conference

Debugging

To read the logging statements output on the USB serial interface, it is possible to use pio device monitor or idf.py's monitor command.

However, you can use your preferred terminal emulator by pointing it to the /dev/ttyACM0 device. The badge is configured to output at 115200 bauds, without parity, and with one stop bit per character.

Note that electrically resetting the board using the hardware switch will cause the pseudo-terminal device to disappear, making it hard to read the logs emitted during boot.

Pulsing the DTR signal (lowering it for 1 second) will cause the board to reset without affecting the pseudo-terminal device, allowing you to read early-boot messages. This is supported by most terminal emulators.

Credits

NorthSec CTF badge 2025 is brought to you by the teamwork of:

Special thanks to:

more like this

anne-key

Firmware for Anne Pro Keyboard written in Rust

Rust572

ML-MCU

Code for IoT Journal paper 'ML-MCU: A Framework to Train ML Classifiers on MCU-based IoT Edge Devices'

C51

yaos

An embedded operating system for ARM Cortex-M based microcontrollers

C51

search

search projects, people, and tags