Mobile applications feel harder to attack than websites because the code is compiled and the traffic is not visible in a browser. Neither obstacle survives contact with standard tooling, and what lies behind them is often weaker than an equivalent web application.
The backend is the real target
The single most common serious finding in a mobile assessment is an API that trusts the client.
Because the team controls the app, it is tempting to assume only the app will ever call the API. So checks live in the app: the app hides the admin button, the app validates the amount, the app only requests its own records. Remove the app from the equation and all of it disappears.
A tester intercepts the traffic, replays requests with modified parameters, and finds the same authorisation gaps that would be unacceptable in a web application. Identifiers can be changed to read other users' data. Prices and quantities are accepted as sent. Endpoints that the app never calls are still live.
Anything the app enforces must be enforced again server-side. There is no exception to this.
What is in the app itself
Hardcoded secrets. API keys, third-party credentials and signing keys extracted from the package. Anything shipped to a device is public — the only question is how long it takes to find. Decompiling an Android package and searching strings is minutes of work.
Insecure local storage. Tokens, personal data and credentials in shared preferences, plain SQLite or world-readable files. Use the platform keystore or keychain, and accept that a rooted or jailbroken device changes the threat model entirely.
Excessive logging. Debug logging left enabled, writing tokens and request bodies to the system log where other applications may read them depending on platform and version.
Weak transport security. Accepting invalid certificates, permitting cleartext traffic, or disabling validation in debug builds that then ship.
Exported components. On Android, activities, services and content providers exported without permission checks, callable by any other installed application.
Certificate pinning: useful, not a wall
Pinning stops casual interception and raises the cost of analysis. It does not stop a determined tester, who will patch the check out of the application or hook it at runtime.
Deploy it, because it meaningfully reduces opportunistic attacks. Do not treat it as a reason to relax anything server-side, and expect a testing engagement to bypass it — scope that explicitly so days are not spent on it unnecessarily.
Root and jailbreak detection
Same reasoning. It is a speed bump that can be defeated by patching or hooking. It is worth including for fraud resistance and it is not a security boundary.
If your security model depends on the device being unmodified, the model has a hole in it.
A realistic scope
A worthwhile mobile assessment covers three layers:
- Static — decompile and review the package for secrets, insecure configuration and exported components.
- Dynamic — run the application with traffic interception, examine local storage after use, observe logging, and hook sensitive functions at runtime.
- API — test the backend independently of the app, which is where the serious findings usually are.
If a quotation covers only the first two, you are buying a review of the client and leaving the backend untested. Say explicitly that the API is in scope.
Before you commission a test
Provide a build that can be installed without the store, test accounts at every role level, and at least two accounts of the same role so cross-account access can be tested. Confirm whether the backend is shared with the web application, because if it is, one test can cover both.
0 comments
Leave a comment