Skip to content

04 Mobile Security

Welcome to:

Module 04 — Mobile Security

In the previous module, you learned how modern applications expose functionality through:

APIs
Objects
Tokens
Roles
Business Logic

Now you will extend that knowledge into:

Mobile Applications

Mobile applications introduce a different attack surface because security logic may exist across:

Mobile Client
Device Storage
Application Package
Operating System
Network Traffic
Backend APIs
Cloud Services

A mobile application is rarely just:

An App
on a Phone

It is more accurately:

Mobile Client
Authentication
API
Backend Services
Cloud Infrastructure

For a Bug Bounty Hunter, this creates an important principle:

Do Not Test
Only the App
Understand the
Entire Mobile
Application Ecosystem

By the end of this module, you will understand how to:

  • explain modern mobile application architecture.

  • understand Android and iOS application models.

  • identify mobile application attack surfaces.

  • understand mobile application packages.

  • inspect application configuration.

  • understand local storage risks.

  • analyze sensitive data stored on devices.

  • understand mobile authentication flows.

  • analyze session and token storage.

  • understand mobile API communication.

  • inspect network traffic.

  • understand certificate validation concepts.

  • identify insecure WebView usage.

  • analyze deep links.

  • understand custom URL schemes.

  • identify exported Android components.

  • understand Android permissions.

  • understand activities, services, receivers and providers.

  • understand iOS application configuration.

  • analyze application logs.

  • understand clipboard-related risks.

  • analyze screenshots and cached data.

  • understand biometric authentication concepts.

  • identify insecure client-side trust.

  • test mobile authorization through APIs.

  • identify mobile-specific business logic issues.

  • assess application updates and versioning.

  • understand hardcoded secrets.

  • analyze mobile application assets.

  • understand third-party SDK risks.

  • identify privacy-related mobile security concerns.

  • gather mobile evidence.

  • create a mobile security testing methodology.

  • write professional mobile vulnerability reports.

1 — What Is Mobile Application Security?

Section titled “1 — What Is Mobile Application Security?”

Mobile application security examines the security of:

Mobile Application
Device Interaction
Local Storage
Authentication
Network Communication
Backend APIs

A vulnerability may exist:

Inside the App

or:

Behind the App

on the API or backend.

A simplified mobile architecture:

Mobile App
HTTPS
API Gateway
Backend Service
Database

Additional components may include:

Identity Provider
Push Notifications
Analytics
Cloud Storage
Third-Party SDKs

One of the most important principles is:

Mobile Client
Trusted Environment

Users control:

The Device
Application Files
Network Environment
Application State

Therefore critical security controls should not depend only on the mobile application.

The two dominant mobile platforms are:

Android
iOS

Their security architecture differs.

However, both applications commonly expose similar security areas:

Local Data
Authentication
Network
APIs
Deep Links
Application Configuration

Build your mobile attack surface around:

Application Package
Configuration
Local Storage
Logs
Clipboard
Deep Links
WebViews
Network Traffic
Authentication
Tokens
APIs
Third-Party SDKs

Android applications are commonly distributed as:

APK

or application bundles.

iOS applications use:

IPA

packages.

These packages can reveal:

Application Code
Resources
Configuration
Endpoints
Libraries
Permissions

Static analysis means examining the application without executing it.

Potential areas:

Manifest
Configuration
Strings
Resources
Libraries
Certificates
Code

Dynamic analysis examines application behavior while it is running.

You may observe:

Network Requests
Files
Logs
Authentication
Storage
Application State

Android applications contain configuration in:

AndroidManifest.xml

This may reveal:

Permissions
Activities
Services
Broadcast Receivers
Content Providers
Deep Links

Applications may request access to:

Camera
Microphone
Location
Contacts
Storage
Bluetooth

Ask:

Does the App
Need This Permission?

Excessive permissions can increase risk.

Android components may be:

Exported

meaning other applications may potentially interact with them.

Important components include:

Activities
Services
Broadcast Receivers
Content Providers

Ask:

Can Another
Application Launch
This Activity?

Then:

Does the Activity
Perform Sensitive
Actions?

A service may perform background operations.

Security questions include:

Can It Be
Invoked Externally?
Does It
Require Permission?
Does It Perform
Sensitive Functions?

Broadcast receivers process system or application messages.

Ask:

Can Untrusted Apps
Send Messages
to This Receiver?

Content providers expose structured application data.

Questions include:

Is Provider Exported?
Does It Require
Permission?
Can Another App
Read or Modify Data?

iOS applications may contain configuration such as:

Info.plist

which can reveal:

URL Schemes
Permissions
Application Settings
Transport Security
Configuration

Configuration files can expose:

API Hosts
Environment Names
Feature Flags
Analytics IDs
Third-Party Services

The presence of values does not automatically make them sensitive.

Assess their security role.

Applications sometimes contain:

API Keys
Tokens
Passwords
Private Credentials

inside application code or configuration.

The key question is:

Does This Secret
Grant Unauthorized
Access?

Some keys are intended to be:

Public Client
Identifiers

Others may grant privileged access.

Do not classify every embedded key as a vulnerability.

Validate:

Purpose
Permissions
Scope
Impact

Application strings may reveal:

API Endpoints
Development Hosts
Error Messages
Feature Names
Cloud Services

This is useful for reconnaissance.

Mobile applications frequently store data locally.

Potential locations include:

Files
Preferences
Databases
Caches
Keychain / Keystore

Examples include:

Access Tokens
Refresh Tokens
User Information
Session Data
Payment Information
Application Secrets

Ask:

Should This Data
Be Stored Here?
Is It
Protected?

Applications may store preferences using:

SharedPreferences

These can contain:

Settings
Tokens
Application State

Sensitive values should receive appropriate protection.

Mobile apps may use local databases.

Inspect for:

Personal Data
Tokens
Messages
Application Records

The security impact depends on:

Data Sensitivity
Device Threat Model
Protection

Applications may cache:

Images
Documents
API Responses
User Information

Sensitive content should not remain unnecessarily exposed.

The iOS Keychain provides storage designed for sensitive values.

Applications may use it for:

Tokens
Credentials
Cryptographic Material

But implementation choices still matter.

Android provides:

Android Keystore

for securely managing cryptographic keys.

Do not assume a key is protected merely because the application mentions the Keystore.

Validate architecture and usage.

Mobile authentication may involve:

Password
MFA
OAuth
SSO
Biometrics
Magic Links

Often the mobile client ultimately receives:

Access Token

Conceptually:

Credentials
Identity Provider
Token
Mobile Application
API

Ask:

Where Is
the Access Token
Stored?
Where Is
the Refresh Token
Stored?

Token storage is important because:

Token Theft
May Equal
Session Theft

Review:

Creation
Expiration
Refresh
Logout
Password Change
Revocation

After logout:

Does the
Old Token
Still Work?

A client removing a token from its screen does not necessarily mean:

Server
Invalidated It

Ask:

Does Password
Change Revoke
Mobile Sessions?

Biometric controls such as:

Fingerprint
Face Recognition

may protect access to application functionality.

The key question is:

What Does
Biometric Success
Actually Unlock?

If the application simply performs:

Biometric Success
Set Local Flag
Show Protected Screen

without backend validation for sensitive operations, security may rely too heavily on client state.

Mobile apps communicate with APIs through:

HTTP / HTTPS

Inspect traffic to understand:

Hosts
Endpoints
Headers
Tokens
Parameters
Responses

Mobile applications should generally use:

HTTPS

to protect data in transit.

Look for:

Cleartext Traffic
Weak Transport Settings
Sensitive Data
in URLs

Example:

/reset?token=secret-token

URLs may appear in:

Logs
History
Analytics
Proxies

Sensitive values should be carefully handled.

Mobile applications should validate server certificates appropriately.

Conceptually:

Application
TLS Certificate
Trusted?
Connection

Weak validation can increase interception risk.

Some applications implement:

Certificate
Pinning

to restrict which certificates the app trusts.

Its existence does not mean the entire application is secure.

Android applications can define transport behavior through:

Network Security
Configuration

Review whether cleartext traffic is allowed where it should not be.

A WebView allows an application to display web content inside the mobile app.

Potential security areas include:

JavaScript
URL Handling
Navigation
File Access
Native Bridges

Ask:

What Content
Can the WebView Load?

and:

Can Untrusted
Content Interact
with Native Functions?

Some WebViews expose native application functions to JavaScript.

If untrusted content can reach those interfaces, security risk may increase.

Validate only in authorized labs.

Deep links allow URLs to open specific application functionality.

Example:

myapp://profile/1001

or:

https://app.example.com/profile/1001

Ask:

Can Anyone
Trigger the Link?
What Parameters
Can Be Controlled?
Does Authentication
Apply?
Does Authorization
Apply?

Applications may register schemes such as:

cloudnova://

Potential issues may arise if:

Multiple Apps
Can Register
Similar Schemes

or sensitive data is passed through the URL.

Modern platforms support verified links that bind web domains to applications.

These can improve security compared with unrestricted custom schemes, but implementation still requires testing.

Suppose:

myapp://invoice/5001

opens an invoice.

The critical question is:

Does the
Backend Verify
the User Can
Access Invoice 5001?

Deep-link obscurity is not authorization.

Most mobile security testing eventually returns to:

API Security

The mobile application may expose:

Additional Endpoints
Different API Versions
Mobile-Specific Functions

Create:

Mobile API
vs
Web API

Compare:

Endpoints
Methods
Tokens
Fields
Authorization
Versions

Use controlled accounts to test:

Object Access
Function Access
Role Boundaries
Property Updates

just as you would with web APIs.

Mobile apps may contain:

Legacy API Routes
Development Routes
Feature Flags
Internal Functions

Discovery does not automatically mean the route is vulnerable.

Validate authentication and authorization.

Applications may accidentally log:

Tokens
Passwords
Personal Data
API Responses
Debug Information

Development builds may include verbose logging.

Determine whether production builds expose sensitive information.

Applications may place data onto the system clipboard.

Examples:

OTP
Account Number
Recovery Code
Token

Clipboard contents may be accessible to other applications depending on platform protections.

Mobile operating systems may capture application screens for:

App Switching
Recent Apps

Sensitive screens may require additional protection in certain applications.

Sensitive inputs may interact with:

Autofill
Keyboard Suggestions
Clipboard
Accessibility

Threat relevance depends on the application.

Mobile application data may be included in:

Device Backups

Applications handling sensitive information should consider whether data should be backed up.

Review whether the application allows backup of:

Sensitive
Application Data

where inappropriate.

A rooted Android or jailbroken iOS device can weaken platform security boundaries.

But:

App Runs
on Rooted Device
Automatic Vulnerability

Impact depends on the application’s threat model.

Some applications attempt:

Root Detection
Jailbreak Detection

These controls can increase difficulty for attackers but should not replace backend security.

Never rely only on:

App Is
Unmodified

for high-value authorization.

Attackers can potentially modify their own client.

Mobile packages can often be inspected.

Therefore sensitive logic such as:

Secrets
Authorization Rules
Security Decisions

should not depend on being hidden.

Code obfuscation can make reverse engineering harder.

But:

Obfuscation
Security Control

for authorization or secret protection.

A mobile app might reveal:

api.example.com
staging-api.example.com
dev-api.example.com

Do not test non-production environments unless explicitly authorized.

Applications may include:

Production
Staging
Development

configuration.

Scope must still determine what can be tested.

Mobile apps frequently integrate SDKs for:

Analytics
Advertising
Payments
Crash Reporting
Authentication

SDKs can affect:

Privacy
Network Traffic
Data Collection
Application Security

Ask:

What Data
Is Sent
to Third Parties?

Potential information may include:

Device Identifiers
User Information
Usage Data
Location

Privacy issues and security issues can overlap.

Examples:

Sensitive Data
Sent to Analytics
Location Collected
Without Need
Personal Data
Logged

Assess according to program scope.

Applications may use push notifications for:

Messages
OTP
Approvals
Alerts

Sensitive information displayed in notifications may be visible on locked devices depending on configuration.

Some notifications allow:

Approve
Reply
Open

Review whether sensitive actions require appropriate authentication.

73 — Local Authorization vs Server Authorization

Section titled “73 — Local Authorization vs Server Authorization”

Suppose the mobile app hides a premium feature.

Ask:

Does the
API Enforce
Premium Access?

not:

Does the App
Hide the Button?

Example local state:

{
"role": "user",
"premium": false
}

Modifying local state should not grant backend privileges.

Mobile-specific workflows may include:

Device Registration
QR Login
OTP
Referral
Wallet
Payment
Location-Based Features

Test the entire workflow, not only screens.

Some applications bind accounts to:

Device IDs
Push Tokens
Installation IDs

Ask:

Can Device
Registration
Be Manipulated?
Can Old Devices
Remain Trusted?

OTP workflows may involve:

Request OTP
Receive OTP
Verify OTP
Create Session

Test:

Expiry
Reuse
Account Binding
Rate Limits

within authorized limits.

Review:

Email Recovery
SMS Recovery
Device Recovery
Backup Codes
Support Recovery

Recovery paths can sometimes be weaker than primary authentication.

Some apps allow authentication through QR codes.

Security questions may include:

Is QR Token
Single Use?
Does It Expire?
Is It Bound
to Session?
Does User
Confirm Context?

Mobile applications may remain:

Logged In

for long periods.

Test:

Session Expiry
Password Change
Account Disablement
Token Revocation

Some mobile apps support offline behavior.

Ask:

What Data
Is Cached?
Which Actions
Can Occur Offline?
How Are They
Validated Later?

Do not assume an action is secure because:

Mobile UI
Prevents It

If the server eventually accepts the request, backend logic is what matters.

Mobile applications are updated frequently.

Changes can introduce:

New APIs
New Features
New Permissions
New Deep Links

Change-based hunting can be useful.

Compare:

Old Version
New Version

for:

Endpoints
Permissions
Features
Configuration

Older application versions may use:

Legacy APIs

If those services remain active, assess whether they are within authorized scope and whether security controls differ.

Testing may use:

Emulator
Simulator
Physical Device

depending on the application and testing goals.

A professional environment may include:

Dedicated Test Device
Controlled Accounts
Intercepting Proxy
Application Analysis Tools
Research Notes

Use:

Account A
Account B

for authorization testing.

This remains one of the safest ways to demonstrate:

Cross-Account
Access

For mobile findings collect:

App Version
Device / OS
Account Role
Request
Response
Application State
Screenshots
Relevant Configuration

Another researcher should be able to understand:

Which App Version?
Which Device State?
Which Account?
Which Action?
Which API Request?
What Result?

Create:

Mobile_Security_Notebook.md

with:

# Application
# Version
# Platform
# Package
# Permissions
# Components
# Configuration
# Local Storage
# Authentication
# Tokens
# Deep Links
# WebViews
# APIs
# Network
# Business Logic
# Vulnerability Candidates
# Evidence
# Reports

Create:

Mobile_Attack_Surface.csv

with:

Component Type Exposure Security Relevance Status

Create:

Mobile_Local_Storage.csv

with:

Data Location Sensitive? Protection Assessment

For Android create:

Android_Component_Register.csv

with:

Component Type Exported Permission Purpose

Create:

Deep_Link_Register.csv

with:

Link Function Authentication Parameters Assessment

Create:

Mobile_API_Register.csv

with:

Endpoint Method Token Object Function

Create:

Mobile_Token_Lifecycle.csv

with:

Token Created Stored Expires Revoked Notes

Create:

Mobile_Vulnerability_Candidates.csv

with:

Candidate Component Evidence Impact Status

Use:

Understand App
Inspect Package
Review Configuration
Map Components
Review Storage
Analyze Authentication
Inspect Traffic
Map APIs
Test Authorization
Test Deep Links
Test Business Logic
Validate
Report

Always separate:

Mobile Client

from:

Server

Ask:

Which Security
Decision Happens
Where?

App contains:

if premium:
show_feature()

This controls:

UI

but the security question is:

Does API
Require Premium
Authorization?

Ask:

What Data
Exists on Device?
What Data
Leaves the Device?
What Data
Comes Back?
What Data
Should This User
Access?

Mobile entry points may include:

App Icon
Deep Link
Push Notification
Share Intent
Exported Activity
WebView

Common trust boundaries:

Other App
Mobile App
Browser
Deep Link
Mobile App
API
Web Content
WebView

Ask:

What Happens
After Logout?
Password Change?
MFA Reset?
Device Removal?
Account Disablement?

No matter how sophisticated the mobile application becomes:

Backend
Must Still
Authorize Requests

Practical Exercise 1 — Map a Mobile Application

Section titled “Practical Exercise 1 — Map a Mobile Application”

Using an authorized mobile training application, create:

Mobile_Attack_Surface.md

covering:

Package
Permissions
Storage
Authentication
Deep Links
WebViews
Network
APIs

Practical Exercise 2 — Application Configuration Review

Section titled “Practical Exercise 2 — Application Configuration Review”

Document:

Application ID
Version
Permissions
Deep Links
API Hosts
Third-Party SDKs

Practical Exercise 3 — Local Storage Assessment

Section titled “Practical Exercise 3 — Local Storage Assessment”

Identify application-controlled:

Preferences
Files
Databases
Caches

and classify stored information as:

Sensitive
Non-Sensitive
Needs Review

Using a training application:

Login
Capture Token
Logout
Test Expected
Revocation Behavior

Document results.

Practical Exercise 5 — Password Change Session Test

Section titled “Practical Exercise 5 — Password Change Session Test”

Using your own training account:

Login on
Device A
Change Password
Observe Device A
Session Behavior

Practical Exercise 6 — Deep Link Mapping

Section titled “Practical Exercise 6 — Deep Link Mapping”

Identify training-app deep links and document:

Function
Parameters
Authentication
Authorization

Practical Exercise 7 — Android Component Review

Section titled “Practical Exercise 7 — Android Component Review”

For an authorized Android lab, identify:

Activities
Services
Receivers
Providers

and document which are exported.

Practical Exercise 8 — Mobile API Mapping

Section titled “Practical Exercise 8 — Mobile API Mapping”

Capture at least:

15 API
Requests

from a training application.

Document:

Endpoint
Method
Authentication
Object
Response

Practical Exercise 9 — Two-Account Authorization Test

Section titled “Practical Exercise 9 — Two-Account Authorization Test”

Using your own mobile test accounts:

Account A
Creates Object
Account B
Attempts Access

Validate backend authorization.

In an authorized lab, document:

Loaded Origins
JavaScript Enabled?
Navigation Controls
Native Interfaces

Practical Exercise 11 — Hardcoded Value Assessment

Section titled “Practical Exercise 11 — Hardcoded Value Assessment”

Identify application strings that resemble:

API Keys
Tokens
Endpoints

Classify each as:

Public Identifier
Unknown
Sensitive

and validate before reporting.

Practical Exercise 12 — Write a Mobile Vulnerability Report

Section titled “Practical Exercise 12 — Write a Mobile Vulnerability Report”

Create a fictional report for:

Deep Link
Authorization Failure

Include:

Application Version
Platform
Account Roles
Deep Link
API Request
Evidence
Impact
Remediation
  1. What is mobile application security?

  2. Why should mobile applications be treated as untrusted clients?

  3. What is an APK?

  4. What is an IPA?

  5. What is static analysis?

  6. What is dynamic analysis?

  7. What information can AndroidManifest.xml reveal?

  8. What are Android permissions?

  9. What is an exported component?

  10. What is an Android activity?

  11. What is a service?

  12. What is a broadcast receiver?

  13. What is a content provider?

  14. What information can Info.plist reveal?

  15. Why are hardcoded values not automatically vulnerabilities?

  16. What makes a hardcoded secret security-sensitive?

  17. What is local storage?

  18. What sensitive data may exist locally?

  19. What is SharedPreferences?

  20. What is the iOS Keychain?

  21. What is the Android Keystore?

  22. Why is token storage important?

  23. What should happen to tokens after logout?

  24. Why should password changes be tested against existing sessions?

  25. What is biometric authentication?

  26. Why should sensitive authorization not depend only on biometric client state?

  27. What does mobile network analysis reveal?

  28. Why is HTTPS important?

  29. Why can sensitive data in URLs be risky?

  30. What is certificate validation?

  31. What is certificate pinning?

  32. What is a WebView?

  33. Why can WebViews create security risks?

  34. What is a deep link?

  35. What is a custom URL scheme?

  36. Why must deep-linked resources still enforce backend authorization?

  37. Why should mobile and web APIs be compared?

  38. What are application logs?

  39. Why can clipboard use create risk?

  40. Why can screenshots expose information?

  41. Why is running on a rooted device not automatically a vulnerability?

  42. Why is obfuscation not an authorization control?

  43. What are third-party SDKs?

  44. How can third-party SDKs affect privacy?

  45. What security questions apply to push notifications?

  46. What is client-side role enforcement?

  47. Why should mobile business logic be tested server-side?

  48. What should be reviewed in OTP workflows?

  49. Why should mobile application versions be compared?

  50. What should a professional mobile vulnerability report contain?

Mobile security requires understanding:

Client
Device
Storage
Authentication
Tokens
Network
APIs
Backend

Remember:

Mobile App
Trusted Client
Hidden Mobile Feature
Authorization
Hardcoded Key
Automatically
Sensitive Secret
Biometric Success
Backend Authorization
Deep Link
Authorization
Obfuscation
Security Boundary

The professional methodology is:

Package
Configuration
Components
Storage
Authentication
Network
API
Authorization
Business Logic
Evidence
Report

Mobile security skills are useful for:

Bug Bounty Hunters
Mobile Security Researchers
Application Security Analysts
Mobile Penetration Testers
API Security Analysts
AppSec Engineers

During interviews, you should be able to explain:

How You
Map a Mobile
Attack Surface
How You
Analyze Application
Configuration
How You
Review Local Storage
How You
Analyze Tokens
How You
Inspect Network Traffic
How You
Test Deep Links
How You
Test Mobile APIs
How You
Separate Client
and Server Security

Instead of saying:

I Test
Android Apps

you should be able to explain:

I begin by mapping
the mobile application's
package, configuration,
permissions, entry points,
local storage and
network communication.
I then identify the
authentication and token
model, inspect the APIs
used by the client and
validate authorization
using controlled accounts.
I review deep links,
WebViews and exposed
mobile components while
separating client-side
behavior from backend
security enforcement.
Finally, I validate
security impact and
document reproducible
evidence.

➡️ Next: 05 — Advanced Web Exploitation

You now understand the primary attack surfaces across:

Web
APIs
Mobile

The next module moves into more complex web attack scenarios where vulnerabilities often emerge from:

Interactions
Trust Boundaries
Application State
Multiple Requests
Backend Architecture

You will learn about advanced concepts involving:

Advanced Access Control
Authentication Chains
Advanced SSRF
Request Smuggling Concepts
Web Cache Issues
Race Conditions
Advanced Business Logic
Complex Authorization
Vulnerability Chaining

You will move from:

Testing
Individual
Vulnerability Classes

to:

Understanding
Attack Paths
Across Multiple
Application Components

using:

Weakness
Trust Boundary
Second Weakness
Attack Path
Business Impact

➡️ Next: 05 — Advanced Web Exploitation