HI Cyber Con CTF 2026. Hardware.

C3 Vault

Two layers of encryption on a retired gateway. The lab opened both and logged in as the gateway in 35 minutes.

Published 2 November 2026. Challenge by Hidden Investigations.

The brief

A retired ESP32-C3 gateway still has access to a remote vault. The recovery lab preserved its SPI flash and eFuse read-register window. Recover its enrollment credentials and convince the live service that you are the gateway. The gateway runs a custom enrollment application built with ESP-IDF. No brute force or physical board is required.

  • c3_vault.zip, 4.2 MB

In short

A retired ESP32-C3 gateway left behind its flash and its eFuses. The flash key sat readable in the fuses, and the decrypted flash held the keys to a second encrypted store. With the current seed and the firmware's two HMAC steps, the lab answered the live challenge as the gateway.

A gateway, its flash and its fuses

The lab got a 4 MiB flash image and 336 bytes read from the chip's eFuses. The bootloader, the partition table and the app were ciphertext. Only the page headers of the NVS store at 0x9000 were readable.

The flash key sat in the fuses

The 336 bytes map to 84 register words, BLOCK0 to BLOCK10. BLOCK0 says flash encryption is on with an XTS-AES-128 key. Only one key block, BLOCK4, holds anything at all.

Reversed, and reversed again

ESP32 flash encryption runs XTS on 128 byte units, tweaked by address. The key is the fuse block read backwards, and each unit is reversed before and after. Done that way, the partition table opens with its magic, aa 50.

A second layer inside the store

The decrypted nvs_keys partition holds two more keys. Each 32 byte NVS entry is its own XTS-AES-256 unit. Inside sit the device ID, generation 7 and two seeds, a stale vault_v1 and the current vault_v2.

Two HMACs in vault.c

In the RISC-V firmware, vault.c derives a device key as HMAC-SHA256 of the v2 seed over a label, the device ID and generation 7. A second HMAC signs the live challenge. There is no v1 code at all, so the stale seed was a decoy.

One answer, and the vault opened

The live service sends its device ID and a 32 byte challenge and takes one answer per connection. The lab sent the 32 byte HMAC response. The service replied VAULT OPENED and released the flag.

The insight

Flash encryption holds only while its key stays secret. Here the key block was readable, so the flash, the store and the gateway's identity all followed from it.

The flag

hiCTF{efus3_cl34r_jt4g_0p3n_nv5_408f9b955c}

Loading