CyberKavach QuestCon Series: The Unsounded Gate
The Unsounded Gate
Welcome back to the official write-up series for CyberKavach QuestCon! The PCCOE OWASP Student Chapter is back to break down another challenge from our event.
This time, we're opening "The Unsounded Gate," an audio forensics challenge authored by Sai Veer.
Challenge Details
Category: Crypto / Steganography
Difficulty: Advanced
Flag Format: questCON{...}
Step 1: Audio File Metadata Extraction
You are provided with an archive containing several files. After unpacking, data.wav and transmission.b85 stand out along with Python scripts and documentation.
Start by inspecting the tail of data.wav for embedded parameters.
Step 2: Base85 Decoding and Decompression
The file transmission.b85 is encoded in Base85 and compressed. Use the following procedure to extract the raw binary:
Decode with Base85, then decompress with zlib.
Output is written to xored.bin.
Expected command sequence in Python:
python
import base64, zlib
b = open('transmission.b85','rb').read()
open('xored.bin','wb').write(zlib.decompress(base64.b85decode(b)))
Step 3: XOR Keystream Correction
Use the previously extracted nonce as a seed. Generate keystream bytes using SHA-256 for each block and XOR them with the data in xored.bin to recover blob.bin. This operation corrects a buggy keystream routine present in the original decryptor.
Step 4: Splitting IV, Ciphertext, and HMAC
Extract the initialization vector (IV), ciphertext, and embedded HMAC signature from blob.bin with precise byte slicing.
IV: first 16 bytes
Ciphertext: middle section
HMAC: last 32 bytes
Step 5: HMAC Verification
Calculate an HMAC value from SALT2 and a secret key, compare it to the embedded HMAC to ensure block integrity.
Step 6: Extract PASS and Derive AES Key
From image.png included in the archive, extract a base64-encoded passphrase found in EXIF UserComment. The decoded string is used to derive the AES-CBC decryption key using PBKDF2 with SALT1 and ITERS.
First 16 bytes of the PBKDF2 output are used as the AES-128-CBC key.
Step 7: Decrypt and Reveal the Flag
Finally,
Use the derived AES key and IV to decrypt the ciphertext.
Unpad the plaintext and view the flag, which begins with a partial string and a nonce found earlier.
Format the output to match the required flag style:
questCON<FlagPart><Nonce>
Expected:
FLAG : questCON{El3v3n_Cr4ck3d_Th3_G4t3_00000000}
Takeaways
Layered audio and crypto challenges require both forensic and algorithmic analysis.
Intentional bugs in provided scripts encourage understanding and repairing cryptographic routines.
This challenge integrates knowledge of audio steganography, Python scripting, cryptographic key derivation, and data carving.
Congratulations to those who cracked "The Unsounded Gate"!
Comments
Post a Comment