Android App (100 pts)

Question:

Find the Flag!

Write-Up:

Convert Sharif_CTF.apk to Sharif_CTF.jad by dex2jar.

-> dex2jar.bat Sharif_CTF.apk
dex2jar version: translator-0.0.9.15
dex2jar Sharif_CTF.apk -> Sharif_CTF_dex2jar.jar
Done.

Decompile Sharif_CTF_dex2jar.jar by jd-gui (Java Decompiler).

more.

more.

After decompilation it is clear that the app loads a library named adnjni.so and calls two public native function named IsCorrect and processObjectArrayFromNative. Let's find adnjni.so. Extract Sharif_CTF.apk file by Winzip.

more.

Go to lib-> armeabi and get the libadnjni.so. Analyze libadnjni by IDA Pro and decompile MainActivity_IsCorrect function by Hex-Ray, as shown blow:

more.

It is clear that the user input will compare to ef57f3fe3cf603c03890ee588878c0ec.

more.

The flag is 833489ef285e6fa80690099efc5d9c9d.