everything goes through the binder
play

Everything Goes Through The Binder A Hack in Three Acts Act I Know - PowerPoint PPT Presentation

MAN IN THE BINDER: HE WHO CONTROLS IPC, CONTROLS THE DROID Everything Goes Through The Binder A Hack in Three Acts Act I Know Your Droid Act II Atuack Your Droid Act III Prepare Your Droid Meet The Cast The Authors Nitay


  1. MAN IN THE BINDER: HE WHO CONTROLS IPC, CONTROLS THE DROID Everything Goes Through The Binder

  2. A Hack in Three Acts Act I – Know Your Droid Act II – Atuack Your Droid Act III – Prepare Your Droid

  3. Meet The Cast

  4. The Authors Nitay Artenstein Idan Revivo Michael Shalyt

  5. Victim App Name: Kituy Bank Occupatjon: Bank Applicatjon “U want KitCoins – we haz it”

  6. n00b attacker Name: Kituy-ninja Occupatjon: Script kiddy “Mommy, can I rob this bank?”

  7. Ninja Attacker Name: Paw of Death Occupatjon: Black belt ninja hacker “To rob a bank, you must fjrst become the bank”

  8. System Services Name: System Service Occupatjon: Sittjng and waitjng to serve your needs These things run Android!

  9. The Linux Kernel Name: $ echo `uname –r` Occupatjon: Holding the world on its shoulders since 1.1.1970 Feeling neglected now that system services get all the atuentjon on Android

  10. The Binder Name: The Binder Occupatjon: All Powerful ? Mystery Character Everything Goes Through The Binder

  11. Act I Know Your Droid

  12. An Applicatjon’s Life On Windows Syscalls

  13. An Applicatjon’s Life On Android ? Syscalls Syscalls Syscalls

  14. Android – The Real Picture ? Syscalls Syscalls Everything Goes Through The Binder

  15. Bank Applicatjon Process System Service Process • Binder has a userland DalvikVM DalvikVM component and a kernel applicatjon applicatjon System Service System Service one System services System services proxy proxy • The driver receives the libandroid_runtjme.so libandroid_runtjme.so Parcel via an ioctl syscall libandroid_runtjme.so /system/lib*.so libandroid_runtjme.so /system/lib*.so and sends it to the target libbinder.so /system/libbinder.so libbinder.so /system/libbinder.so kernel processes syscall parcel parcel /dev/tuy0 /dev/binder

  16. What’s a Parcel?

  17. A Short Recap Audio Manager Kituy Bank Process DalvikVM Parcels Syscalls Parcels libbinder.so libbinder.so

  18. Everything Goes Through The Binder

  19. Act II Attack Your Droid

  20. Round I Key Logging

  21. A n00b Atuacker’s View of The System ?

  22. What Would The n00b Atuacker Do? !

  23. What Would The n00b Atuacker Do? !

  24. What Would The n00b Atuacker Do? !@#$

  25. A Ninja Atuacker’s View of The System ? Everything Goes Through The Binder

  26. What Would The Ninja Atuacker Do? !

  27. Key Logger Demo

  28. What Would The Ninja Atuacker Do? w00t

  29. Round II Data Manipulatjon

  30. A n00b Atuacker’s View of The System ? Actjvity Actjvity Actjvity

  31. What Would The n00b Atuacker Do? Bye Kituy Bank , Hello Shi**y Bank !

  32. What Would The n00b Atuacker Do? Bye Kituy Bank , Hello Shi**y Bank !@#$

  33. A Ninja Atuacker’s View of The System Actjvity Manager ? Everything Goes Through The Binder

  34. In-app data goes through Binder???

  35. A Ninja Atuacker’s View of The System Actjvity Manager ?

  36. What Would The Ninja Atuacker Do? Actjvity Manager !

  37. A trillion dollars, anyone?

  38. Data Manipulatjon Demo

  39. What Would The Ninja Atuacker Do? w00t

  40. Round III Interceptjng SMS

  41. A n00b Atuacker’s View of The System ? Telephony Manager

  42. What Would The n00b Atuacker Do? ! Just Ask Politely

  43. What Would The n00b Atuacker Do? !@#$ Just Ask Politely

  44. A Ninja Atuacker’s View of The System ? Telephony Manager Everything Goes Through The Binder

  45. What Would The Ninja Atuacker Do? !

  46. SMS internals • The Telephony Manager notjfjes the SMS app whenever an SMS is received • The app queries the TM’s database via Binder:

  47. SMS internals • But what’s a Cursor object? • It’s a messy abstractjon of a response to a query

  48. SMS internals • Surprise: Under the hood, it’s just a Unix fd • Now we’re in business!

  49. What Would The Ninja Atuacker Do? w00t

  50. Summary What Just Happened?

  51. Atuacking The Binder • Hook libbinder.so at the point where it sends an ioctl to the kernel • Stealth: dozens of places to hook • But don’t you need root?

  52. Atuacking The Binder Vulnerable to known rootjng exploits

  53. Consider The Possibilitjes

  54. Summary Features: • Versatjlity: one hook – multjple functjonalitjes. • App agnostjc: no need to RE apps. • Stealth: the Android security model limits 3 rd party security apps just like any other app.

  55. Summary • This is NOT a vulnerability. It’s like man-in-the- browser, but for literally everything on Android. • Root is assumed. Rootjng won’t go away any tjme soon.

  56. Rumors (You didn’t hear it from me…)

  57. What are you trying to tell me? That I can get all permissions on a device? No. I’m trying to tell you that when you’re ready, you won’t have to

  58. Act III Preparing Your Droid

  59. Solutjons – for developers • Take control of your own process memory space. • Minimize the amount of data going to IPC, and encrypt what has to go.

  60. Solutjons – for security industry • Scan fjles like it’s the 90’s. • Be brave – get root yourself: • Runtjme process scanning and monitoring. • Sofuware fjrewall (like Avast). • Binder fjrewall/anomaly detectjon. • Etc.

  61. Further Reading [1] White paper: “Man in the Binder”, Artenstein and Revivo [2] “On the Reconstructjon of Android Malware Behaviors”, Fatori, Tam et al [3] “Binderwall: Monitoring and Filtering Android Interprocess Communicatjon”, Hausner

Recommend


More recommend