Post

baby-android-2 - ByuCTF Writeup

Walkthrough for the baby-android-2 Android reverse engineering challenge from ByuCTF.

baby-android-2 - ByuCTF Writeup

Challenge Info

FieldDetails
CTFByuCTF
Challengebaby-android-2
CategoryAndroid / Reverse Engineering

Description

If you’ve never reverse engineered an Android application, now is the time!! Get to it, already!! Learn more about how they work!!

Solution

We can start by installing and opening the app in our emulator

alt text

The app has a textview and button for a flag sanity check, we can enter the flag and check if its correct We can open the APK in Jadx,

alt text

alt text

We see that the MainActivity calls a method check() from FlagChecker and the class FlagChecker loads a native library and has a native method check We can proceed to inspect the native library in Ghidra

alt text

Our input is being checked against an encrypted string bycnu)_aacGly~}tt+?=<_ML?f^i_vETkG+b{nDJrVp6=)=, the encryption is very basic and we can use python to reverse it.

1
print(''.join('bycnu)_aacGly~}tt+?=<_ML?f^i_vETkG+b{nDJrVp6=)='[(i*i)%47] for i in range(23)))

We can run this script to get the flag, \

alt text \

Flag

1
FLAG:byuctf{c++_in_an_apk??}
This post is licensed under CC BY 4.0 by the author.