Authenticating mobile data with message authentication codes
A message authentication code binds a message to a secret held by trusted participants. Understanding mobile data with message authentication codes helps establish which security property the feature needs and where that property is actually enforced.
What does this involve?
Authentication establishes who is making a request and the strength and freshness of that evidence. Enrolment, recovery, alternate channels and changes to authenticators are part of the same boundary. An impressive login screen provides little assurance if another path grants equivalent access with weaker checks.
Why it matters
Consider a realistic failure: a message is encrypted but its contents can be altered without detection.
Account access can lead to disclosure, unwanted changes or misuse of a trusted identity. The consequence depends on the account's permissions and the actions available after authentication, rather than the appearance of the login mechanism.
Mobile behaviour can change between a fresh installation, an authenticated session, background activity and a device migration. The assessment needs the actual release and representative supported device states.
How penetration testers check for it
Check what is authenticated, key separation and verification before sensitive processing.
- Map normal, alternate and recovery authentication journeys.
- Compare verification across supported identities and application states.
- Check expiry, reuse and the binding of challenges to their intended action.
- Follow successful authentication into the operation that trusts it.
How to fix it
Use authenticated encryption or a correctly constructed MAC through a trusted library.
- Apply consistent verification at trusted boundaries.
- Protect enrolment, replacement and recovery as carefully as login.
- Require appropriate fresh evidence for sensitive changes.
- Record important authentication events without retaining secrets.
Authentication and authorisation answer different questions. Establishing identity does not grant unrestricted permission to records or privileged functions.
Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.
Related issues
- Authentication and authorisation for mobile app components
- Bypassing local mobile authentication
- Step-up authentication for high-risk mobile actions
Read about our methodology or contact pentested.com to discuss your mobile applications.