Mobile and IoT Security: Risks, Testing Basics and Hardening
Phones, tablets, wearables, smart TVs, cameras and industrial sensors now outnumber traditional computers. They hold our messages, money, health data and homes, and many were designed with little thought for security. This lesson covers the threats and defences for mobile devices and the Internet of Things (IoT), with practical checks for your own phone, home devices and a safe lab exercise for inspecting app and device behaviour.
Mobile Security Fundamentals
Platform security model
| Feature | Purpose |
|---|---|
| App sandboxing | Each app runs in its own isolated space and cannot read another app’s data by default |
| Permission system | Apps must request access to camera, location, contacts, microphone and storage |
| Code signing and app stores | Apps are signed; stores review submissions (imperfectly) |
| Secure boot and verified boot | Check the integrity of the operating system at start-up |
| Hardware-backed key storage | Secure Enclave (Apple) and Trusted Execution Environment / StrongBox (Android) protect keys and biometrics |
| Full-device encryption | Protects data if the device is lost |
| Regular security updates | Patch vulnerabilities in the OS and components |
Mobile threats
| Threat | Description | Defence |
|---|---|---|
| Malicious or fake apps | Apps that steal data, show intrusive ads or impersonate banks, often from unofficial sources | Install only from official stores, check developer and reviews, avoid sideloading |
| Phishing, smishing and vishing | Fake texts, WhatsApp messages, calls or QR codes asking for OTPs, PINs or app installs | Never share OTPs; verify through official channels; see Social Engineering and Phishing Defence |
| SIM swap and number takeover | Fraudsters take over a phone number to receive OTPs | Use app-based authenticators or passkeys, add a SIM lock or PIN with your operator |
| Excessive permissions and stalkerware | Apps or people monitoring location, messages or microphone | Review permissions, check for unknown device administrators, use built-in safety checks |
| Unpatched operating systems | Known vulnerabilities remain | Update promptly; replace devices that no longer receive updates |
| Insecure Wi-Fi and Bluetooth | Interception or rogue pairing | Use HTTPS, VPN on untrusted networks, disable unused radios; see Wireless Network Security |
| Jailbreaking or rooting | Removes platform protections | Avoid on daily-use devices |
| Lost or stolen device | Physical access to data | Strong screen lock, encryption, remote locate and wipe |
Practical phone hardening checklist
- Use a strong passcode (6 digits or more, or an alphanumeric passphrase) plus biometrics for convenience.
- Turn on automatic OS and app updates.
- Enable “Find My Device”, remote lock and wipe.
- Review app permissions: remove location, microphone, camera and contacts access where not needed; prefer “only while using the app”.
- Remove apps you do not use; check for unknown device-admin apps and accessibility services.
- Use a password manager and passkeys or authenticator apps instead of SMS OTP where possible.
- Disable installation from unknown sources.
- Turn off lock-screen previews for messages.
- Back up regularly and encrypt backups.
- Know the banking fraud reporting route: call your bank immediately, then report on cybercrime.gov.in or helpline 1930 in India.
Mobile App Security for Developers and Testers
The OWASP Mobile Application Security project provides the MASVS (verification standard) and MASTG (testing guide). Typical categories: secure storage, cryptography, authentication, network communication, platform interaction, code quality and resilience.
- Never store secrets, API keys or tokens in plain text in the app package or local storage; use the platform keystore.
- Use TLS with proper certificate validation, and consider certificate pinning for high-risk apps.
- Validate on the server: assume the app can be modified or its traffic altered.
- Minimise data collection and permissions.
- Protect sensitive screens from screenshots and background previews.
- Keep third-party SDKs updated and reviewed.
Practice Lab 1: Inspect an App You Own
Use an Android emulator (Android Studio) or a spare device with a test app you build or a deliberately vulnerable training app such as OWASP’s MASTG Hacking Playground apps or DIVA/InsecureBankv2 that are published for learning.
- Install the app in the emulator. List requested permissions in the manifest (use
aapt dump permissions app.apkor the Android Studio APK Analyzer). - Check whether the app stores data in plain text in its private folder (in an emulator you can inspect it with
adb shell, usingrun-asfor debuggable test apps). - Look at the network behaviour with a proxy such as OWASP ZAP or mitmproxy configured on your lab network. Does the app use HTTPS everywhere? Does it reject an untrusted certificate?
- Write a short report listing each finding, the MASVS category and the recommended fix.
IoT Security
IoT devices are small computers with limited resources, long lifetimes and often poor update mechanisms. Compromised devices have been used as entry points to networks and as armies for large denial-of-service attacks.
Common IoT weaknesses
| Weakness | Example | Defence |
|---|---|---|
| Default or hard-coded credentials | The same admin password on every unit | Change on first use; buy devices that force unique passwords |
| Insecure network services | Open management ports, Telnet, unauthenticated web panels | Disable unneeded services; place devices behind a firewall |
| No or insecure updates | No patch channel, unsigned firmware | Choose vendors with stated update support; apply updates |
| Weak data protection | Clear-text traffic and cloud accounts with poor security | Prefer devices using TLS; use strong cloud account credentials and MFA |
| Privacy overreach | Cameras and microphones sending data to unknown servers | Review privacy settings; disable cloud features not needed |
| Physical access | Debug ports (UART, JTAG) left enabled | Disable debug interfaces in production; tamper protection |
| Insecure companion apps and APIs | App leaks tokens; API lacks authorisation | Test and secure the full chain; see API Security Essentials |
IoT hardening at home or in a small office
- Put all IoT devices on a separate guest or IoT network, isolated from computers and phones.
- Change default passwords at once and use a password manager.
- Update firmware and enable automatic updates where available.
- Disable remote access, UPnP and features you do not use.
- Turn on MFA on the cloud accounts that control devices.
- Check the manufacturer’s support period before buying; replace unsupported devices.
- Inventory your devices and review the router’s connected-device list occasionally.
Practice Lab 2: Map and Check Your Own IoT Devices
- List every smart device in your home: cameras, speakers, TVs, plugs, thermostats, printers.
- Log in to your router and note each device’s IP and MAC address. Identify any unknown ones.
- From a computer on your network, scan only your own devices with Nmap, as shown in Network Scanning and Enumeration With Nmap:
nmap -sV --top-ports 100 192.168.1.50 # replace with the IP of one of your own devices - For every open port, ask: does this device need it? Search the vendor’s documentation. Disable cloud or remote features that are unnecessary.
- Move the devices to an IoT network, rescan, and confirm they can no longer reach your computers.
Practice Lab 3: Observe Device Traffic
- Run Wireshark on a lab network and connect one of your own IoT devices.
- Capture for five minutes. Use the Statistics → Conversations view to list which destinations the device talks to.
- Check whether the traffic is encrypted (TLS) or plain text. Look up the destination domains.
- Write down anything surprising, such as frequent contact with unfamiliar servers, and decide whether you are comfortable with it.
Standards and Regulation
- ETSI EN 303 645 is a baseline standard for consumer IoT security, including no universal default passwords, a vulnerability disclosure policy and software updates.
- NIST IR 8259 and related guidance describe baseline activities for IoT manufacturers.
- Several countries have introduced IoT labelling and security rules; check the current requirements where you operate or sell.
- In industry, ICS and OT security follow IEC 62443; see the guidance on network segmentation for control systems.
Common Mistakes
- Leaving factory default passwords on cameras, routers and printers.
- Installing apps from unofficial links received in messages.
- Sharing OTPs with callers who claim to be from a bank.
- Putting every device on one network.
- Assuming that a device that works is a device that is secure.
Practice Exercises
- Explain app sandboxing and permissions to a family member.
- List five signs that a phone may be compromised, and the steps you would take.
- Draw a home network with computers, phones, a guest network and an IoT network, showing permitted flows.
- Choose one MASVS category and describe a test you would perform in a lab.
- Write a buying checklist for smart cameras that includes security requirements.
Mentor tip: The cheapest, strongest control for IoT is segmentation. You cannot make every device secure, but you can make sure a compromised one has nowhere interesting to go.
Educational use only: test only devices and apps you own or are authorised to assess.
- Mobile security relies on sandboxing, permissions, updates, strong lock screens and careful app choices.
- Protect against phishing, SIM swap and malicious apps; do not share OTPs.
- IoT devices often have default passwords, weak updates and exposed services.
- Segment IoT devices, update firmware and disable unneeded features.
- OWASP MASVS/MASTG and ETSI EN 303 645 give practical baselines.