SlideShare a Scribd company logo
MAN IN THE BINDER:
HE WHO CONTROLS IPC, CONTROLS THE DROID
Nitay Artenstein - nitaya@checkpoint.com
Idan Revivo - idanr@checkpoint.com
Who Are We?
Nitay Artenstein Idan Revivo
• Researcher at Check
Point
• Used to do
pentesting in Africa
(with a machete)
• Now does more risky
stuff, such as kernel
exploits
• Researcher at Check
Point
• When he’s not
breaking Android,he
breaks his trainees at
the gym
• Contributorto
Cuckoo Project
Overview
ev·o·lu·tion
n. A gradual process in which something changes
into a different and usually more complex or better
form
Malware on Windows
Malware on Android
Why the Big Difference?
• The sandbox
• Android is a complicatedenvironment
• Do we work in Java? JNI? C? Native ARM?
How to Write Malware in this Mess?
Welcome to Binder
• Android Malware Today
• Developer Point-of-View
• What is Binder?
• Man In The Binder Attacks
• Possible Solutions
Agenda
Android Malware Attacks
What Do Mobile Malware Authors Want?
• Sending SMS to premium numbers
• Location tracking
• Secondary APK installation
• Link clicking
• Bank fraud
• Stealing personal information
• Etc..
Android Malware Evolution
Android
Was Born
•9/2008
Fake Player
•8/2010
•First SMS Trojan
•Just asks for
SEND_SMS
permission
DroidDream
•3/2011
•Uses root
exploits
•Installs secondary
APK
•50 variants in app
store
Spitmo– Zeus
goesmobile
•3/2011
•Banking malware
Obad – The most
sophisticated
Android trojan
•6/2013
•3 exploits
•1 backdoor
•SMS Trojan
Dendroid –
Android
RAT
•5/2014
Keylogging – Swapping the Keyboard
Intercepting SMS – Just Ask Politely
Location Tracking – Again Just Ask Politely
Developer Point-of-View
• Android is built on top of the Linux kernel
• An application doesn’t talk to hardware
• Talking to the system – only via IPC
Android Architecture Basics
• Each app runs with its own uid
• Privileges are given upon app installation
• Each privilege translates into a gid
The Sandbox
Man in the Binder
What is Binder?
Return of the Microkernel
• Minimalist kernel, less attack surface
• Monolithic kernels won the war
• How to get the benefits of a microkernel anyway?
Andrew S. Tanenbaum Dianne Hackborn Darth Vader
IPC is the Key
• Isolate the kernel from user apps
• Implement system servers in userland
• Control all communication via Binder
Man in the Binder
Man in the Binder
Why Target Binder?
• Stealthy, difficult to detect
• Portable data interception
• Integration with the system architecture
Ready for Some Fun?
First Attack: Keylogger
Keyloggers, the Binder Way
• A thread in an app sets up a listener
• It is contacted by the InputContext interface
when the user hits a key
• All communicationis done via Binder
Man in the Binder
Keylogging Demo
Second Attack: Data Grabbing
The Secret About Activities
• Most secure applicationsprotect their data
• However, developers don’t bother to encrypt
data moving between in-app Activities
• Surprise: This data goes through Binder
Yes, in-app data goes through Binder
…and we got the hex dump to prove it
Form Grabbing Demo
Third Attack: Intercepting SMS
What Happens When You Get An SMS?
• The Telephony Manager notifies the SMS app
• The app queries the TM’s database
• The response is sent back as a Cursor object
• …but that’s just a file descriptor!
Let’s Grab It!
SMS Interception Demo
• Do as much as you can in-app
• Audit your app to see what goes to IPC
• If it goes through Binder, encrypt it
How Do I Protect Myself?
Questions?

More Related Content

PDF
Behavior-Based Defense in ICS
PDF
IoT Attack Surfaces -- DEFCON 2015
PDF
How to Respond to Industrial Intrusions
PDF
The IoT Attack Surface
PDF
2012 12-04 --ncc_group_-_mobile_threat_war_room
PDF
What happened on October 21
PDF
Jakub Bartoszek (Samsung Electronics) - Hardware Security in Connected World
PDF
DevSecCon Asia 2017 Ante Gulam: Integrating crowdsourced security into agile ...
Behavior-Based Defense in ICS
IoT Attack Surfaces -- DEFCON 2015
How to Respond to Industrial Intrusions
The IoT Attack Surface
2012 12-04 --ncc_group_-_mobile_threat_war_room
What happened on October 21
Jakub Bartoszek (Samsung Electronics) - Hardware Security in Connected World
DevSecCon Asia 2017 Ante Gulam: Integrating crowdsourced security into agile ...

What's hot (20)

PPTX
The Four Types of Threat Detection and Use Cases in Industrial Security
PPT
Emerging Threats and Strategies of Defense
PDF
UMS Cybersecurity Awareness Seminar: Cybersecurity - Lessons learned from sec...
PPTX
Advanced Security Testing in the Age of Cyber War
PDF
RSA2015: Securing the Internet of Things
PPTX
Secure application deployment in the age of continuous delivery
PPTX
Debunking the Hacker Hype: The Reality of Widespread Blackouts
PDF
The Changing Landscape of Information Security
PPTX
Security in the Age of Open Source
PPTX
Encryption in the Public Cloud: 16 Bits of Advice for Security Techniques
PPTX
Internet Accessible ICS in Japan (English)
PDF
To see things others can't - APTs, Incident Response, DDoS
PPTX
Secure application deployment in Apache CloudStack
PPTX
Cyber security and its defence (updated)
PPTX
Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017
PDF
Reassessing the 2016 CRASHOVERRIDE Cyber Attack
PDF
DeepLocker - Concealing Targeted Attacks with AI Locksmithing
PDF
Akila srinivasan microsoft-bug_bounty-(publish)
PPTX
September 2012 Security Vulnerability Session
PPTX
The road goes ever on and on by Ciaran Conliffe
The Four Types of Threat Detection and Use Cases in Industrial Security
Emerging Threats and Strategies of Defense
UMS Cybersecurity Awareness Seminar: Cybersecurity - Lessons learned from sec...
Advanced Security Testing in the Age of Cyber War
RSA2015: Securing the Internet of Things
Secure application deployment in the age of continuous delivery
Debunking the Hacker Hype: The Reality of Widespread Blackouts
The Changing Landscape of Information Security
Security in the Age of Open Source
Encryption in the Public Cloud: 16 Bits of Advice for Security Techniques
Internet Accessible ICS in Japan (English)
To see things others can't - APTs, Incident Response, DDoS
Secure application deployment in Apache CloudStack
Cyber security and its defence (updated)
Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017
Reassessing the 2016 CRASHOVERRIDE Cyber Attack
DeepLocker - Concealing Targeted Attacks with AI Locksmithing
Akila srinivasan microsoft-bug_bounty-(publish)
September 2012 Security Vulnerability Session
The road goes ever on and on by Ciaran Conliffe
Ad

Viewers also liked (9)

PPTX
Next Gen Innovation
PDF
7 factors determining deeper impact of ar based mobile application on user ex...
PPTX
Histórico da EJA
PPTX
Lync integration with metro app
PPTX
Biografia - Paulo Freire
PPT
Android overview
PDF
Binderのはじめの一歩とAndroid
PDF
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
ODP
Android crash debugging
Next Gen Innovation
7 factors determining deeper impact of ar based mobile application on user ex...
Histórico da EJA
Lync integration with metro app
Biografia - Paulo Freire
Android overview
Binderのはじめの一歩とAndroid
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
Android crash debugging
Ad

Similar to Man in the Binder (10)

PPTX
Man in the Binder
PDF
Binding android piece by piece
PDF
Csw2016 chaykin having_funwithsecuremessengers_and_androidwear
PDF
7. Attacking Android Applications (Part 2)
PDF
Android_Malware_IOAsis_2014_Analysis.pdf
PPT
Outsmarting SmartPhones
PDF
Amir goldstein mobmodcon-nov2015-binder under the hood
PPTX
IPC: AIDL is not a curse
ODP
Android security in depth
PPTX
Mobile security
Man in the Binder
Binding android piece by piece
Csw2016 chaykin having_funwithsecuremessengers_and_androidwear
7. Attacking Android Applications (Part 2)
Android_Malware_IOAsis_2014_Analysis.pdf
Outsmarting SmartPhones
Amir goldstein mobmodcon-nov2015-binder under the hood
IPC: AIDL is not a curse
Android security in depth
Mobile security

Man in the Binder

  • 1. MAN IN THE BINDER: HE WHO CONTROLS IPC, CONTROLS THE DROID Nitay Artenstein - nitaya@checkpoint.com Idan Revivo - idanr@checkpoint.com
  • 2. Who Are We? Nitay Artenstein Idan Revivo • Researcher at Check Point • Used to do pentesting in Africa (with a machete) • Now does more risky stuff, such as kernel exploits • Researcher at Check Point • When he’s not breaking Android,he breaks his trainees at the gym • Contributorto Cuckoo Project
  • 4. ev·o·lu·tion n. A gradual process in which something changes into a different and usually more complex or better form
  • 7. Why the Big Difference? • The sandbox • Android is a complicatedenvironment • Do we work in Java? JNI? C? Native ARM?
  • 8. How to Write Malware in this Mess?
  • 10. • Android Malware Today • Developer Point-of-View • What is Binder? • Man In The Binder Attacks • Possible Solutions Agenda
  • 12. What Do Mobile Malware Authors Want? • Sending SMS to premium numbers • Location tracking • Secondary APK installation • Link clicking • Bank fraud • Stealing personal information • Etc..
  • 13. Android Malware Evolution Android Was Born •9/2008 Fake Player •8/2010 •First SMS Trojan •Just asks for SEND_SMS permission DroidDream •3/2011 •Uses root exploits •Installs secondary APK •50 variants in app store Spitmo– Zeus goesmobile •3/2011 •Banking malware Obad – The most sophisticated Android trojan •6/2013 •3 exploits •1 backdoor •SMS Trojan Dendroid – Android RAT •5/2014
  • 14. Keylogging – Swapping the Keyboard
  • 15. Intercepting SMS – Just Ask Politely
  • 16. Location Tracking – Again Just Ask Politely
  • 18. • Android is built on top of the Linux kernel • An application doesn’t talk to hardware • Talking to the system – only via IPC Android Architecture Basics
  • 19. • Each app runs with its own uid • Privileges are given upon app installation • Each privilege translates into a gid The Sandbox
  • 22. Return of the Microkernel • Minimalist kernel, less attack surface • Monolithic kernels won the war • How to get the benefits of a microkernel anyway? Andrew S. Tanenbaum Dianne Hackborn Darth Vader
  • 23. IPC is the Key • Isolate the kernel from user apps • Implement system servers in userland • Control all communication via Binder
  • 26. Why Target Binder? • Stealthy, difficult to detect • Portable data interception • Integration with the system architecture
  • 29. Keyloggers, the Binder Way • A thread in an app sets up a listener • It is contacted by the InputContext interface when the user hits a key • All communicationis done via Binder
  • 33. The Secret About Activities • Most secure applicationsprotect their data • However, developers don’t bother to encrypt data moving between in-app Activities • Surprise: This data goes through Binder
  • 34. Yes, in-app data goes through Binder
  • 35. …and we got the hex dump to prove it
  • 38. What Happens When You Get An SMS? • The Telephony Manager notifies the SMS app • The app queries the TM’s database • The response is sent back as a Cursor object • …but that’s just a file descriptor!
  • 41. • Do as much as you can in-app • Audit your app to see what goes to IPC • If it goes through Binder, encrypt it How Do I Protect Myself?