Reverse Engineering

Challenge
Link

wicked-game (457 pts)

wicked-game (457 pts)

Description

This game drives me crazy. It asks for an impossible score. Can you help me out? You need to catch the Android inside.

Solution

Given APK file, open it using jadx-gui and save the decompiled code.

MainActivity create new GameView object. So take a look on GameView.

From code above we can summarize:

  • Desired score is 1400

    • if score >= 1400 there will a drawbitmap process

  • If current score < 10 it will continue

    • if current score >= 10 it will game over

  • Value added to current score is one (this.score++)

By playing the game we cannot win (trigger drawbitmap process), so my approach is patching the game by modifying the smali code. The idea is changing constant on score validation to lower value such as from 1400 to 1.

  • Line 15: change from 0x578 to 0x1

Compile the APK again and sign the new APK.

Run the APK and it will show android image after the score changed to 1.

Basically the program only run the game and check the score. Win condition is showing image above, based on the description there is something with the image (catch android inside). So lets try to do some guess on the image. Image loaded through getResources function and R.drawable.graphics constant, so the location is in wicked-game/res/drawable/graphics.jpg. Upload graphics.jpg to well known online steganography solverarrow-up-right and there will be a flag.

Flag: wehnd-wdwdaxae-cfewfwg

Last updated