Challenges
Smali AES Key
Mobile
Medium
Mobile reverse engineering: recovering an AES key from Dalvik Smali bytecode
Solves: 2
Smali AES Key
Author: CyberSamSU
Points
50
An archive of Smali source files extracted from an Android APK with apktool is provided: smali.zip.
In its getKey()[B method, the smali/uz/samsu/app/KeyHolder.smali class takes a 16-byte array from the .array-data 1 table and builds an AES-128 key by applying XOR and bit shift (rotation) operations to each byte. Api.smali then decrypts a base64 token that was encrypted in AES/ECB/PKCS5Padding mode with this key.
Analyse the KeyHolder.smali and Api.smali files (LegacyCrypto.smali is a decoy class), compute the real AES key, decrypt the ciphertext and find BAYROQ{...}. (Note: the last 16 characters of the flag are lowercase hexadecimal digits).
Attached files
smali.zip
Log in to download
Theory: learn the topic
To submit a flag, log in.