| Tested on | Kali GNU/Linux Rolling 2026.2 (kali-rolling) |
|---|---|
| Package | golang-go 2:1.26~1jadx 1.5.6-0kali1dex2jar 2.1~nightly-28-0kali2APKHunt (Cyber-Buddy/APKHunt) |
| Applies to | Kali Linux |
| Lab environment | Local Android APK lab on Kali — Android pentesting lab setup |
| Privilege | Normal user for scans; sudo for apt package installs |
| Scope | Install APKHunt, verify CLI flags, single-APK and multi-APK OWASP MASVS SAST with console and TXT logging against Damn Vulnerable Bank and InsecureShop training APKs. Does not cover dynamic analysis, Frida instrumentation, or building malicious payloads. |
| Related guides | Ethical hacking tutorial Install deb packages on Kali |
APKHunt maps Android source and manifest data to OWASP MASVS static checks so you get file paths and remediation hints without opening a full MobSF session. This walkthrough installs the tool on Kali, scans Damn Vulnerable Bank (DVBA), then batches InsecureShop from a folder with logging enabled.
What is APKHunt in ethical hacking?
Android static analysis reads an APK without running it on a device. APKHunt automates that workflow for penetration testers who want MASVS-aligned leads in the terminal.
The tool chains three steps on each APK:
dex2jarconverts DEX bytecode to a JAR for pattern matchingjadxdecompiles sources into a*_SASTtree beside the APK- Go rules grep manifest, resources, and Java/Kotlin sources for MASVS categories
Each hit prints a decompiled path, a line number, a QuickNote remediation blurb, and an MSTG reference link. That is SAST coverage, not proof of exploitability — you still validate findings with manual review, MobSF dynamic analysis, or runtime tests in your Android pentesting lab.
APKHunt targets Linux hosts only (per upstream help). There is no web UI; results stay in the terminal or TXT/HTML log files when you pass -l.
Compare APKHunt and MobSF
Both tools help with Android app security reviews, but they fit different moments in a test.
| Tool | Interface | Analysis style | Best when |
|---|---|---|---|
| APKHunt | CLI | MASVS-focused SAST with grep-style rules | Fast MASVS checklist on one or many APKs from a script |
| MobSF | Web UI (+ API) | Static and dynamic modules, dashboards | Interactive review, screenshots, and runtime instrumentation |
Use APKHunt when you want lightweight batch SAST tied to MSTG IDs. Open MobSF when you need a browser workflow or dynamic testing on an emulator.
Kali lab setup
Create a predictable folder layout and download two public training APKs. DVBA exercises banking flaws; InsecureShop adds a second target for folder mode.
Set paths once for the rest of the guide:
APK_LAB="${HOME}/apk-lab"
SINGLE="${APK_LAB}/single"
MULTI="${APK_LAB}/multi"
APK="${SINGLE}/dvba.apk"
APKHUNT="${HOME}/APKHunt"mkdir -p "${SINGLE}" "${MULTI}"Download Damn Vulnerable Bank and copy the release APK into your lab tree:
git clone https://github.com/rewanthtammana/Damn-Vulnerable-Bank.git "${HOME}/Damn-Vulnerable-Bank"cp "${HOME}/Damn-Vulnerable-Bank/Builds/dvba.apk" "${APK}"Sample output:
'/home/kali/Damn-Vulnerable-Bank/Builds/dvba.apk' -> '/home/kali/apk-lab/single/dvba.apk'The copy places DVBA where single-file scans expect it. If git clone fails on your network, download the APK from the project releases page and copy it to "${APK}" manually.
Fetch InsecureShop for multi-APK mode and mirror DVBA into the shared folder. Download the release APK with curl command and -fL so HTTP errors fail the step.
curl -fL -o "${MULTI}/insecureshop.apk" "https://github.com/optiv/InsecureShop/releases/download/v1.0/insecureshop.apk"cp "${APK}" "${MULTI}/dvba.apk"Confirm both training APKs are present before installing APKHunt:
ls -lh "${APK}" "${MULTI}"Sample output:
-rw-r--r-- 1 kali kali 3.7M ... /home/kali/apk-lab/single/dvba.apk
/home/kali/apk-lab/multi:
-rw-r--r-- 1 kali kali 3.7M ... dvba.apk
-rw-r--r-- 1 kali kali 4.6M ... insecureshop.apkTwo APKs in "${MULTI}" means folder mode will run two sequential scans when you pass -m.
Install APKHunt dependencies on Kali
APKHunt shells out to jadx, dex2jar, go, and standard Unix tools. Install the Kali packages with apt command before cloning the repository.
sudo apt updatesudo apt install -y golang-go jadx dex2jar gitVerify the toolchain versions match what you expect on Kali:
go versionSample output:
go version go1.26.5 linux/amd64dpkg-query -W -f='${Package} ${Version}\n' jadx dex2jar golang-goSample output:
dex2jar 2.1~nightly-28-0kali2
golang-go 2:1.26~1
jadx 1.5.6-0kali1Those three packages are the moving parts APKHunt invokes on every scan.
Clone APKHunt from GitHub
Clone the upstream repository into "${APKHUNT}". The scanner entry point is apkhunt.go (lowercase on disk).
git clone https://github.com/Cyber-Buddy/APKHunt.git "${APKHUNT}"List the main script so you know the exact filename before running go run:
ls -lh "${APKHUNT}/apkhunt.go"Sample output:
-rw-r--r-- 1 kali kali 209K ... /home/kali/APKHunt/apkhunt.goNo separate go build step is required — go run apkhunt.go compiles and executes the scanner in one step.
Verify APKHunt CLI help
Print the banner and flag summary with -h before you point the tool at a multi-minute decompile job.
cd "${APKHUNT}" && go run apkhunt.go -hSample output:
APKHunt Usage:
go run APKHunt.go [options] {.apk file}
Options:
-h For help
-p Provide a single apk file-path
-m Provide the folder-path for multiple apk scanning
-l For logging (.txt file)
Examples:
APKHunt.go -p /Downloads/android_app.apk
APKHunt.go -p /Downloads/android_app.apk -l
APKHunt.go -m /Downloads/android_apps/
APKHunt.go -m /Downloads/android_apps/ -l
Note:
- Tested on linux only!
- Keep tools such as jadx, dex2jar, go, grep, etc.! installedThe help text still shows APKHunt.go in examples, but Kali uses apkhunt.go. Flags -p, -m, and -l are the ones this lab exercises next.
APKHunt flags reference
| Flag | Purpose |
|---|---|
-h |
Print usage and exit |
-p |
Path to one APK file |
-m |
Directory containing multiple APK files |
-l |
Write a timestamped TXT log (and HTML wrapper) beside the APK |
Scan one APK with APKHunt
Single-APK mode decompiles "${APK}", hashes the file, then walks MASVS-themed sections such as manifest components, storage APIs, and resilience checks. Expect several minutes of jadx progress output before findings appear.
cd "${APKHUNT}" && go run apkhunt.go -p "${APK}"Early console lines confirm dex2jar and jadx started and show APK metadata:
[+] APK Base: dvba.apk
[+] APK Size: 3.609375 MB
[+] APK Directory: /home/kali/apk-lab/single/
[+] APK Static Analysis Path: /home/kali/apk-lab/single/dvba_SAST/
[+] APK Hash: MD5: 5b40b49cd80dbe20ba611d32045b57c6
[+] APK Hash: SHA256: 76c308fac6a655a3534771777780e004feb1d91be032857768c891b2baf40ba6
[+] d2j-dex2jar has started converting APK to Java JAR file
dex2jar /home/kali/apk-lab/single/dvba.apk -> /home/kali/apk-lab/single/dvba.jar
[+] Jadx has started decompiling the application
ERROR - finished with errors, count: 13jadx may report decompile errors on messy training APKs. APKHunt continues when partial sources are available — treat the error count as a signal to review coverage, not always as a failed scan.
When rules match, sections print file paths with line numbers under headings such as ==>> The Shared Preferences related instances...:
==>> The Shared Preferences related instances...
/home/kali/apk-lab/single/dvba_SAST/sources/com/app/damnvulnerablebank/AddBeneficiary.java
77: String string = getSharedPreferences("jwt", 0).getString("accesstoken", null);
79: String strM1972c = C0580a.m1972c(getSharedPreferences("apiurl", 0).getString("apiurl", null), "/api/beneficiary/add");
[!] QuickNote:
- It is recommended to use shared preferences appropriately, if observed. Please note that, Misuse of the SharedPreferences API can often lead to the exposure of sensitive data...
[*] Reference:
- OWASP MASVS: MSTG-STORAGE-2 | CWE-922: Insecure Storage of Sensitive InformationEach block ties a code location to an MSTG item and CWE ID — copy those lines into your report and verify whether tokens or URLs are actually sensitive in context.
The scan footer prints total runtime when all MASVS sections finish:
[+] Scan has been finished at: 2026-08-02 11:46:40 ...
[+] Total time taken for hunting: 6m38.294423823sDecompiled trees remain under "${SINGLE}/dvba_SAST" for manual grep or import into another tool.
Save APKHunt results to a TXT log
Add -l when you want a timestamped report file for diffing scans or attaching to a client deliverable.
cd "${APKHUNT}" && go run apkhunt.go -p "${APK}" -lThe log header records TXT and HTML paths next to the APK directory:
[+] Log-file path: /home/kali/apk-lab/single/APKHunt_dvba_2026-8-2_11-40-2.txt
[+] HTML-file path: /home/kali/apk-lab/single/APKHunt_dvba_2026-8-2_11-40-2.htmlList generated reports after the scan completes:
ls -1 "${SINGLE}"/APKHunt_*.txtSample output:
/home/kali/apk-lab/single/APKHunt_dvba_2026-8-2_11-40-2.txtThe TXT file repeats console findings in order — manifest summary first, then storage, network, crypto, and resilience checks. Open the matching .html file in a browser when you want the same content with a simple HTML wrapper.
A Firebase URL hit in the DVBA log illustrates how resource files surface:
==>> The Firebase Database instances...
/home/kali/apk-lab/single/dvba_SAST/resources/res/values/strings.xml
71: <string name="firebase_database_url">https://damn-vulnerable-bank.firebaseio.com</string>
[!] QuickNote:
- It is recommended that Firebase Realtime database instances should not be misconfigured, if observed...
[*] Reference:
- OWASP MASVS: MSTG-STORAGE-2 | CWE-200: Exposure of Sensitive Information to an Unauthorized ActorFollow QuickNote guidance with manual verification — a string resource alone does not prove an open Firebase ruleset.
Scan multiple APKs in one folder
Folder mode scans every .apk in the directory sequentially. Point -m at "${MULTI}" where DVBA and InsecureShop already sit.
cd "${APKHUNT}" && go run apkhunt.go -m "${MULTI}" -lEach APK produces its own timestamped TXT and HTML pair. After both scans finish, list the reports:
ls -1 "${MULTI}"/APKHunt_*.txtSample output:
/home/kali/apk-lab/multi/APKHunt_dvba_2026-8-2_11-47-25.txt
/home/kali/apk-lab/multi/APKHunt_insecureshop_2026-8-2_11-53-46.txtThe DVBA report header shows which base APK that file belongs to:
[+] APK Base: dvba.apk
[+] Total time taken for hunting: 6m21.802803825sInsecureShop ran as the second file in the folder and took about eleven minutes in this lab. Budget sequential runtime when you batch many APKs — there is no parallel worker flag in the CLI.
Separate logs keep findings isolated per app, which is easier to hand to developers than one merged file.
APKHunt troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
jadx: command not found or dex2jar: command not found |
Missing Kali packages | sudo apt install -y jadx dex2jar and rerun dpkg-query |
go: command not found |
Go not installed | sudo apt install -y golang-go |
jadx prints finished with errors but scan continues |
Partial decompile on obfuscated or large APKs | Review *_SAST output; rerun after rm -rf on the old *_SAST tree if sources look stale |
No APK processed in -m mode |
Folder has no .apk files or wrong path |
ls "${MULTI}"/*.apk and fix "${MULTI}" |
| Scan hangs with no new lines | Heavy decompile on a big APK | Wait for jadx progress; ensure adequate disk space under "${APK_LAB}" |
go run fails on clone |
Wrong directory or filename | cd "${APKHUNT}" and use apkhunt.go, not APKHunt.go |
References
- APKHunt GitHub repository
- OWASP MASVS
- OWASP MASVS GitBook (v1.5.0 requirements)
- Damn Vulnerable Bank
- InsecureShop (Optiv)
- jadx decompiler
- dex2jar
Summary
APKHunt gives you a terminal-first path through OWASP MASVS static checks on Kali. You installed golang-go, jadx, and dex2jar, cloned Cyber-Buddy/APKHunt, and confirmed -p, -m, and -l with go run apkhunt.go -h. Single-APK scans decompile DVBA into a dvba_SAST tree, print MSTG-tagged hits with file paths, and finish with a runtime total on the order of several minutes per app.
Logging with -l drops timestamped TXT and HTML reports beside each APK — useful for reports and regression diffs. Folder mode processed DVBA and InsecureShop sequentially and wrote one log file per APK. jadx decompile warnings are common on training apps; APKHunt still produced full MASVS sections when partial sources were available.
Treat every QuickNote as a lead, not a confirmed vulnerability. Pair APKHunt output with manual code review, MobSF when you need dynamic analysis, and runtime tests on emulators from your Android pentesting lab. For payload or repackaging workflows, continue with payload on APK only inside authorized scopes.

