Sub topic 9
Containing and preventing mobile security problems
This chapter assumes you already know the mobile risks and symptoms from the earlier chapters: rooting, jailbreaking, sideloading, app spoofing, high data usage and fake security warnings. It also assumes you know the basic Android and iOS settings screens. Here the question is what you do about a mobile security problem. The answer has two halves: contain a device that may already be compromised, and put controls in place so it is less likely to happen.
Contain first, then fix
When a phone looks compromised, stop the damage before you investigate. Containment has three goals:
- Cut the device off from the network, so malware cannot send data out or receive commands.
- Protect the data on the device and the accounts reachable from it.
- Keep enough evidence and state to find the cause.
The usual order is:
- Turn on airplane mode, or disconnect from Wi-Fi and cellular.
- Remove the suspect app, or the profile or certificate that the symptoms point to.
- Update the OS and run an anti-malware scan.
- Change passwords and revoke sessions from a different, clean device.
- Restore from a known-good backup or factory reset, if the earlier steps fail.
A factory reset erases the user's data, so the exam treats it as a last resort. Choose the least destructive option that still works. The chapter on scenario strategy returns to this idea.
Screen locks
A screen lock is the first control against a lost or stolen phone. Ranked from weakest to strongest:
| Method | Strength | Notes |
|---|---|---|
| Swipe or no lock | None | Anyone who holds the phone has full access. |
| Pattern | Low | Easy to guess, and the smudge trail on the screen shows the pattern. |
| 4-digit PIN | Low to medium | Only 10,000 combinations, so it depends on the lockout settings. |
| Long PIN or alphanumeric passcode | High | Best choice when the exam asks for the strongest lock. |
| Biometrics (fingerprint, face) | Convenient | Always backed by a PIN or passcode fallback. |
Two settings matter as much as the method:
- Failed-attempt restrictions. After repeated wrong guesses the device adds delays or locks. Some devices can erase themselves after a set number of failures (for example, 10 on iOS when Erase Data is on). This stops brute-force guessing.
- Auto-lock timeout. A short idle timeout, such as 30 seconds to 2 minutes, limits the window in which an unattended phone is open.
If a user is locked out after too many failed attempts, the normal fix is to follow the vendor's recovery path, such as Apple ID or Google account recovery. A factory reset is the fallback and removes the data.
Mobile device management (MDM)
Mobile device management (MDM) is software that lets an organization enroll devices and control them from a central console. Unified endpoint management (UEM) products extend the same idea to laptops and other devices. After a user enrolls a device, the administrator can push policies and act on the device remotely.
Typical MDM capabilities:
- Require a screen lock, a minimum passcode length and encryption.
- Restrict or block app installs, and allow only approved apps.
- Block sideloading and, where policy requires, devices that are rooted or jailbroken.
- Push Wi-Fi, VPN and email settings and certificates.
- Report compliance. A non-compliant device can lose access to company email or resources.
- Locate, lock or wipe the device remotely.
MDM works differently depending on who owns the device:
- Corporate-owned. The company can enforce strict policy across the whole device.
- BYOD (bring your own device). The user owns the phone, so the company usually manages only a work profile or container. Containerization keeps work data and apps separate from personal ones, so a selective wipe can remove company data and leave personal photos alone.
Remote backup, locator apps and remote wipe
These three features work together when a phone is lost or stolen.
- Remote backup. Cloud backup (iCloud, Google account backup) copies contacts, photos and settings. It must exist before an incident. A wipe is only painless if a recent backup exists.
- Locator app. Find My (Apple) and Find My Device (Google) show the device's last known location and can play a sound, lock the screen with a message, or erase it. They must be enabled in advance and need the device to be online to respond.
- Remote wipe. An MDM console, or the locator service, sends an erase command. The device wipes the next time it connects. If the phone is offline, the command waits.
The order for a lost device is:
- Try to locate it.
- Remote lock it, with a message or contact number.
- If it will not be recovered, or holds sensitive data, remote wipe it.
- Revoke access: change the account password, and remove the device from the account's trusted devices.
Anti-malware and trusted sources
Mobile anti-malware scans installed apps and downloads for known threats. It can also warn about risky Wi-Fi networks and phishing links. Its limits matter. The sandbox stops an app from inspecting other apps, so on iOS in particular, security apps do far less scanning than they do on a PC. For that reason the prevention controls below usually matter more than scanning.
Prevention controls that stop most problems:
- Install apps only from the official store (Apple App Store, Google Play), or from the organization's managed store. Both vet apps. This is the main defense against sideloading and spoofed apps.
- Leave unknown-source installs off. On Android, keep "install unknown apps" disabled for every app. MDM can enforce this.
- Keep the OS and apps updated. Updates patch the vulnerabilities that malware and root or jailbreak tools exploit.
- Do not root or jailbreak. Both remove the sandbox protections and make malware much more powerful.
- Turn off developer mode and USB debugging when not needed. Leaving them on lets anyone with a cable run commands on an unlocked phone.
- Review app permissions. Revoke camera, microphone, location and contacts access from apps that do not need them.
- Use a VPN on untrusted Wi-Fi, and turn off auto-join for open networks.
- Use multifactor authentication on accounts, so that a stolen password or phone alone is not enough.
Checking a device you can reach
Where the technician has USB debugging enabled and authorized on an Android device, this command lists the third-party apps installed. An unfamiliar name stands out.
adb shell pm list packages -3On MDM-managed devices, the console shows the same inventory without a cable and can flag apps that are not on the approved list.
Matching control to symptom
| Situation | Best control or action |
|---|---|
| Phone lost with company email on it | Remote lock, then remote wipe if not recovered |
| User installed an app from a link in a text | Remove the app, scan, update, change passwords |
| Excessive ads and high data usage after a download | Uninstall the app, run anti-malware, review permissions |
| Employees keep sideloading apps | MDM policy blocking unknown sources, plus training |
| Personal phone used for work | MDM work profile or container, selective wipe |
| Stolen phone with a PIN of `1234` | Enforce a longer passcode and failed-attempt wipe through policy |
| Device is jailbroken and holds company data | Mark non-compliant, block access, restore the OS to a clean state |
Common mistakes
- Relying on a wipe without a backup, so the user loses everything.
- Enabling a locator app only after the phone is lost. It must be turned on beforehand.
- Using a screen lock but no lockout limit, so the PIN can be guessed.
- Applying a full-device wipe to a BYOD phone when a selective wipe of the work container was enough.
- Treating anti-malware as the only control and ignoring updates and trusted sources.
Exercise
A salesperson reports that a personal phone, enrolled in the company's MDM with a work profile, was left in a taxi. The phone holds company email and the customer's contract files. A locator search shows it offline. What should you do, and in what order?
Show answer
Try to locate it, then remote lock it with a contact message. The phone is offline, so the lock and wipe commands stay queued until it connects. Because it holds company data, send a selective wipe of the work profile through MDM, and a full wipe only if policy allows it on a personal device. Then revoke the user's sessions and change the account password from a clean device. Restore the work profile on a replacement device.
Exercise
Name three preventive controls that reduce the chance of malware reaching a company-managed Android phone, and say which one an MDM can enforce directly.
Show answer
Any three of: install apps only from the official or managed store, keep the OS and apps updated, keep unknown-source installs disabled, disable developer mode and USB debugging, review app permissions, and require a strong screen lock. MDM can directly enforce the screen lock requirement, the approved-app list and blocking of unknown-source installs.