Skip to content
TECHNIQUE 07/13OP TEARDOWN

Mobile recon

4 min readRecon Atlas

A mobile app is a client for the same backend your web recon maps. It talks to endpoints the website never uses, and it ships secrets inside the package. Tearing an APK apart is pure static analysis. No packets go to the target, so it is safe to do any time the app is in scope.

jadx decompiles Dalvik bytecode to Java, and apktool unpacks the manifest and resources. That is the whole recon pass for most targets. An App Store IPA is native ARM64, and the store build is often FairPlay encrypted. Reading it means a jailbroken device and a disassembler. Spend that time only when there is no Android app.

Signalprogram policy, app stores
NoisePassive
Severityenabler
ConfirmYou have the current release APK for an in-scope app.
  • The program’s own assets page sometimes links the app or provides a test build.
  • Google Play for the public release. Pull it with an APK downloader, or from a device you own via adb.
  • Keep the version. Old APKs on mirror sites may hold endpoints the current one removed, which is useful, but test against what is live.
Terminal window
# Pull an installed app's APK from a device you own
adb shell pm path com.example.app
adb pull /data/app/com.example.app-1/base.apk example.apk
Signalexample.apk
NoisePassive
Severityvaries by what leaks
ConfirmExtracted endpoints or keys are shown to be live against the in-scope backend.
Tool Noise What it gives you Status
jadx Passive Decompiles to readable Java, best for reading logic Maintained
apktool Passive Decodes resources and smali, best for strings and manifest Maintained
MobSF Passive Automated static analysis report: perms, secrets, URLs, insecure settings Maintained
apkleaks Passive Regex sweep for URLs, endpoints and keys Maintained, check the README
  1. Decompile with jadx to read the code, and decode with apktool to get resources and the manifest.

    Terminal window
    # Decompile to Java source
    jadx -d example-src example.apk
    Terminal window
    # Decode resources, manifest and smali
    apktool d example.apk -o example-apktool
  2. Sweep for endpoints and secrets with apkleaks, then confirm by hand.

    Terminal window
    # Regex sweep for URLs, endpoints and keys
    apkleaks -f example.apk -o mobile/apkleaks.txt
  3. Grep the decompiled tree for what the automated pass misses.

    Terminal window
    # Hostnames, API paths and key-shaped strings in the source
    grep -REoh 'https://[a-z0-9.-]+\.example\.(com|io)[a-z0-9/_-]*' example-src | sort -u > mobile/endpoints.txt
    grep -REn 'api[_-]?key|secret|AKIA[0-9A-Z]{16}|AIza[0-9A-Za-z_-]{35}|Bearer ' example-src | head -40
  4. Run MobSF for a full report, including the manifest findings (exported components, android:debuggable, cleartext traffic, backup allowed).

    Terminal window
    # MobSF via Docker; upload the APK in the web UI it serves
    docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest

Add new hostnames you find back into subs/all.txt and run them through recon resolution and probing. Mobile backends often live on subdomains the web recon never touched.

@GET("api/v1/mobile/account/export") Call<ExportResponse> exportAccount(@Header("X-App-Token") String token);
<string name="google_maps_key">AIzaSyExampleMapsKeyString123456</string>
<activity android:name="com.example.app.DeepLinkActivity" android:exported="true">

That Retrofit line is in the client. The app knows how to GET /api/v1/mobile/account/export and send X-App-Token. It does not show that production mounts the route, or that the route answers with no session. Call it with your own account before you write anything.

Terminal window
# Your account, the host you already checked against scope
curl -s -i "https://api.example.com/api/v1/mobile/account/export" \
-H "X-App-Token: TEST_APP_TOKEN" \
-H "Authorization: Bearer YOUR_OWN_TOKEN"

A 200 that contains your export means the route is live for a real session. Try one other id you own. Another user’s export is the bug. A 404 means the old client still mentions a route the server dropped.

res/values/strings.xml holds AIzaSyExampleMapsKeyString123456. The shape matches a Google API key. A Maps key in a mobile client is supposed to be there. Call it and see what it is allowed to do. If it only works as an Android Maps SDK key locked to this app’s signature, drop it.

DeepLinkActivity is exported, so another app on the same phone can start it with an intent. A person on the internet cannot. Open DeepLinkActivity in the jadx tree. The bug is getIntent().getData() handed to a WebView, a query, or a privileged action. The exported="true" line by itself is not that bug.

Certificate pinning is a retest problem, not a recon one

Section titled “Certificate pinning is a retest problem, not a recon one”

For the recon round you do not need the app running. Static analysis gives you the endpoints and keys. You only need to intercept live app traffic when you want to watch the app use an endpoint, and then pinning may block your proxy. That is when Frida helps.

Signalrunning app on a device you own
NoiseLight active
Severitymethod, not a finding
ConfirmYour proxy sees the app's TLS traffic after the pinning bypass loads.
Terminal window
# Load a pinning-bypass script into the running app (device or emulator you own)
frida -U -f com.example.app -l frida-pinning-bypass.js

Use a bypass script against an app on your own device or emulator, never a user’s. For most findings you will not reach this step. The endpoint list from the teardown is enough to test the backend directly in your web proxy.

Signalmobile/endpoints.txt
NoiseLight active
Severitymedium to critical
ConfirmA mobile-only endpoint, called from your proxy with your own account, returns or changes data the web app would not allow.

The best mobile findings need no phone at all. The app calls endpoints the website does not, and those endpoints often skip protections the web front end adds. Take an endpoint from mobile/endpoints.txt, authenticate with your own account’s token, and call it from Burp or curl.

Terminal window
# Call a mobile-only endpoint with your own account token from your proxy
curl -s https://api.example.com/mobile/v2/profile -H 'Authorization: Bearer YOUR_OWN_TOKEN' | jq .

Now run the access-control and injection tests from parts 2 and 3 against these endpoints. A mobile API that returns another user’s data to your account is the same IDOR as on the web, and it is frequently less guarded. The Bug Hunting for Beginners chapter on mobile bug hunting covers emulator setup, traffic interception and deeper app testing.

Next, prove what a leaked secret can do, safely, in credential testing.

Connections3 backlinks · 2 outgoing · 1 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.