SlideShare a Scribd company logo
Logistics

Healthcare

Automotive

Industrial Automation

Android Security in depth
Sander Alberink

Machine & Systems

Energy
Agenda
 Android overview
 System-level security
 Application-level security
 Enterprise-level security
Show of hands...
Who has...
■
■
■
■

4

An Android device?
Loaded a custom ROM?
Rooted his device?
Developed for that device?

27 januari 2014

Android Security in depth
Android Security – System level
Android system architecture
System level execution
 NX-bit
 Stack-overflow prevention
 Address Space Layout Randomization
 dlmalloc/calloc + extensions
 mmap_min_addr
 Avoid leaking kernel pointer addresses
Linux security measures
 Sandboxing in kernel
 Permissions enforced through linux groups
 Each app separate UID
Dalvik VM
 Not a security boundary
■ No security manager
■ Permissions are
enforced in OS, not VM
■ Bytecode verification
optimized for speed, not
security
■ Every app can execute
native code!
Zygote processes
 Zygote process preloads typical classes and
dynamic link libraries
 Copy-on-write
■ Only when new process writes page, new
page is allocated.
■ All pages not be written are shared
among all zygote children.
 Exec system call is not used in zygote.
■ wipes the page mapping table of process.
■ It means exec discards zygote cache.
 Runs as UID=0 (root). After forking child
process, its UID is changed by setuid
system call.
Binder IPC
■ IPC via kernel interface
■ Used under water for all IPC in Android
• Service to application
• Service to system
• But also Intent-based communication...
■ Is security-aware and passes calling UID & GID

11

27 januari 2014

Powerpoint ICT Automatisering
Additional measures in Android 4.2
 Application verification
■ Additional scan for
malicious sw
 Always-on VPN
 Improvements to
installd/init handling, etc
Bouncer
 Checks every app submitted to store
(before publication)
 Runs app for 5 minutes in emulator,
exercising UI
 If flagged: manual analysis
 Combination of dynamic/static
analysis
 Submit flagged apps too many times
→ blocked account
Additional measures in Android 4.3
 Android sandbox reinforced with SELinux.
 No setuid/setgid programs.
 ADB Authentication.
 Restrict Setuid from Android Apps.
 Capability bounding.
 AndroidKeyStore Provider.
Additional measures in Android 4.3 cont'd
 KeyChain isBoundKeyAlgorithm.
 NO_NEW_PRIVS. (This requires Linux kernel version 3.5
or greater)
 FORTIFY_SOURCE enhancements.
 Relocation protections.
 Improved EntropyMixer.
 Security Fixes.
Additional measures in Android 4.4
 Android sandbox reinforced with SELinux in enforcing
mode.
 Per-user VPN
 ECDSA Provider support in AndroidKeyStore.
 Device Monitoring Warnings
 FORTIFY_SOURCE level 2
 Certificate Pinning
 Verified boot
 Security Fixes
Verified boot
 Used to verify underlying
boot image is not
corrupted
 Optional feature

SE Linux/Android
 Mandatory Access Control (MAC) for Linux
 Enforces a system-wide security policy
 Over all processes, objects, and operations
 Based on security labels
 Can confine flawed and malicious applications
 Even ones that run as “root” / uid 0.
 Can prevent privilege escalation
Difference between DAC and MAC
 DAC: owner of object (f.i. files) determines access level
 MAC: system determines access level

system_app

radio

trusted_app

kernel

nfc
Android Security – Application level
Intent system
 Communication between OS and
applications via Intents
 OS resolves requested action
(e.g. 'edit contact') with all
registered Intent receivers
 Highly versatile and modular
 Allows changing out default
functionality for alternatives
Permissions
 Permissions determine if
an app can perform an
action
 4 levels:
■ Normal
■ Dangerous
■ Signature
■ System
Permissions cont'd
 Permissions checked when:
■ Starting activities
■ Starting/binding to services
■ Sending to BroadcastReceivers
■ Accessings ContentProviders (separate for read and
write
■ … and at any given moment using
Context.checkCallingPermission()
App signing
All Android applications must be signed by the author (developer)
 Signing: process of digitally signing a given application using a private key to:
■ Identify author
■ Detect changes
■ Establish trust between applications
On Android, certificate (X.509) can be self-signed, no need for a certificate
authority
Android applications can be built in debug and release-mode:
 In debug mode the app is automatically signed with debug key and cannot be
distributed (e.g. via Google Play)
 In release-mode app is signed with private key of developer.
Android Security – Enterprise level
Encryption
 Full-disk encryption using dm-crypt
■ Actually: /data partition
 Done using 128 bit AES/SHA256
 Master key encrypted with another key based off device
PIN/passwd
■ Problem: since PIN is usually 4 digits long, cracking
master key is matter of little time...
Device Policies
 Determine user-level
security
 Locate lost devices
 Enable remote wipe
 Can disable functionality
(such as camera)
VPN
 Support for VPN connections based on
■ IPSec
■ PPTP
■ Own VPN implementation (3rd party, 4.0+)
 Requires use of device lock mechanism
 As of Android 4.2, always-on VPN is possible too
Manufacturer solutions
 Samsung KNOX
■ Based on SE Android with additional policies
■ Separate USER and Work partitions
■ Verified boot
■ Per-app VPN
■ More comprehensive mobile device management
Questions?
Android security in depth - extended

More Related Content

PPTX
Permission in Android Security: Threats and solution
Tandhy Simanjuntak
 
ODP
Android security in depth
Sander Alberink
 
PDF
Introduction to Android Development and Security
Kelwin Yang
 
PPTX
Android Security
Arqum Ahmad
 
PPTX
Android sandbox
Anusha Chavan
 
PPT
Analysis and research of system security based on android
Ravishankar Kumar
 
PPTX
Android security
Midhun P Gopi
 
PPT
Android Security
Suminda Gunawardhana
 
Permission in Android Security: Threats and solution
Tandhy Simanjuntak
 
Android security in depth
Sander Alberink
 
Introduction to Android Development and Security
Kelwin Yang
 
Android Security
Arqum Ahmad
 
Android sandbox
Anusha Chavan
 
Analysis and research of system security based on android
Ravishankar Kumar
 
Android security
Midhun P Gopi
 
Android Security
Suminda Gunawardhana
 

What's hot (20)

PPTX
A Closer Look on C&C Panels
Tandhy Simanjuntak
 
PDF
Смирнов Александр, Security in Android Application
SECON
 
PDF
Deep Dive Into Android Security
Marakana Inc.
 
PPT
MIT-6-determina-vps.ppt
webhostingguy
 
PDF
Android Security
Lars Jacobs
 
PDF
CNIT 128 6. Analyzing Android Applications (Part 3 of 3)
Sam Bowne
 
PPTX
Android security
Mobile Rtpl
 
PDF
Android Security
Mehrnaz Amoon
 
PPT
Understanding Android Security
Asanka Dilruk
 
PDF
Android security
Mohamed Alharbi
 
PPTX
Windows Phone 8 Security Deep Dive
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPTX
SYMANTEC ENDPOINT PROTECTION Administration Introduction
Dsunte Wilson
 
PDF
Android security - an enterprise perspective
Pietro F. Maggi
 
PPTX
Android secure offline storage - CC Mobile
Steve De Zitter
 
PDF
2015.04.24 Updated > Android Security Development - Part 1: App Development
Cheng-Yi Yu
 
PDF
Android Camp 2011 @ Silicon India
Avinash Birnale
 
PDF
Sperasoft talks: Android Security Threats
Sperasoft
 
PDF
Android security maximized by samsung knox
Javier Gonzalez
 
PPTX
Commix
nullowaspmumbai
 
PPTX
Mdm with config mgr nico
Dieter Wijckmans
 
A Closer Look on C&C Panels
Tandhy Simanjuntak
 
Смирнов Александр, Security in Android Application
SECON
 
Deep Dive Into Android Security
Marakana Inc.
 
MIT-6-determina-vps.ppt
webhostingguy
 
Android Security
Lars Jacobs
 
CNIT 128 6. Analyzing Android Applications (Part 3 of 3)
Sam Bowne
 
Android security
Mobile Rtpl
 
Android Security
Mehrnaz Amoon
 
Understanding Android Security
Asanka Dilruk
 
Android security
Mohamed Alharbi
 
SYMANTEC ENDPOINT PROTECTION Administration Introduction
Dsunte Wilson
 
Android security - an enterprise perspective
Pietro F. Maggi
 
Android secure offline storage - CC Mobile
Steve De Zitter
 
2015.04.24 Updated > Android Security Development - Part 1: App Development
Cheng-Yi Yu
 
Android Camp 2011 @ Silicon India
Avinash Birnale
 
Sperasoft talks: Android Security Threats
Sperasoft
 
Android security maximized by samsung knox
Javier Gonzalez
 
Mdm with config mgr nico
Dieter Wijckmans
 
Ad

Viewers also liked (8)

PDF
Logistics security 201505 lin
Danie Schoeman
 
PPTX
Ipc
Spoorthi Sham
 
PDF
unix interprocess communication
guest4c9430
 
PDF
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthinkspa
 
PPT
Next Generation Security
neoma329
 
PPT
Ipc ppt
Ruchi Sharma
 
PPTX
Android seminar ppt
chakrapani tripathi
 
PPTX
Presentation on Android operating system
Salma Begum
 
Logistics security 201505 lin
Danie Schoeman
 
unix interprocess communication
guest4c9430
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthinkspa
 
Next Generation Security
neoma329
 
Ipc ppt
Ruchi Sharma
 
Android seminar ppt
chakrapani tripathi
 
Presentation on Android operating system
Salma Begum
 
Ad

Similar to Android security in depth - extended (20)

PPTX
Mobile security
priyanka pandey
 
PPTX
Android security
BehzadBeigzadeh
 
PPTX
Understanding android security model
Pragati Rai
 
PDF
Brief Tour about Android Security
National Cheng Kung University
 
PDF
CodeMotion tel aviv 2015 - burning marshmallows
Ron Munitz
 
PDF
Android N Security Overview - Mobile Security Saturday at Ciklum
Constantine Mars
 
PPT
Securely Deploying Android Device - ISSA (Ireland)
Angelill0
 
PDF
Securing Android
Marakana Inc.
 
PPTX
Android OS & Security.pptx
BhumiAvhad1
 
PPTX
128-ch4.pptx
SankalpKabra
 
PDF
CNIT 128 Ch 4: Android
Sam Bowne
 
PPTX
[Wroclaw #1] Android Security Workshop
OWASP
 
PDF
6. Analyzing Android Applications Part 2
Sam Bowne
 
PPTX
Security testing of mobile applications
GTestClub
 
PDF
Android Security
Robin De Croon
 
PDF
MobSecCon 2015 - Burning Marshmallows
Ron Munitz
 
PPTX
Hacker Halted 2014 - Reverse Engineering the Android OS
EC-Council
 
PDF
CNIT 128 6. Analyzing Android Applications (Part 2 of 3)
Sam Bowne
 
PDF
Security in Android Applications / Александр Смирнов (RedMadRobot)
Ontico
 
PDF
Maemo 6 Platform Security
Peter Schneider
 
Mobile security
priyanka pandey
 
Android security
BehzadBeigzadeh
 
Understanding android security model
Pragati Rai
 
Brief Tour about Android Security
National Cheng Kung University
 
CodeMotion tel aviv 2015 - burning marshmallows
Ron Munitz
 
Android N Security Overview - Mobile Security Saturday at Ciklum
Constantine Mars
 
Securely Deploying Android Device - ISSA (Ireland)
Angelill0
 
Securing Android
Marakana Inc.
 
Android OS & Security.pptx
BhumiAvhad1
 
128-ch4.pptx
SankalpKabra
 
CNIT 128 Ch 4: Android
Sam Bowne
 
[Wroclaw #1] Android Security Workshop
OWASP
 
6. Analyzing Android Applications Part 2
Sam Bowne
 
Security testing of mobile applications
GTestClub
 
Android Security
Robin De Croon
 
MobSecCon 2015 - Burning Marshmallows
Ron Munitz
 
Hacker Halted 2014 - Reverse Engineering the Android OS
EC-Council
 
CNIT 128 6. Analyzing Android Applications (Part 2 of 3)
Sam Bowne
 
Security in Android Applications / Александр Смирнов (RedMadRobot)
Ontico
 
Maemo 6 Platform Security
Peter Schneider
 

Recently uploaded (20)

PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Architecture of the Future (09152021)
EdwardMeyman
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Doc9.....................................
SofiaCollazos
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Architecture of the Future (09152021)
EdwardMeyman
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 

Android security in depth - extended

  • 1. Logistics Healthcare Automotive Industrial Automation Android Security in depth Sander Alberink Machine & Systems Energy
  • 2. Agenda  Android overview  System-level security  Application-level security  Enterprise-level security
  • 3. Show of hands... Who has... ■ ■ ■ ■ 4 An Android device? Loaded a custom ROM? Rooted his device? Developed for that device? 27 januari 2014 Android Security in depth
  • 4. Android Security – System level
  • 6. System level execution  NX-bit  Stack-overflow prevention  Address Space Layout Randomization  dlmalloc/calloc + extensions  mmap_min_addr  Avoid leaking kernel pointer addresses
  • 7. Linux security measures  Sandboxing in kernel  Permissions enforced through linux groups  Each app separate UID
  • 8. Dalvik VM  Not a security boundary ■ No security manager ■ Permissions are enforced in OS, not VM ■ Bytecode verification optimized for speed, not security ■ Every app can execute native code!
  • 9. Zygote processes  Zygote process preloads typical classes and dynamic link libraries  Copy-on-write ■ Only when new process writes page, new page is allocated. ■ All pages not be written are shared among all zygote children.  Exec system call is not used in zygote. ■ wipes the page mapping table of process. ■ It means exec discards zygote cache.  Runs as UID=0 (root). After forking child process, its UID is changed by setuid system call.
  • 10. Binder IPC ■ IPC via kernel interface ■ Used under water for all IPC in Android • Service to application • Service to system • But also Intent-based communication... ■ Is security-aware and passes calling UID & GID 11 27 januari 2014 Powerpoint ICT Automatisering
  • 11. Additional measures in Android 4.2  Application verification ■ Additional scan for malicious sw  Always-on VPN  Improvements to installd/init handling, etc
  • 12. Bouncer  Checks every app submitted to store (before publication)  Runs app for 5 minutes in emulator, exercising UI  If flagged: manual analysis  Combination of dynamic/static analysis  Submit flagged apps too many times → blocked account
  • 13. Additional measures in Android 4.3  Android sandbox reinforced with SELinux.  No setuid/setgid programs.  ADB Authentication.  Restrict Setuid from Android Apps.  Capability bounding.  AndroidKeyStore Provider.
  • 14. Additional measures in Android 4.3 cont'd  KeyChain isBoundKeyAlgorithm.  NO_NEW_PRIVS. (This requires Linux kernel version 3.5 or greater)  FORTIFY_SOURCE enhancements.  Relocation protections.  Improved EntropyMixer.  Security Fixes.
  • 15. Additional measures in Android 4.4  Android sandbox reinforced with SELinux in enforcing mode.  Per-user VPN  ECDSA Provider support in AndroidKeyStore.  Device Monitoring Warnings  FORTIFY_SOURCE level 2  Certificate Pinning  Verified boot  Security Fixes
  • 16. Verified boot  Used to verify underlying boot image is not corrupted  Optional feature 
  • 17. SE Linux/Android  Mandatory Access Control (MAC) for Linux  Enforces a system-wide security policy  Over all processes, objects, and operations  Based on security labels  Can confine flawed and malicious applications  Even ones that run as “root” / uid 0.  Can prevent privilege escalation
  • 18. Difference between DAC and MAC  DAC: owner of object (f.i. files) determines access level  MAC: system determines access level system_app radio trusted_app kernel nfc
  • 19. Android Security – Application level
  • 20. Intent system  Communication between OS and applications via Intents  OS resolves requested action (e.g. 'edit contact') with all registered Intent receivers  Highly versatile and modular  Allows changing out default functionality for alternatives
  • 21. Permissions  Permissions determine if an app can perform an action  4 levels: ■ Normal ■ Dangerous ■ Signature ■ System
  • 22. Permissions cont'd  Permissions checked when: ■ Starting activities ■ Starting/binding to services ■ Sending to BroadcastReceivers ■ Accessings ContentProviders (separate for read and write ■ … and at any given moment using Context.checkCallingPermission()
  • 23. App signing All Android applications must be signed by the author (developer)  Signing: process of digitally signing a given application using a private key to: ■ Identify author ■ Detect changes ■ Establish trust between applications On Android, certificate (X.509) can be self-signed, no need for a certificate authority Android applications can be built in debug and release-mode:  In debug mode the app is automatically signed with debug key and cannot be distributed (e.g. via Google Play)  In release-mode app is signed with private key of developer.
  • 24. Android Security – Enterprise level
  • 25. Encryption  Full-disk encryption using dm-crypt ■ Actually: /data partition  Done using 128 bit AES/SHA256  Master key encrypted with another key based off device PIN/passwd ■ Problem: since PIN is usually 4 digits long, cracking master key is matter of little time...
  • 26. Device Policies  Determine user-level security  Locate lost devices  Enable remote wipe  Can disable functionality (such as camera)
  • 27. VPN  Support for VPN connections based on ■ IPSec ■ PPTP ■ Own VPN implementation (3rd party, 4.0+)  Requires use of device lock mechanism  As of Android 4.2, always-on VPN is possible too
  • 28. Manufacturer solutions  Samsung KNOX ■ Based on SE Android with additional policies ■ Separate USER and Work partitions ■ Verified boot ■ Per-app VPN ■ More comprehensive mobile device management

Editor's Notes

  • #8: NX-Bit: stack and heap marked to prevent code execution from NX-marked memory pages Mmap_min_addr prevents MMAPing the lowest pages of virtual memory. A null pointer dereference from the kernel could access that memory and execute code that you prepared beforehand. Leaking point addresses prevented by disallowing unpriviledged app from accessing /proc/kmsg54
  • #15: No setuid
  • #17: Device monitoring: addition of certificates that may allow monitoring of encryped traffic Fortify Source v2: more stricter checking of copies. May cause correct code to fail ECDSA: Elliptic curves support
  • #18: No SHA256 hash of entire block device. Works at the block layer Hash tree prepared by vendor, signatures of hash-table stored in non-volatile memory on device.
  • #27: Start by mounting temporary data fs in RAM and ask for device PIN. Test decrypt using key, if succesful rotate mountpoint. When you have device access to device, everything goes
  • #30: Work partitions contains apps wrapped by samsung in additional security layer