Mobile Security6 min read

AppSleuth, part 1: mobile app security triage

AppSleuth is a free command-line tool that scans IPA, APK and AAB files. How to install it, run scan and info, read the report and keep false positives down.

This is part 1 of 4 in our AppSleuth series.

You have an app file and an hour. Before you open a decompiler or set up a proxy, you want to know where to look: is cleartext traffic allowed, which components can other apps call, are there keys in the code, is the binary even readable? That first hour is triage, and it’s what AppSleuth is built for.

AppSleuth is a free, open-source command-line tool. It reads IPA, APK, APKS/XAPK and AAB files, runs on macOS, Linux and Windows, and uses only the Python standard library. This post covers installing it, the two commands you’ll use most (scan and info), how to read what they tell you, and how to keep the noise down.

Only use it on apps you own or are authorised to test.

Install

pipx install appsleuth
appsleuth --version

You need Python 3.9 or newer. At the time of writing the current version is 1.5.2. If you’d rather run it from a clone, pip install . in the source folder gives you the same appsleuth command.

Each run prints a short banner to stderr. It never mixes with piped output, and NO_BANNER=1 hides it.

Your first scan

For this series we built a small test app, com.example.shop, and planted the kind of mistakes that turn up in real builds. Version 2.3.0 is reasonably clean. Version 2.4.0 is the one a rushed release produces. Here is AppSleuth on 2.4.0:

appsleuth scan shop-2.4.0.apk -o reports/shop-2.4.0

Output from a test app we built for this post (trimmed):

com.example.shop 2.4.0  [APK]
  [HIGH] Cleartext traffic permitted for specific domain(s)
        res/network_security_config.xml
  [HIGH] Possible hardcoded secret: AWS access key pair
        shop-2.4.0.apk:dex (classes.dex) [Lcom/example/shop/debug/DebugUploader;->upload()]
  [HIGH] Possible hardcoded secret: JWT (decodes as a valid token)
        shop-2.4.0.apk:dex (classes.dex) [Lcom/example/shop/reports/ReportClient;->token()]
  [MEDIUM] android:allowBackup not disabled
        AndroidManifest.xml <application>
  [MEDIUM] Network Security Config trusts user-installed CAs
        res/network_security_config.xml
  [MEDIUM] WebView APIs with historical risk in use (heuristic)
        shop-2.4.0.apk:dex (classes.dex)
  [MEDIUM] Cleartext HTTP URL pointing at a raw public IP address (heuristic)
        shop-2.4.0.apk:dex (classes.dex)
  [MEDIUM] Cleartext (http://) URLs embedded in binary
        shop-2.4.0.apk:dex (classes.dex) [Lcom/example/shop/debug/DebugUploader;->upload()]
  [LOW] 4 exported component(s)
        AndroidManifest.xml
  [LOW] Deep link without Android App Links verification (autoVerify missing)
        AndroidManifest.xml <activity name=".promo.PromoActivity">
  [LOW] No certificate pinning configured
        res/network_security_config.xml
  ...
3 High  5 Medium  5 Low  3 Info
Reports: reports/shop-2.4.0/report.html  report.md  report.json

appsleuth shop-2.4.0.apk on its own does the same thing: scan is the default command. Point scan at a folder instead of a file and it scans every app inside (add --recursive for subfolders) and writes a batch summary.

What scan covers: hardcoded secrets, App Transport Security and the Android network security configuration, exported components, weak crypto identifiers, binary hardening, and, for Capacitor and Cordova apps, the bundled web layer.

Reading the output

Each line has three parts worth understanding.

Severity. HIGH, MEDIUM, LOW or INFO. It’s the tool’s view of how much the issue could matter, not a verdict on your app. The terminal shows LOW and above by default; --show INFO lists everything, and -v adds each finding’s explanation and evidence.

Confidence. Findings marked (heuristic) come from pattern matching, such as a string that looks like a key or a URL in the binary. Findings without the mark are confirmed facts read from structured data, such as a manifest attribute or a plist value. --min-confidence confirmed hides the heuristic ones entirely when you want only the solid facts.

Location. Where the evidence lives. For Android code, AppSleuth parses the DEX and names the method that uses the string, so [Lcom/example/shop/debug/DebugUploader;->upload()] tells you exactly which class to open in a decompiler.

Every scan also writes three reports to the -o folder: report.html to read or share, report.md for tickets, and report.json for scripts. We’ll use the JSON in part 3.

Treat every finding as a lead for manual review, not a confirmed vulnerability. An AWS key ID in the code is worth rotating whatever happens next, but a WebView API reference only tells you where to look.

The one-screen summary: info

scan lists problems. info describes the app: identity, signing, posture, permissions, components, libraries and what it’s built with.

appsleuth info shop-2.4.0.apk

Output from a test app we built for this post (trimmed):

Example Shop  (com.example.shop)
================================
  Type              APK (android)
  Version           2.4.0 (build 240)
  Min / target SDK  24 / 34

Tech stack
  Built with        Native Android
  Language          Java

Signing
  Schemes           v1

Posture
  ! allow backup
  ! cleartext allowed
  ! no cert pinning
  ! user ca trusted

Exported components (4)
  activity: .LinkActivity   (no permission)
  activity: .debug.DebugMenuActivity   (no permission)
  activity: .promo.PromoActivity   (no permission)
  receiver: .push.PushReceiver

Third-party libraries (2)
  androidx.core:core=1.12.0, androidx.appcompat:appcompat=1.6.1

Scan: 3 High  5 Medium  5 Low  3 Info

The Posture block is the quickest read in the tool. Each flag is derived from the scan findings, so scan, info and diff always agree. info also lists static indicators of root or jailbreak detection, Frida detection, pinning and obfuscation. Those are indicators only: “detected” means the code is present, not that it works. info --full goes further and lists every code location of each protection check, and info --json gives you all of it as data.

Keeping false positives low

A triage tool that cries wolf gets ignored. AppSleuth tries to stay quiet in three ways.

At detection. Placeholder and sample values are dropped. Public client identifiers, such as Google API keys and OAuth client IDs, are reported as INFO because they are designed to ship in apps. A JWT must actually decode before it’s reported. Launcher activities aren’t counted as exported, and Swift binaries aren’t flagged for missing stack canaries.

By corroboration. Some findings only matter if the platform allows them. Version 2.3.0 of our test app contains an http:// URL, but it targets Android SDK 34 with no cleartext exception, so Android would block the request. AppSleuth keeps the finding but demotes it, and says why in the report:

## Triage (what was filtered, and why)

- demoted **Cleartext (http://) URLs embedded in binary** MEDIUM → INFO: targetSdkVersion=34 blocks cleartext traffic by default and no manifest or network-security-config exception re-enables it

By your decisions. When you’ve reviewed something and accepted it, write it down in a .appsleuth-ignore file, in the folder you run from or next to the app. Each rule is title:, location:, evidence:, fingerprint: or severity:, and anything after -- is the reason:

# accepted risks for com.example.shop
title: Weak/legacy cipher identifiers -- LegacyCrypto only decrypts the old offline cache, tracked in SHOP-412
location: *Lcom/example/shop/config/Keys;* -- Maps key, restricted to our package and signing cert

Titles match as substrings (or /regex/), locations as globs. The next scan picks the file up automatically, or you can name one with --ignore-file. Ignored findings don’t vanish: they move to the triage section with your reason attached.

- ignored **Weak/legacy cipher identifiers present (DES / RC4 / ECB)** by rule `title: Weak/legacy cipher identifiers` (LegacyCrypto only decrypts the old offline cache, tracked in SHOP-412)
- ignored **Client-side identifier: Google API key** by rule `location: *Lcom/example/shop/config/Keys;*` (Maps key, restricted to our package and signing cert)

Nothing is silently lost. report.json has a triage section listing everything demoted, dropped, ignored or hidden by --min-severity and --min-confidence. If you want to see the engine’s raw output with no false-positive layer at all, use --no-triage.

The same habit of recording why something was accepted helps when you later read and act on a full test report.

The encrypted-IPA warning

Apps from the App Store are encrypted on the device with FairPlay. If you copy one off a phone without decrypting it, the main binary is unreadable. AppSleuth checks for this by measuring the encrypted range, not just the flag, and won’t let you mistake a blind scan for a clean one:

WARNING: The main binary is still FairPlay-encrypted. Its code and strings were NOT scanned, so this result is incomplete. Re-dump the app decrypted (e.g. getipa --decrypted) and scan again.

The same warning heads every report. Everything outside the binary (Info.plist, configuration files, a hybrid app’s web layer) is still analysed, so you’ll still see findings. Just don’t read a short list as good news. getIPA produces decrypted IPAs from your own jailbroken iPhone; see Extract an IPA from an iPhone in one command.

What triage won’t tell you

Static triage finds configuration mistakes and leftovers quickly. It can’t tell you whether the API behind the app checks who can see which order, and that’s often where the serious mobile findings are. Use AppSleuth to decide where to spend the rest of your time, then test the app and its backend properly. Our mobile app penetration testing guide covers what that involves.

Get it

The AppSleuth series

One practical security note a week.

No spam. Unsubscribe any time.

Need a pentest for an audit, a customer, or peace of mind?

Tell us what you need tested. You’ll get a fixed-fee proposal with tester-days and timeline stated, usually within a few days of the scoping call.