Lego Clicker
umasscybersec
Task: an Android clicker game hides its reward flow behind Java and JNI checks, while shipping several obvious fake native flags. Solution: decompile the APK, notice Java insists on UMASS format, then recover the real body from a cross-architecture XOR-obfuscated native string and rebuild the intended flag.
$ ls tags/ techniques/
Lego Clicker — umasscybersec
Description
Hackers have taken over and corrupted your beloved Lego Clicker game, can you reclaim the top of the leaderboard? Note: There are fake flags throughout the challenge which should be obvious to tell based on contents
English summary: the challenge provides an Android APK for a fake clicker game. Reaching the top of the leaderboard triggers reward logic, but the real solution requires separating deliberate fake flags from the actual flag reconstruction path.
Challenge Summary
This was a mobile reversing challenge with a strong native component. The APK decompiles cleanly enough to expose the app structure, but the interesting flag logic sits behind JNI calls in liblegocore.so.
The key to the solve is not trusting the first flag-looking strings you see. The APK contains multiple decoys, and the Java layer gives the decisive constraint: the final accepted answer must look like UMASS{...}.
Recon and Decompilation
After unpacking the APK with apktool and jadx, the app structure immediately showed that the package name is com.example.LegoClicker and that the important native library is legocore.
Useful files and classes:
com.example.LegoClicker.RA— leaderboard activitycom.example.LegoClicker.SessionValidator— JNI entry points and library loadingcom.example.LegoClicker.FCA— native-backed dialog path with extra decoy behaviordefpackage/n0.java— result handling and final format checks
SessionValidator.java is the first important hint:
- it loads the native library with
System.loadLibrary(...) - it exposes JNI methods such as
refreshTileMap,syncBrickCache, andvalidateBrickToken - helper
a(long j, long j2)resolves and invokes a native method by reflection
RA.java shows the intended user flow. If the player reaches the top of the leaderboard, the app calls native validation and then displays a reward string. That makes the leaderboard path look like the intended flag trigger.
...
Permission denied (requires auth)
Sign in to read this free writeup
This writeup is free — just sign in with GitHub to read it.
$ssh [email protected]