11/22/2021
11/21/2021
Solution - UnCrackable App for Android Level 2
See challenge here
Use dex2jar tool to extract source code.
$~/Downloads/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh UnCrackable-Level1.apk
Use JD-GUI to review the source code
$java -jar ~/Downloads/jd-gui-1.6.6.jar
Now we know the check is to send string into static library libfoo.so.Unzip apk to see lib/ folder
$tree lib
lib
├── arm64-v8a
│ └── libfoo.so
├── armeabi-v7a
│ └── libfoo.so
├── x86
│ └── libfoo.so
└── x86_64
├── libfoo.so
If you're a lazy person like me, I use strings first to see if anything comes up.
$strings lib/x86_64/libfoo.so
"Thanks for all t" maybe our flag to capture, but didn't pass entering to the App. Looks like the ending part is missing. So, use Ghidra or IDA free or Hopper Diassembler to see the bar function
Java_sg_vantagepoint_uncrackable2_CodeCheck_bar
some ascii code strings were found at the strncpy.
The second parameter is our flag to capture
"Thanks for all the fish"
Solution - UnCrackable App for Android Level 1
See challenge here
Use dex2jar tool to extract source code.
$~/Downloads/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh UnCrackable-Level1.apk
Use JD-GUI to review the source code
$java -jar ~/Downloads/jd-gui-1.6.6.jar
Now we know the check is to check your input String is equal to the hardcoded ciphertext (encrypted by AES).
Write a similar java program copy & paste the function to decrypt the ciphertext without input anything
$javac UnCrackableLevel1
$java UnCrackableLevel1
The secret is "I want to believe"
*** Note the source code use AES/ECB/PKCS7Padding
but actually using AES