DL·SYS
Contact ↗

CSCTF 2026 · Mobile · 200 pts

VaultKeeper.

An Android vault app's recovery note is AES-GCM encrypted under a key built from three different inputs — one of which has to be brute-forced against an HMAC check printed in the app itself.

Android reverse engineeringAES-GCM
EventCSCTF 2026, Operation Dawn (online jeopardy)
CategoryMobile
Points200
StatusSolved during the event
Targetvaultkeeper.apk, offline

TL;DR. VaultKeeper's final recovery note decrypts under AES-256-GCM with a key derived from the app's own signing-certificate hash, a 4-digit code brute-forced against an HMAC the app itself documents, and a physical handover-card code given in the challenge text.

Challenge

Recover the hidden note from a field-seized Android handset's vault app, given only the APK and a physical handover-card code.

Solution

With no jadx or apktool available, the APK was decompiled with androguard in a scratch venv. com.vaultkeeper implements a three-step recovery flow; the final note decrypts in MainActivity with AES/GCM/NoPadding under a key built as SHA-256(recovery_token || archive_digits || handset_input):

recovery_token is computed in-app as "KJSC-" + hex(SHA256(APK signing cert))[:8].upper() + "-RECOVERY", derivable directly from the APK's own v2 signing certificate: KJSC-1C28DC7E-RECOVERY.

archive_digits is a 4-digit code with no stated value, but the app documents a check: hex(HMAC-SHA256(key="VK-7F42", archive_digits))[:8].upper() must equal a string resource, "3778F16D". Brute-forcing all 10,000 four-digit values against that HMAC check finds exactly one match: 4972.

The handset input is the physical handover-card authorization code given in the challenge text, ZHUU-SANS-9XJN-QPCQ.

With all three inputs, the ciphertext — a Base64 string resource holding a 12-byte GCM nonce plus the encrypted body — decrypts successfully; AES-GCM's own authentication tag validating is the self-check that the derived key is correct.

Flag

FlagCSCTF{intent_uri_and_a_broadcast_unlock_the_vault}

What I took from it