129 (Утка)
129 (Утка)
Platform: CUSTOM | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: apk-decompilation, contrast-enhancement, image-manipulation
Summary
Walkthrough of the CUSTOM Reversing 129 (Утка). Task: Find the hidden flag in an Android APK file. Solution: Decompile the APK with jadx, locate a suspicious image in resources, and use ImageMagick to enhance low-contrast hidden text.
Description
The task provided an Android APK file (duck.apk). The goal was to find the hidden flag within the application.
Analysis
- Decompilation: Initial analysis started with decompiling the
duck.apkusingjadx. While the code didn't immediately reveal the flag, a review of the application's resources was performed. - Resource Exploration: In the
res/drawable/directory, a file namedduck_flag.pngwas discovered. - Image Inspection: At first glance, the image appeared to be mostly white or empty. However, using
exiftooland basic image viewers suggested the presence of data. Detailed pixel analysis revealed a very narrow (11px high) horizontal strip that contained subtle variations in color.
Solution
Step 1: Resource Extraction
Decompile the APK to access the image files:
bash read-only • copy allowedjadx -d duck_out duck.apk cd duck_out/resources/res/drawable/
Step 2: Image Processing
The flag was hidden in a specific region: 157x11 at offset +122+101. To make it readable, we use ImageMagick (magick) to crop, scale, and enhance the contrast.
bash read-only • copy allowed# Crop the suspicious area, scale it up for readability, and apply thresholding magick duck_flag.png -crop 157x11+122+101 -scale 1000% -negate -threshold 10% flag_readable.png
Step 3: Reading the Flag
The resulting image flag_readable.png clearly showed the text: DUCKERZ{REDACTED}. The flag uses leetspeak substitutions like ! for l and @ for a.
Key Takeaways / Lessons
- Mastering apk-decompilation, contrast-enhancement, image-manipulation was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2026-01-09 • CUSTOM • 129 (Утка) • Difficulty: Easy