nearby threats reversing analyzing and attacking google s
play

Nearby Threats: Reversing, Analyzing, and Attacking Googles Nearby - PowerPoint PPT Presentation

NDSS 2019 @ San Diego, US Nearby Threats: Reversing, Analyzing, and Attacking Googles Nearby Connections on Android Daniele Antonioli 1 , Nils Ole Tippenhauer 2 , Kasper Rasmussen 3 1 Singapore University of Technology and Design (SUTD) 2


  1. NDSS 2019 @ San Diego, US Nearby Threats: Reversing, Analyzing, and Attacking Google’s ‘Nearby Connections’ on Android Daniele Antonioli 1 , Nils Ole Tippenhauer 2 , Kasper Rasmussen 3 1 Singapore University of Technology and Design (SUTD) 2 CISPA Helmholtz Center for Information Security 3 University of Oxford Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android 1

  2. What are Google Nearby Connections? • Public API for Android and Android Things ◮ In-app proximity-based services ◮ E.g. peer-to-peer file editing • Implemented in the Google Play Services ◮ Available across different Android versions ◮ Applications use it as a shared library Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Motivation 2

  3. Why Analyzing Nearby Connections? • Wide attack surface ◮ Android (version ≥ 4.0) and Android Things ◮ Uses Bluetooth and Wi-Fi (at the same time) • Proprietary technology ◮ No public specifications ◮ Implementation is closed-source and obfuscated Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Motivation 3

  4. Our Core Contributions • First (security) analysis of Nearby Connections ◮ Uncovers its proprietary mechanisms and protocols ◮ Based on reversing its Android implementation • Re-implementation of Nearby Connections (REarby) ◮ Exposes parameters not accessible with the official API ◮ Impersonates nearby devices from any application • Attacking Nearby Connections on Android ◮ Connection manipulation and range extension attacks ◮ Responsible disclosure with Google Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Motivation 4

  5. Nearby Connections Public Information • Server advertises a service, client discovers it ( sid ) • Connection strategies: P2P_STAR and P2P_CLUSTER Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Background 5

  6. Nearby Connections Public Information 2 • Client and server connect using Bluetooth and/or Wi-Fi • Nodes exchange encrypted payloads (peer-to-peer) Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Background 6

  7. Our Dynamic Binary Instrumentation • Workhorse: Frida, https://www.frida.re ◮ Profiling of processes, e.g. NC-App, NC-GPS ◮ Hook function and methods calls ◮ Override parameters and return values ◮ Read and write processes’ memory Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Setup 7

  8. Reversed Phases of a Nearby Connection Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  9. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  10. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  11. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  12. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  13. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret 5 Application Layer Connection Establishment : interactive Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  14. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret 5 Application Layer Connection Establishment : interactive 6 Key Derivation Functions : session, AES and HMAC keys Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  15. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret 5 Application Layer Connection Establishment : interactive 6 Key Derivation Functions : session, AES and HMAC keys 7 Optional Physical Layer Switch : Bluetooth BR/EDR to Wi-Fi Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  16. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret 5 Application Layer Connection Establishment : interactive 6 Key Derivation Functions : session, AES and HMAC keys 7 Optional Physical Layer Switch : Bluetooth BR/EDR to Wi-Fi 8 Exchange Encrypted Payloads : 30 seconds timeout Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  17. Reversed Phases of a Nearby Connection 1 Discovery : Bluetooth BR/EDR name and BLE reports 2 Connection Request : Bluetooth BR/EDR, not authenticated 3 Key Exchange Protocol : establishment of a shared secret 4 Optional Authentication : based on the shared secret 5 Application Layer Connection Establishment : interactive 6 Key Derivation Functions : session, AES and HMAC keys 7 Optional Physical Layer Switch : Bluetooth BR/EDR to Wi-Fi 8 Exchange Encrypted Payloads : 30 seconds timeout 9 Disconnection Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 8

  18. Key Exchange Protocol (KEP) Client Server C S Generate sk C , pk C Generate sk S , pk S Pick N C Pick N S c C = Hash( pk C ) Kep 1 : 1, endpointId , ncname , version Kep 2 : 2, N C , c C , algo Kep 3 : 3, N S , pk S Kep 4 : 4, pk C ( S x , S y ) = sk C · pk S Verify c C ( S x , S y ) = sk S · pk C • Based on ECDH, NIST P256 curve, shared secret is S x Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 9

  19. Optional Physical Layer Switch • Bluetooth to soft access point (Wi-Fi Direct, hostapd) ◮ Server instructs the client over Bluetooth ◮ Client contacts the server over Wi-Fi Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android RE 10

  20. Range Extension MitM Attack Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 11

  21. Range Extension MitM Attack Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 12

  22. Soft Access Point Manipulation Attack Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 13

  23. Victim Connects to Attacker’s REarby Server Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 14

  24. Attacker Manipulates Bluetooth to Wi-Fi Switch Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 15

  25. Victim Connects to Attacker’s Wi-Fi AP Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 16

  26. Attacker Configures Victim’s Network Interface Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 17

  27. Attacker Eavesdrops All Wi-Fi Traffic Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Attacks 18

  28. Conclusions • First security analysis of Nearby Connections • Reversed its Android implementation and re-implemented it (REarby) • Range extension and soft access point manipulation attacks • Try the Soft Access Point Manipulation attack: https://github.com/francozappa/REarby/tree/master/poc-hostapd Daniele Antonioli Nearby Threats: Reversing, Analyzing and Attacking Google’s ’Nearby Connections’ on Android Conclusions 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend