Mobile Attack Surface

Presented by: Christopher Crowley

Presentation
Resource Thumbnail

The mobile attack surface refers to the combination of hardware, firmware, operating system, and applications installed on a mobile device, as well as its connectivity options. This concept encompasses a wide range of potential entry points for attackers, including vulnerabilities, misconfigurations, and social engineering tactics.

Full Transcript / Content

--- Page 1 --- Mobile Assessments: Attack Surface and Frameworks SOC-Class.com || Montance® LLC 1Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? --- Page 2 --- Christopher Crowley - Background: root on (Ultrix/VMS) employer systems at 15 years old (80s #CYBER) - Mobile: iPad, blackberry, nokia - Sectors: Defense, Education, Energy, Government, Financial, Software Dev., Telecom… - Consultant, author of SOC- Class.com: Security Operations, Design, Build, Operate. Teaches SANS: SEC575, SEC511, SEC504 Montance® LLC 2 --- Page 3 --- Context of this Presentation SOC-Class.com || Montance® LLC 3Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? --- Page 4 --- Cybersecurity Issues - I’m only speaking to cybersecurity concerns, not physical safety concerns (eg. data theft, not battery explosion) - Talk focuses on mobile devices (Android & iOS) - You as a vendor, reseller, regulator, or user are probably developing and selling a device with only in a subset of the attack surface - It is probable your less-featured device is going to link back to a fully featured mobile device Montance® LLC 4 --- Page 5 --- Assessing Cybersecurity Issues - I will reference several frameworks for assessing these issues. Notably CIS and MASVS (OWASP). - There are legal issues your organization needs to resolve, reputational issues your organization needs to consider, stewardship and privacy considerations of your customers to address - Your organization needs to decide how to apply these concepts balancing legal, technical, business, privacy, and social pressures. Montance® LLC 5 --- Page 6 --- IoT, Wearables, Mobile, … - Grouping: IoT, wearables, and mobile into a sub-category of information systems is convenient, due to the presence of internet connectivity, personal ownership, and individual affinity. - Compromise vectors by financially motivated threat actors apply to all information systems. - Data collection by vendor platforms and governments occurs regularly with minimal individual recourse. - We’ve seen some examples where poor vendor development practices result in large scale compromise, resulting in substantial damage. - Mirai botnet is an infamous example. Montance® LLC 6 --- Page 7 --- Mobile SOC-Class.com || Montance® LLC 7Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? --- Page 8 --- Mobile - defined - As distinguished from servers, workstations (laptops), Control systems (SCADA), network infrastructure (Wi-Fi access point, switch, router, etc.) - not those things - mobile’s typical OS: Android, iOS, Symbian, Blackberry OS, Windows Phone, plus System on Chip (SoC) OSes, - Are usually cellular capable (some wi-fi only) and - characterized by small form factor, diminished general compute capability, no service offerings (SMB, SSH, …) by default / design, ability to install user applications, with - a minimal interface, small screen, and no full keyboard. Montance® LLC 8 --- Page 9 --- Mobile - architecture defined - A mobile device has firmware, an operating system, and applications installed, - and is capable of connecting to a multitude of networks (cellular, 802.11 WiFi) to transfer data over IP protocol, usually requiring a subscription cellular plan to provide connectivity over large area, and - allows the user to install additional applications. The device primarily focuses on communication functionality. These devices have become de facto personal computer, organizer, and assistant. Montance® LLC 9 --- Page 10 --- Mobile - attack surface overview - Attack surface is the hardware itself (firmware, etc.) - multi-homed network connectivity - including WiFi, and Cellular networks as well as - multiple interface connectivity opportunities, like - wired (USB, Lightning) and RF (Bluetooth, NFC) - plus, the operating system of device and SoC, the - applications installed, and the - user operating the device. - I’ll cover attack surface details later in the talk… Montance® LLC 10 --- Page 11 --- Threats SOC-Class.com || Montance® LLC 11Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? --- Page 12 --- Threats - taxonomy (B$,M$,T$) $B $M $T Montance® LLC 12 - This adapted figure (ES.1 Threat Taxonomy) from US DOD Defense Science Board report Resilient Military Systems… - groups threats into ten, million, and billion dollar level resource capability clubs where: - $T: reuse vulnerabilities, - $M: discover vulnerabilities, - $B: create vulnerabilities. --- Page 13 --- Threats - C,I,A - Information Assurance protections define - Confidentiality, - Integrity, and - Availability. - Mobile devices risk harm through - disclosure of credentials and harm of reputation; - alteration of data causing errors and harm; plus - data destruction resulting in: extra work to recreate it, misfortune and errors, and inconvenience. Montance® LLC 13 --- Page 14 --- Threats - privacy - Privacy can be violated through location information, microphone, camera, calendar, or - review of private conversations by unauthorized parties (government, employer, competitor, advertiser, spouse, …). - A lot of people find advertisement relevant to private conversations “creepy” but accept it. The phone has access to relevant areas of interest via data on the mobile device. - For example, most mobile applications allow the application vendor insight into the details of conversations. - While many messaging application vendors have moved to end-to- end encryption to protect content and remove themselves from the man-in-the-middle position, the application running on the mobile still sees the decrypted conversation and can use it to eavesdrop or advertise in a targeted fashion. Montance® LLC 14 --- Page 15 --- Threats - financial - Financial fraud is in the billions of dollars per year, US FTC Consumer Sentinel Network Data Book 2019 - shows $1.9B USD total reported losses in 2019 in USA. - There are many ways to conduct this fraud: - theft of credentials (passwords, one-time tokens), - in-app purchase fraud, premium SMSs, - game assets theft and resale, cryptocurrency theft, - direct transfers within mobile banking apps, - extortion (CryptoLocker, Blackmail,…), and - resell access to device for organizational access or bot. Montance® LLC 15 --- Page 16 --- Threats - practically illustrated - There are many threats you can emulate. - One example talk illustrating an actor and associated infrastructure was Lookout’s Stealth Mango talk: Blaich, Flossman, Blackhat ’18. - Or the Azimuth/Offcell Mandt, Solnich, Wang iPhone SEP reversing talk at Blackhat ’16. - So many good ones out there, really… You should consider which threats target you. Montance® LLC 16 --- Page 17 --- Threats - your primary concern? - You as a person or organization may have specific concerns over mobile devices. - This depends on the data stored on the device. - Determining what data is present is a challenge. - Most people blend personal use with business use in a non-compartmentalized fashion, for the convenience of carrying one mobile device. - Applications can provide compartmentalization. Montance® LLC 17 --- Page 18 --- Guidelines - list, checklist, how-to - Re-use the community information already available, such as: - Joshua Wright’s (SANS) Top 8 Steps for Mobile, - NISTs relevant Special Publications (SP), - Center for Internet Security (CIS) benchmarks, - OWASP Mobile Security Test Guide (MSTG), MASVS, - And ATT&CK mobile: matrices, tactics, techniques. - Some details about a couple of these follows. Montance® LLC 18 --- Page 19 --- Assessments - explained - Performing assessment of a mobile device rarely is full assessment of all parts of the architecture. - If you intend to do a full assessment, it will take a lot of time and resources. - There are companies who are capable of this, and government agencies who are capable of this. They’re usually resource constrained, too. You’ll likely only assess selected aspects of the architecture in as much detail as you can afford. Montance® LLC 19 --- Page 20 --- surface, threat, assessment - So, we’re stuck selecting the attack surface, relevant threat, and assessment methodology based on what concerns us most. The - attack surface is the portion of the architecture that may be vulnerable. - Threats T$,M$,B$ are all out there. - Assessment selection: planning to attack 4G crypto? Use a jailbroken iOS device to do run-time analysis of an app on an iPhone? Have those skillz & time? Montance® LLC 20 $B $M $T --- Page 21 --- Guidelines - ATT&CK - ATT&CK framework has matrices dedicated to mobile devices, and specifics on android and iOS - online at attack.mitre.org. Look at - Mobile Tactics, Techniques, and Mitigations, - Network Effects (TA0038): intercept/manipulate, - and Remote Service (TA0039): cloud/EMM/MDM. Montance® LLC 21 --- Page 22 --- Guidelines - CIS - CIS publishes Benchmarks for iOS and Android which indicate suggested configuration and considerations. - Contain specifications on how to securely configure devices with options at each operating system version level. These are - good things to crosswalk your configurations against to select controls. - I’m a contributor to the upcoming release. Montance® LLC 22 --- Page 23 --- Guidelines - MASVS - OWASP’s Mobile Application Security Verification Standard (MASVS) is multi-lingual direction for development of mobile applications and the testing/verification of those controls presented as an industry standard (like CIS). - It is synced to OWASP MSTG. - Specification guide on appropriate security. Montance® LLC 23 --- Page 24 --- Guidelines - MSTG - Mobile Security Testing Guide (MSTG) is how to test the same specifications as OWASP MASVS. It is - “…a comprehensive manual for mobile app security testing and reverse engineering…” - I suggest you tell your legal team “application assessment” not “reverse engineering” when you - request permission to do “an assessment of the suitability of legally acquired software for use in a network I own, control or manage,” or something. Montance® LLC 24 --- Page 25 --- Guidelines - MSTG - AAPG Example Montance® LLC 25 Android App PenTest Guide(AAPG) is an implementation of MSTG. --- Page 26 --- Guidelines - NIST SPs - United States Department of Commerce’s National Institute of Standards and Technology (NIST) docs relevant to mobile devices include: - SP-1800-4: Mobile Device Security: Cloud and Hybrid Builds (2019), - SP-800-163: Vetting the Security of Mobile Applications (2019), - SP-800-101: Mobile Device Forensics (2014), - SP-800-124: Guidelines for Managing the Security of Mobile Devices in the Enterprise (2013), and - SP-800-164: Guidelines on Hardware-Rooted Security in Mobile Devices (2012). - There may be additional ones to consider. Montance® LLC 26 --- Page 27 --- Tools - assessments - Some great, some bad tools out there. - My opinion is a terrible tool in the hands of an effective tester likely will still yield good results, an excellent tool wielded by someone who knows little or has little time will yield poor results despite high potential for value. - Training, discipline, interest, adequate time and motivation are usually the difference. - A good list is awesome-mobile-security on github. Montance® LLC 27 --- Page 28 --- Attack surface (Don’t get ahead of ourselves to think about how to exploit, that is forthcoming.) SOC-Class.com || Montance® LLC 28Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? --- Page 29 --- Attack surface - hardware - The hardware itself is subject to re-use or attack. Device can have flaws in memory, CPUs, storage, antennas: {cell, WiFi, nfc, bluetooth}, interface: {usb, mic/ear jack}. - The firmware to execute instructions on the hardware can be flawed. - Access (eg, chip-off) or leveraging flaws can lead to data access, execution of unauthorized code or exceptions leading to interruption of code execution. Montance® LLC 29 --- Page 30 --- Attack surface - baseband (code) - The baseband processor is the processor responsible for the communication to the cellular network. Part of System on a Chip (SoC). - This processor (and distinct memory) runs a real time operating system (RTOS) to support the signaling functions required for radio frequency (RF) communications. OS and hardware can be flawed. - Also many other task-specific processors and code in a SoC. Montance® LLC 30 --- Page 31 --- Attack surface - secure / trusted device - Most modern computers and phones include a trusted platform module (TPM) or secure enclave processor (SEP) which is intended to alleviate the general processor (CPU) of sensitive operations and data in order to protect from a compromised CPU. - This includes cryptographic actions as well as crypto data storage. It may be biometric related. Or yet another separate biometric enclave may be used. - The SEP or TPM is itself targeted for attack, both hardware and its as specialized code. Montance® LLC 31 --- Page 32 --- Attack surface - operating system - The operating system (OS) of the main phone can have exploitable flaws. - Flaws in this OS (or the boot components as in checkm8 flaw from axi0mX) such as: buffer overflows, use after free, off by one, … (see MITRE CWE for more) may exist. - Leading to control of the operating system and the majority of the data stored, but not SEP . Montance® LLC 32 --- Page 33 --- Attack surface - applications - An app isn’t part of the OS. They’re usually written by a third party. The OS defends itself against the apps because they can attempt to exploit the OS. - Android uses a virtual machine and SELinux restrictions, - iOS employs app whitelisting after code review (digital signature required prior to execution) & filesystem chroot. - Plus, apps can attack one another via inter-process communication (IPC) and unauthorized access to another app’s data if the OS doesn’t adequately enforce controls. - Apps store and collect tremendous amounts of data from the user and the device’s sensors such as: location, movement, contacts, messages, phone calls, images, voice and other ambient recordings, WiFi APs nearby, … Montance® LLC 33 --- Page 34 --- Attack surface - networks - Mobile devices often connect to networks managed by some third party such as a cellular provider or public/hotel/airport WiFi. - This network could be intentionally malicious, or could be negligent in security and become an unintentional delivery vector of malice. - Attacks include Man-in-the-middle, eavesdropping attacks, redirection of DNS, or injection of content through non-secure or insecure connections transiting network. Montance® LLC 34 --- Page 35 --- Attack surface - networks: cellular - Attacks of cell and crypto protocols over the air (RF) - 2G: uses single direction auth(net of device) and can be impersonated, plus its crypto is broken. (Barkan, 2008) - 3G/4G uses bi-directional auth. Some attacks published, in practice it’s secure for use but there may be opportunities for downgrade or $M or $B actors to undermine crypto. - aLTEr (2019) is an attack for MITM position, modified DNS. - The infrastructure of the cellular network (the carrier) has an opportunity to attack all traffic. This could be malice (eg. national carrier directed by government), or compromise through negligent controls management, or performed by an insider. - A malicious peer cell network can misrepresent device presence using SS7 to also receive messages and calls. Or SIM swapping attacks. Montance® LLC 35 --- Page 36 --- Attack surface - networks: WiFi - WiFi is much weaker than cellular networks. - ARP poisoning and other trivial MITM attacks, - open network (no-crypto) evil twin type attacks, - or crypto attacks against WEP or WPA/WPA2 with poor implementation (passwords like Spring2021) or persistent effort (WPA PSK attack with GPU enabled) to undo the network crypto and association restrictions. Once cracked, previously encrypted communication can often be decrypted. - 802.11 management frame are usually unencrypted. Montance® LLC 36 --- Page 37 --- Attack surface - networks: bluetooth - Bluetooth is often used to associate a peripheral with the mobile device. This is an - opportunity to access device data and inject keystrokes (or gestures), also an - opportunity to file share, or transfer contacts. - Association within Bluetooth protocol is intended to diminish this attack, some - flawed implementations have been reported. - Connection most likely used for wearables to connect to the phone. Montance® LLC 37 --- Page 38 --- Attack surface - networks: NFC - NFC is proximity sharing, within centimeters. - NFC is frequently used for contactless payment. This draws the attention of financial fraud actors. - Protocol reverse engineering attacks exist to overcome proximity, for example, NFCProxy. - Standing close to a person’s phone, can I relay NFC to a nearby Point of Sale to buy something? - (Relay-type attack was demo’d for auto FOB.) Montance® LLC 38 --- Page 39 --- Attack surface – data storage - Data storage on the device is subject to access. - The device’s physical storage can be taken off the device for access to the data in some cases. - All associated cloud, infrastructure, and extrastructure (organization systems in external infrastructure) servers used for data storage are potential vectors of attack. Montance® LLC 39 --- Page 40 --- Attack surface - crypto - Many of the protections we rely upon depend upon cryptography to provide protection. - Encrypting data increases the computational expense of recovering data. It does not render the data unrecoverable! I read this phrase in #cyber media all the time and feel repulsion every time I see that blatant misrepresentation. Hashing renders computationally infeasible to recover, but algorithm strengths vary. 30 years ago, Data Encryption Standard (DES) was badass. - Remember heartbleed? Why don’t you have as clear a memory of the “goto fail” flaw? A weird Apple issue fixed. https://www.feistyduck.com/ssl-tls-and-pki-history/ Montance® LLC 40 --- Page 41 --- Attack execution Copyright 2021 Montance® LLC - All Rights Reserved. All Wrongs Reversed? SOC-Class.com || Montance® LLC 41 $B $M $T --- Page 42 --- Attack execution - physical possession - Physically holding the device is an opportunity for attackers to see data or to introduce configuration changes or an exploit. - “Evil maid” attack: Trusted/authorized insider leverages short duration access to view/change. - Theft & return: How relieved you are to get your lost phone back? Was the loss event crafted? - Cross a border? All devices subject to inspection. Montance® LLC 42 --- Page 43 --- Execution - supply chain introduction - Similar to physical access, the supply chain itself could be affected (by $M or $B) to deliver a (targeted) pre-compromised device. Target the - hardware manufacturer, cell provider, OS development vendor, application store, or development framework (eg, xCodeGhost). - Post sale/delivery opportunities exist, too. SIM swap on cellular networks; or app stores could be leveraged to send malicious updates or apps. Montance® LLC 43 --- Page 44 --- Execution - trusted connected device - The mobile device is frequently connected to other devices, for example, power charging. - If a laptop is used to make backups, there’s a trust authorized for access to data. This could be abused for data theft or installation of software. - Bi-directional attack opportunity with wearables. - Similarly, MDM/EMM establishes trust for management. A compromised MDM was recently used to install cryptolocker on devices. - Cloud assets are trusted connected devices. Montance® LLC 44 --- Page 45 --- Attack execution - remote - Mobile devices receive unsolicited communication from untrusted third parties via SMS/MMS. - Stagefright flaw was remotely exploitable via crafted MMS message. The exploit occurred when the OS library (libstagefright) attempted to create the thumbnail to display to user. No user action required. - Display of WiFi access points triggered exploit (crash, not control) of iOS in the truetype (and blackdot). - True remotewould require no user action whatsoever. Basically SMS/MMS, cellular baseband flaw, or with proximity to device in the case of a Bluetooth, WiFi, or NFC flaw. - Google ZDI: Ian Beer – 2020-12: Radio proximity remote Montance® LLC 45 --- Page 46 --- Attack execution - social engineering Montance® LLC 46 - Enticing the user to perform initial action to start off an exploit (or series of exploits) is common. - Pegasus targeted iOS with a message to click link. Or, - 2019-08 iOS Exploit Chain: website hosted iOS zero day. - ($T,$M,$B) use this because the mobile device is largely used as a client side device only, and substantial effort has gone into protecting the attack surface components which process untrusted data. - Problem is most people click all the things without any regard whatsoever to safety, or are easily duped. --- Page 47 --- @CCrowMontance - This slide deck available: https://mgt517.com/cell as are many other decks up one folder in Public. - Stay safe, assess and use your mobile devices with an informed view of the benefits and risks… - I truly want to hear your thoughts on this. Tweet? Montance® LLC 47

Related Q&A

  • Q: Overview
    A: Presentation details for Mobile Attack Surface