CEHv12-17 - Mobile Platform Hacking
Mobile security basics
Mobile devices have multiple entry points for attackers due to their extensive functionality and connectivity.
Surfaces
- Operating Systems: vulnerable to outdated patches. Regular updates are essential to address security flaws.
- Applications: third-party or malicious apps can exploit devices. Even official app stores occasionally host compromised apps.
- Bluetooth: susceptible to attacks like Bluejacking, Bluesnarfing, Bluebugging, and BlueBorne. Older specifications lack encryption and authentication.
- Wi-Fi: subject to common wireless threats (e.g., Evil Twin, Honeypot attacks). Devices on public Wi-Fi are particularly vulnerable.
- Telco (Cellular Networks): outdated protocols like SS7 allow attackers to eavesdrop on calls, intercept messages, and perform billing fraud.
- Web Browsing: exposed to client-side attacks like Cross-Site Scripting (XSS), drive-by downloads, and clickjacking.
Threats and Vulnerabilities
Malware:
- Overview: malware targets all devices, including mobile.
- Examples: malicious APKs, spyware apps.
- Prevention: regular updates, antivirus tools, and avoiding third-party app stores.
SIM hijacking:
- Mechanism:
- Attackers hijack SIMs to intercept 2FA messages and calls.
- Insider threats may involve telecom employees.
- Impact: Compromises sensitive accounts and communication.
- Mechanism:
App Store threats:
- Official stores: even trusted platforms like Google Play and Apple App Store can host malicious apps.
- Third-party stores: apps from third-party sources like FDroid require careful vetting.
- Mitigation: stick to official app stores and minimize app installs.
Encryption weaknesses:
- Unencrypted communication: SMS and certain apps lack encryption.
- Weak Encryption: devices using outdated protocols are vulnerable.
- Recommendations: use apps with end-to-end encryption like Signal or WhatsApp. Ensure devices utilize strong encryption protocols.
Theft and physical access:
Risks: unlocked or poorly secured devices can lead to unauthorized access.
Mitigation: enable auto-lock features with strong passwords or biometrics. Use remote wipe capabilities.
OWASP Mobile Top 10 Risks:
The OWASP Mobile Top 10 outlines common mobile security risks:
- Improper Platform Usage: Misuse of OS features.
- Insecure Data Storage: Storing sensitive data unencrypted.
- Insecure Communication: Lack of encrypted channels.
- Insecure Authentication: Weak login mechanisms.
- Insufficient Cryptography: Poor implementation of encryption.
- Insecure Authorization: Allowing unauthorized access.
- Client Code Quality Issues: Vulnerable application code.
- Code Tampering: Modified or malicious apps.
- Reverse Engineering: Attackers decompiling apps to exploit vulnerabilities.
- Extraneous Functionality: Exposing debug or test features in production.
General security guidelines
- Keep devices updated: install patches and updates promptly.
- Use antivirus software: detect and mitigate malware.
- Enable encryption: encrypt device storage and external media.
- Minimize app installs: only install necessary and verified apps.
- Disable unused features: turn off Bluetooth, Wi-Fi, and location services when not needed.
- Secure communication: use apps with end-to-end encryption.
- Be cautious of public networks: avoid public Wi-Fi or use VPNs for secure connections.
- Monitor device activity: look for suspicious behavior and unauthorized access.
Additional risks and considerations:
- Sandbox bypass: Mobile devices may be susceptible to sandbox bypass or escape, allowing malicious actors to evade security measures and compromise device integrity.
- Sim hijacking: Attackers can hijack SIM cards to intercept SMS messages, phone calls, and two-factor authentication (2FA) codes, compromising device security.
- Mobile spam and phishing: Mobile users are vulnerable to spam and phishing attacks via SMS (smishing) and voice calls (vishing), which aim to deceive users into disclosing sensitive information.
- NSO group and Pegasus: Organizations like the NSO Group develop sophisticated malware like Pegasus, targeting mobile devices to infiltrate communications and compromise device security.
Android security
Android basic features:
- Popularity:
- Android powers approximately three out of four mobile devices worldwide.
- Dominates the smartphone and tablet markets due to its open-source nature and affordability.
- Development:
- Created by Google and based on Linux.
- Open-source and customizable, allowing manufacturers to adapt the OS for various devices.
- Device administration:
- Android supports app development via tools like Android Studio.
- Deprecation of some administrative policies; developers should keep up-to-date with Android API changes.
Rooting
- Definition:
- Rooting grants administrative (root) access, bypassing built-in security restrictions.
- Similar to jailbreaking on iOS, but specific to Android.
- Benefits:
- Bypass restrictions: Install apps from external sources and enable tethering.
- Remove bloatware: Delete pre-installed apps that consume resources.
- Customization: Modify the OS and install custom ROMs.
- Risks:
- Security vulnerabilities: Increased risk of malware through third-party apps.
- Warranty void: Rooting typically voids the manufacturer’s warranty.
- Bricking: Improper rooting can render the device inoperable.
Rooting tools
- Popular tools:
- Kingo root
- King root
- Towel root
- One-click root: known for its ease of use.
- Requirements: enable USB Debugging Mode on the device, and follow tutorials specific to the device model.
Hacking Tools
- Drozer: vulnerability scanner.
- zanti-zscan: mobile penetration testing toolkit by Zimperium.
- Kali NetHunter: a mobile penetration testing platform that doesn’t require rooting.
- DroidSheep: intercept unprotected web sessions (requires rooting).
- C-Sploit: a Metasploit-like tool for Android.
- ADB (Android Debug Bridge): enables shell access for debugging and app management.
Security measures
- Avoid rooting: retain built-in security protections.
- Use strong screen locks: secure devices with PINs, passwords, or biometrics.
- Install apps from trusted sources: only download from Google Play to avoid malicious APKs.
- Install antivirus and anti-malware: e.g. AVG, Avast, Norton, Bitdefender.
- Keep the OS updated: regular updates fix vulnerabilities and improve security.
- Avoid public WiFi: use VPNs for secure connections when necessary.
- Enable location services: helps track and recover lost devices.
- Beware of smishing: treat suspicious text messages with caution and avoid clicking unknown links.
- Disable unused features: turn off WiFi, Bluetooth, and location services when not in use.
iOS security
Developed by Apple, iOS powers iPhones and iPad. It was released in 2007, initiating the smartphone revolution. Renowned for its smooth performance, advanced hardware, and secure ecosystem. Among it’s security features are:
- Secure boot: ensures only authorized boot processes occur.
- Biometric authentication: Face ID, Touch ID.
- Passcodes: adds another layer of security.
- Code signing: requires apps to pass stringent Apple code reviews.
- Sandboxing: isolates apps to prevent unauthorized access to system resources.
Jailbreaking
Definition: bypassing iOS restrictions to gain root-level access and remove sandboxing. It is similar to rooting on Android devices.
Advantages:
- Install third-party or unsigned apps.
- Full customization of the device.
Disadvantages:
- Increased risk of malware and malicious apps.
- Voids warranty and may brick the device.
- Compromises built-in security measures.
Types:
- Tethered: requires the device to be connected to a computer to boot in a jailbroken state.
- Semi-Tethered: boots normally but requires a computer to reapply the jailbreak for functionality.
- Untethered: device remains jailbroken even after reboots.
- Semi-Untethered: similar to semi-tethered but allows patching directly from the device without a computer.
Tools:
- Hexxa/Hexxa Plus: Popular jailbreaking tools.
- Numerous tutorials and tools are available online for jailbreaking.
iOS-Specific Security Threats
- Trust jacking:
- Exploits the “Trust This Device” feature during iTunes sync over WiFi.
- Allows attackers remote access to sensitive data.
- iOS malware:
- Includes threats like Pegasus and spyware tools.
- Targets high-profile users and exploits zero-day vulnerabilities.
- Hacking Tools:
- Apps like Network Analyzer Pro can gather network information.
- Tools like Elcomsoft Phone Breaker can access encrypted backups and iCloud data.
Security Measures for iOS Devices
- Avoid jailbreaking: retain built-in security protections.
- Enable screen locks: use Face ID, Touch ID, or strong PINs.
- Install trusted apps: avoid sideloading apps or downloading from unverified sources.
- Regular updates: apply patches and updates as soon as they are available.
- Use VPNs: encrypt data during network transmission.
- Disable unused features: turn off WiFi, Bluetooth, and location services when not in use.
- Enable “Find my iPhone”: track your device if lost or stolen.
- Use a password manager: avoid weak or reused passwords.
- Install mobile security suites: e.g. Trend Micro, Norton, or Bitdefender.
- Avoid public WiFi: minimize exposure to untrusted networks.
iOS Hacking Tools
- Network Analyzer Pro: for information gathering.
- Trustjacking: exploiting the trusted device feature to access the device remotely (juicejacking is done via compromised cable on port).
- Malware Examples: Pegasus, developed by the NSO Group, used for espionage.
Mobile device management
Mobile Device Management (MDM)
- Definition: software solution allowing administrators to manage and secure mobile devices across various operating systems (e.g., Android, iOS, Windows, Chrome OS).
- Capabilities:
- Authentication enforcement: require passcodes or biometric authentication.
- Remote actions: lock or wipe lost/stolen devices.
- Root/Jailbreak detection: flag compromised devices for security.
- Policy enforcement: apply security rules (e.g., app restrictions, password policies).
- Inventory tracking: monitor devices as part of organizational assets.
- Real-Time monitoring: generate alerts for compliance and security issues.
- Examples of MDM Solutions:
- ManageEngine Mobile Device Manager Plus: supports cloud or on-premises deployment which manages devices running Android, iOS, macOS, Windows, and Chrome OS.
- IBM Maas360 with Watson: cloud-based mobility management solution, which integrates with AI-driven insights for enhanced device security.
Bring Your Own Device (BYOD)
- Definition: employees use personal devices for work-related tasks.
- Benefits:
- Increased productivity: employees can work on familiar devices.
- Flexibility: access business resources anytime, anywhere.
- Cost savings: reduces organizational expenditure on devices.
- Employee satisfaction: allows use of preferred devices.
- Risks:
- Diverse cevices: increased attack surface for IT and security teams.
- Data co-mingling: personal and business data coexist, complicating security.
- Unsecured networks: users may connect to insecure Wi-Fi.
- Device disposal: improper disposal could expose sensitive data.
- Lost/Stolen devices: high potential for data breaches.
- Policy circumvention: users may bypass corporate restrictions (e.g., use cellular networks to access restricted sites).
BYOD Policies
- Secure environment: require secure passwords and full-disk encryption. Implement device health checks before granting access.
- Standardized technology: approve a list of supported hardware, software, and apps.
- Policy documentation: publish and disseminate clear guidelines on acceptable use.
- Local storage and removable media control: define what data can be stored locally or on external drives.
- Network Access Control (NAC): use NAC to assess and allow device connections based on compliance.
- Web and messaging security: enforce secure communication and browsing practices.
- Data Loss Prevention (DLP): apply measures to prevent unauthorized data sharing or exfiltration.
General Security Guidelines for Mobile Devices
- Use antivirus and anti-spyware: e.g. Norton, Bitdefender, or Trend Micro.
- Restrict app installs: avoid unnecessary or suspicious apps.
- No sideloading, jailbreaking, or rooting: prevent actions that compromise built-in security.
- Remote wipe capabilities: ensure sensitive data can be securely deleted from lost devices.
- Enable disk encryption: protect data in case of device theft.
- Apply regular updates and patches: keep the OS and apps current to mitigate vulnerabilities.
- Secure network connections: avoid public Wi-Fi or use VPNs for encrypted access.
- Educate users: train employees on secure usage and recognizing phishing (e.g., smishing).