Browse by type

Apkhunt is a local Android APK static-analysis workbench. It extracts manifest and code signals, maps static checks to OWASP MASVS groups, captures a CycloneDX SBOM, and enriches versioned package identities through OSV when that service is available. It does not verify MASVS compliance.
Static matches are investigation targets, not proof of runtime reachability or exploitation.
Latest release: See the new web workbench and Go CLI migration notes.
Scan intake — choose an APK and start a background scan.

Saved report — review findings, severity, coverage, and dependencies in one place.

Scanned files, rule events, and unknown work.

Components, handlers, and nearby calls.

Trust boundaries and review questions.

ADB readiness and component-specific tests.

Saved routes and scoped request controls.

TruffleHog candidates and verification state.

The screenshots use a local InsecureBankv2 sample scan. Secret values remain collapsed, no API host is enabled for live tests, and static signals are not validated vulnerabilities.
Requirements:
From this directory, start Apkhunt with:
export SECRET_KEY="$(openssl rand -hex 32)"
docker compose up --build
Open http://localhost:5005.
The Compose stack stores uploads, decompiled output, reports, scan history, and worker status in named Docker volumes. Stop it with docker compose down. Add --volumes only when you intentionally want to remove all saved scan data. An app restart interrupts a running worker; the restored status marks that scan as interrupted instead of claiming it is still running.
--show-bad-code; that flag is optional for the initial APK passes because it significantly slowed the reference APK without resolving its method errors. Apktool supplies fallback manifest and resources when JADX returns errors. The dock shows completed processing stages and elapsed time. When JADX emits work-unit progress, that percentage applies only to the current JADX attempt, not to the whole scan.The current rule set has 39 checks (38 active signals and one inventory-only rule) across storage, crypto, authentication, network, platform, code, and resilience-oriented Android surfaces. It includes review signals for manifest-linked cleartext and CA policy, expired certificate pins, unsafe WebView settings, FileProvider root paths, nested Intent forwarding, mutable PendingIntents, weak randomness, hardcoded keys, and AES-ECB use.
Every nontrivial static rule carries context checks and escalation conditions. Follow those before presenting a static signal as a vulnerability.
Android security coverage review and proposed feature sections records the current gaps, evidence limits, and build priorities. There are no active JavaScript or privacy rules in the rule engine. TruffleHog runs separately and reports candidates in the Secret review page.
MASVS control coverage audit maps all 24 current controls to implemented signals, inventory, and missing checks. The app exposes the same capability states at /masvs-coverage. No control is verified end to end by the current scanner.
Apkhunt is static-first. The optional proof workbench records device state and user observations but does not independently establish runtime reachability, network transmission, an authorization failure, or exploitability. A validated conclusion still needs the exact APK, an independently observed consumer effect, and a causal negative control.
OSV enrichment is limited to saved, versioned package identities. A component without a versioned PURL is shown as not queryable; an unavailable OSV query is shown as not queried.
The API evidence page does not contact hosts during a scan or page view. Its opt-in route probe makes one scoped request; it does not establish intended access policy or object ownership. A URL in decompiled code may be unused or intentionally public. TruffleHog scans recovered code/resources plus bounded raw APK members and extracted binary strings; members over 64 MB or a 512 MB total unpack budget are recorded as skipped. Its verified state means the provider confirmed the credential at check time; it does not establish permissions or application impact. An unverified match can be a false positive. Full candidate values are stored in the local saved snapshot so they can be revealed in the UI; protect that state directory as sensitive data. Runtime observations and API response evidence are also stored under APKHUNT_STATE_DIR and are deleted with their scan.
docker compose up --build
docker compose logs --follow apkhunt
docker compose down
python3 -m pytest -q
The container runs as a non-root user and ships Syft 1.52.0, JADX 1.5.1, Apktool 2.10.0, TruffleHog 3.95.9, curl, and ADB. No separate host installation of those scan tools is needed. Compose binds the web UI to local loopback. Gunicorn uses one process with four request threads because the background queue and status are process-local.
Runtime tests require a connected, authorized Android device and an ADB server reachable from the container. Installing ADB in the image alone does not expose a macOS USB device to Docker Desktop. The static APK scan, dependency inventory, secret review, and saved report do not require a device.
Environment variables:
SECRET_KEY — required by Docker Compose; use a unique random value.MAX_CONTENT_LENGTH — upload limit in bytes; defaults to 209715200 (200 MB).MAX_APK_ARCHIVE_MEMBERS — ZIP member cap; defaults to 100000.MAX_APK_UNCOMPRESSED_SIZE — extracted-size cap; defaults to 2147483648 (2 GB).MAX_APK_COMPRESSION_RATIO — single-member compression-ratio cap; defaults to 100.JADX_THREADS — JADX parallelism; Docker Compose uses 4.DECOMPILER_TIMEOUT — Apktool time limit in seconds; defaults to 1200 (20 minutes).JADX_AUTO_TIMEOUT, JADX_SIMPLE_TIMEOUT — per-mode JADX limits in seconds; both default to 600.JADX_STALL_TIMEOUT — seconds without an advance in JADX's reported work units before switching modes; defaults to 180.JADX_SIMPLE_RETRY — retry simplified source recovery after auto mode returns errors; defaults to true. Simplified output is labeled partial coverage in the saved report.JADX_SHOW_BAD_CODE — use MobSF's --show-bad-code flag on APK-level JADX attempts; defaults to false after a measured 299-second versus 102-second reference scan with the same 23 code errors and 9,500 rule-scanned Java/Kotlin files.JADX_PER_DEX_RETRY — if APK-level JADX leaves no source, retry up to 32 valid DEX members in isolated output directories; defaults to true. These retries never replace usable whole-APK source because path-count differences do not prove additional class coverage.JADX_DEX_TIMEOUT, JADX_PER_DEX_BUDGET — per-DEX process limit (120 seconds) and total retry budget (600 seconds). Skipped members and recovered source counts are saved in the report.TRUFFLEHOG_TIMEOUT — seconds allowed for secret detection and optional provider verification; defaults to 240.This version replaces the original Go CLI with the local web workbench. The original CLI remains available in repository history. Apkhunt was originally developed by Sumit Kalaria and Mrunal Chawda.
The project is distributed under GPL-3.0. The bundled Cytoscape.js graph library retains its MIT license.
$ claude mcp add APKHunt \
-- python -m otcore.mcp_server <graph>