Getting to the API
Testers install the app on a test device or emulator, route traffic through an intercepting proxy, and bypass certificate pinning if the app uses it, which is a routine step rather than a finding. They also extract endpoints and keys from the app package itself. The result is an inventory of API calls, often including ones the current app version no longer uses but the server still accepts.
Typical findings
- BOLA on user, order and message IDs, because the app only ever requests the user's own.
- Client-side enforcement: prices, limits, feature flags or roles checked in the app but not on the server.
- Mass assignment in profile and registration endpoints.
- Weak token handling: long-lived tokens, JWTs with weak keys, no revocation on logout.
- Hard-coded API keys in the app for third-party services, giving access beyond what the app needs.
- Old API versions kept alive for users who have not updated.
Evidence
Evidence is the same as for any API: the raw request and response, made outside the app with another user's identifier or a modified body, alongside a control. Showing that the request did not come from the app is useful, because it rules out any argument that the client prevents the attack.
Remediation
Move every security decision to the server. Enforce ownership checks per object, validate business values server-side, use short-lived tokens with server-side revocation, and keep third-party secrets on the server behind your own API. Retire old API versions on a schedule.
How Pentest-Swarm tests mobile backends
Pentest-Swarm tests the REST and GraphQL APIs behind a mobile app in the same way as any other API. Point it at the backend, ideally with a specification or captured endpoints and test accounts.
- Differential proof of BOLA/IDOR across user accounts.
- Mass-assignment proof on registration and profile endpoints.
- JWT and broken-authentication testing with jwt_tool.
- Secrets checks with gitleaks and trufflehog on repositories you provide.
Where it falls short
Pentest-Swarm does not test the mobile app itself: it does not decompile binaries, analyse local storage, bypass pinning or check platform-specific issues. Use MobSF and the OWASP Mobile Application Security Testing Guide (MASTG) for the client side, and a mobile specialist for high-risk apps such as banking. Pentest-Swarm covers the API half of the job.
Questions
Is certificate pinning a security control against API attacks?
It raises the effort slightly but does not protect the API. Pinning can be bypassed on a device the attacker controls, so the server must enforce all rules.
What is the difference between mobile app and mobile API pentesting?
A mobile app test covers the binary, local storage and platform behaviour. A backend API test covers the servers the app calls, where most data-exposure flaws are.
Which standard covers mobile app security?
The OWASP Mobile Application Security Verification Standard (MASVS), with the MASTG as its testing guide.