evil maid on droids
play

evil maid on droids or why you should never loose your android - PowerPoint PPT Presentation

evil maid on droids or why you should never loose your android smartphone @f0rki 2012-12-06 Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 2 / 51 Agenda


  1. evil maid on droids or why you should never loose your android smartphone @f0rki 2012-12-06

  2. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 2 / 51

  3. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 3 / 51

  4. evil maids wat? 4 / 51

  5. evil maids wat? 1. device left at hotel room 4 / 51

  6. evil maids wat? 1. device left at hotel room 2. maid comes in 4 / 51

  7. evil maids wat? 1. device left at hotel room 2. maid comes in 3. maid installs malware, fetches data, etc. 4 / 51

  8. evil maids wat? 1. device left at hotel room 2. maid comes in 3. maid installs malware, fetches data, etc. 4. ??? 4 / 51

  9. evil maids wat? 1. device left at hotel room 2. maid comes in 3. maid installs malware, fetches data, etc. 4. ??? 5. PROFIT!!! 4 / 51

  10. targets � laptop is classic target � full disk encryption as mitigation 5 / 51

  11. targets � laptop is classic target � full disk encryption as mitigation � modify unencrypted bootloader/kernel 5 / 51

  12. targets � laptop is classic target � full disk encryption as mitigation � modify unencrypted bootloader/kernel � secure boot as mitigation � EFI SecureBoot on x86 PCs/Notebook � Reduced access on embedded devices 5 / 51

  13. a new victim arises 6 / 51

  14. a new victim arises picture: thx sofie <3 6 / 51

  15. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 8 / 51

  16. partition layout � /system : OS binaries and config, android, framework � /data : user-installed apps, all user data � boot: kernel, fs root / � recovery : recovery system � cache : dalvik cache, other cached data � /sdcard /mnt/storage : music, videos, whatever . . . Actual layout depends on device 9 / 51

  17. android boot process for HTC/Qualcomm devices: 1. baseband processor starts primary boot loader (PBL) 10 / 51

  18. android boot process for HTC/Qualcomm devices: 1. baseband processor starts primary boot loader (PBL) 2. PBL starts secondary boot loader (SBL) 10 / 51

  19. android boot process for HTC/Qualcomm devices: 1. baseband processor starts primary boot loader (PBL) 2. PBL starts secondary boot loader (SBL) 3. app processor bootup – HBOOT bootloader 10 / 51

  20. android boot process for HTC/Qualcomm devices: 1. baseband processor starts primary boot loader (PBL) 2. PBL starts secondary boot loader (SBL) 3. app processor bootup – HBOOT bootloader 4. HBOOT loads kernel/recovery 10 / 51

  21. security? – locked bootloaders for HTC/Qualcomm devices: 1. baseband processor starts primary boot loader (PBL) verifies signature of sbl 2. PBL starts secondary boot loader (SBL) verifies baseband code and HBOOT 3. app processor bootup – HBOOT bootloader 4. HBOOT loads kernel/recovery verifies signature on kernel/recovery 11 / 51

  22. bootloader unlocking � disables signature checking/verification in boot process � allows booting of third-party code → yay, custom ROMS! 12 / 51

  23. bootloader unlocking � disables signature checking/verification in boot process � allows booting of third-party code → yay, custom ROMS! � bootloader unlocking � using fastboot tool f a s t b o o t oem unlock � usually does factory reset � erases /data/ � remove device settings (e.g. saved wifi passwords) � might need some proprietary tool or an exploit for unlocking 12 / 51

  24. HTC S-ON/S-OFF � system, kernel, recovery is hardware-write-protected � “temp root” – rooted phones will be unrooted at next boot � bootloader unlocking – S-OFF � submit device-specific token � flash signed blob � voids warranty � unpublished exploit: revolutionary 13 / 51

  25. fastboot and co � fastboot � “standard” protocol from AOSP � implemented in app processor bootloader (e.g. HBOOT) � can flash images to partitions � can directly boot kernels � other proprietary protocols/tools exist � nvflash for Tegra devices � old Motorola: SBF + miniloader � flash images via usb-exported-ramdisk (archos) � etc. . . 14 / 51

  26. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 15 / 51

  27. assumptions � device has set a PIN/password/pattern � else you are totally f**cked anyway � face-unlock also sucks � typical smartphone usage � google, facebook, twitter account set up � access to storage device not possible � because of encryption � hardware protection � attacker can’t solder ;) 16 / 51

  28. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 17 / 51

  29. prerequisites � stock ROM � no adb � no root 18 / 51

  30. pull sdcard 19 / 51

  31. pull sdcard how? � pull sdcard � dump everything 20 / 51

  32. pull sdcard how? � pull sdcard � dump everything what? � personal data (pictures, music) � apps2sd � e.g. /sdcard/Android/data/ � app backups � probably nothing really critical � company phone – company data??? 20 / 51

  33. what about nexus s? � there’s no sdcard! 21 / 51

  34. what about nexus s? � there’s no sdcard! � only internal storage � accessible via media transfer protocol (mtp) � access only when unlocked � restricted access to data 21 / 51

  35. smudge patterns I 22 / 51

  36. smudge patterns II 23 / 51

  37. old news. . . boring stuff. . . 24 / 51

  38. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 25 / 51

  39. prerequisites � phone used personally and for development � stock ROM � no root � adb enabled 26 / 51

  40. install malware � create and install malicious app pulling all possible data adb i n s t a l l com . example . AngryBirdsStarTrek . apk 27 / 51

  41. install malware � create and install malicious app pulling all possible data adb i n s t a l l com . example . AngryBirdsStarTrek . apk � still restricted access � give malware every possible android permission � still no access to most of /data/ � no system or systemOrSignature level permissions � pull � personal data � contacts/texts 27 / 51

  42. disabling keyguard via app 28 / 51

  43. disabling keyguard via app KeyguardManager keyguardManager = ( KeyguardManager ) getSystemService ( Context .KEYGUARD_SERVICE) ; KeyguardLock mkeyguardLock = keyguardManager . newKeyguardLock ( " unlock " ) ; mkeyguardLock . disableKeyguard () ; 28 / 51

  44. disabling keyguard via app KeyguardManager keyguardManager = ( KeyguardManager ) getSystemService ( Context .KEYGUARD_SERVICE) ; KeyguardLock mkeyguardLock = keyguardManager . newKeyguardLock ( " unlock " ) ; mkeyguardLock . disableKeyguard () ; � hitting back/home button might enable keyguard again � depending on the device and the rom � might also get you to launcher activity (=win!) 28 / 51

  45. disabling keyguard via app KeyguardManager keyguardManager = ( KeyguardManager ) getSystemService ( Context .KEYGUARD_SERVICE) ; KeyguardLock mkeyguardLock = keyguardManager . newKeyguardLock ( " unlock " ) ; mkeyguardLock . disableKeyguard () ; � hitting back/home button might enable keyguard again � depending on the device and the rom � might also get you to launcher activity (=win!) � solution: launch other activities/intents via our malicious app so no problem ;) 28 / 51

  46. intercepting login credentials 1. install custom ca cert 2. set proxy in network settings 3. launch intercepting proxy 4. grab stuff � google auth token � facebook token, password � etc. 29 / 51

  47. intercepting login credentials 1. install custom ca cert 2. set proxy in network settings 3. launch intercepting proxy 4. grab stuff � google auth token � facebook token, password � etc. � no cert errors, since we installed a trusted CA cert � unfortunately not everything uses system proxy � gapps, facebook work fine 29 / 51

  48. grabbing google auth token using the mitmproxy tool 30 / 51

  49. google backups � so we have the google auth token 32 / 51

  50. google backups � so we have the google auth token 32 / 51

  51. google backups � so we have the google auth token � adding auth token to rooted phone → provides access to everything backed up to google (in plaintext) 32 / 51

  52. so still no root. . . 33 / 51

  53. so still no root. . . � well. . . 33 / 51

  54. so still no root. . . � well. . . get root! � root via adb restore by Bin4ry (for Android 4.0 and 4.1) � mempodroid � ZergRush � Gingerbreak � . . . 33 / 51

  55. Agenda evil maids detour: the android boot process attack scenarios unrooted phones adb access rooted phones protecting yourself 34 / 51

  56. prerequisites � rooted phone � custom ROM, recovery � adb access 35 / 51

  57. well. . . . . . you are totally screwed! 36 / 51

  58. well. . . . . . you are totally screwed! 36 / 51

  59. the attack adb p u l l / data / data / adb p u l l / system / data / 37 / 51

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