You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, for analysing an APK you should **take a look to the to the Java code** using a decompiler.\
166
166
Please, [**read here to find information about different available decompilers**](apk-decompilers.md).
167
167
168
+
### APK anti-analysis via malformed containers, manifests, and asset names
169
+
170
+
Some malicious APKs are not merely obfuscated: they are **deliberately malformed** so common tooling (`unzip`, `apktool`, `jadx`, AV scanners, CI pipelines) cannot enumerate files reliably or aborts early. A useful mental model is **parser differential anti-analysis**: Android may still accept enough of the package to install or partially process it, while desktop ZIP/APK parsers disagree about what entries exist or where they start.
171
+
172
+
Common patterns:
173
+
174
+
-**Malformed ZIP/APK metadata**: inconsistent **local file headers** and **central directory** records can make tools resolve different offsets, sizes, or filenames for the same entry.
175
+
-**Corrupted binary `AndroidManifest.xml`**: if the manifest cannot be decoded, many static-analysis pipelines stop before inspecting components, permissions, exported surfaces, or embedded resources.
176
+
-**Malformed asset filenames**: suspicious names inside `assets/` can break extraction, path handling, or downstream file processing and hide secondary payloads.
177
+
178
+
Practical workflow when a sample "looks empty" or decompilers crash:
179
+
180
+
1. Compare how multiple parsers see the archive:
181
+
```bash
182
+
unzip -l app.apk
183
+
zipinfo -v app.apk
184
+
jadx app.apk -d out-jadx
185
+
apktool d app.apk -o out-apktool
186
+
```
187
+
2. If the file list differs across tools, or `jadx` / `apktool` fails on `AndroidManifest.xml`, treat the APK as intentionally malformed instead of assuming corruption in transit.
188
+
3. Rebuild a **normalized APK** that rewrites ZIP metadata, repairs the manifest, and sanitises hostile asset names before deeper reversing.
The resulting `*-fixed.apk` is intended to be **standard enough for static tooling**, especially `jadx`. This is useful when triaging Android malware or packers that hide payloads behind malformed container metadata rather than only string/code obfuscation.
199
+
200
+
> [!NOTE]
201
+
> The MalFixer README describes the ZIP repair module as `zipzixer.py`, while the repository file listing currently exposes `zipfixer.py`. If you inspect or import the project manually, verify the actual filename in the checked-out tree.
202
+
168
203
### Looking for interesting Info
169
204
170
205
Just taking a look to the **strings** of the APK you can search for **passwords**, **URLs** ([https://github.com/ndelphit/apkurlgrep](https://github.com/ndelphit/apkurlgrep)), **api** keys, **encryption**, **bluetooth uuids**, **tokens** and anything interesting... look even for code execution **backdoors** or authentication backdoors (hardcoded admin credentials to the app).
@@ -971,6 +1006,7 @@ AndroL4b is an Android security virtual machine based on ubuntu-mate includes th
971
1006
-[CoRPhone — Android in-memory JNI execution and packaging pipeline](https://github.com/0xdevil/corphone)
972
1007
-[justapk — multi-source APK downloader with Cloudflare bypass](https://github.com/TheQmaks/justapk)
973
1008
-[Jezail rooted Android pentesting toolkit (REST API + Flutter UI)](https://github.com/zahidaz/jezail)
1009
+
-[MalFixer](https://github.com/Cleafy/Malfixer)
974
1010
-[BeatBanker: A dual‑mode Android Trojan](https://securelist.com/beatbanker-miner-and-banker/119121/)
0 commit comments