SlideShare a Scribd company logo
Android N Security Overview
Constantine Mars,
Sr. Android Developer @ DataArt,
GDG Dnipro Co-Organizer
+ConstantineMars
@ConstantineMars
Security?!! WTF?!!
What happens if you do security right?
What happens if you do security right?
Right. Absolutely nothing
What happens if you do security wrong?
Bad things happen
The first simplest rule of security
Don’t use the same password everywhere
Security tool everyone has
A key
Hardware keys
Presence of user when action happens
Disclaimer: no more security basics
Google I/O 2016 announces
Allo messenger
Android Security
Architecture
Android Security Architecture
Google’s focus on Users
8 billion everyday app scans
Security Services
Security Features
Permissions
Runtime
Permissions (M)
● Request permissions at runtime
● Selective control permissions
Runtime
Permissions (M)
● Simplified installation process
● Easier application upgrades
● More understandable for users
Requesting a Permission
Handling Permissions Result
UX Guidelines for
Permissions (M)
● Educate in context for
secondary
● Educate up-front for critical
● Receive “yes” in 85%
● 15.8% “no”
● 3% “never ask again”
Keystore
Android Keystore
lets you store cryptographic keys in a
container to make it more difficult to
extract from the device. Once keys are
in the keystore, they can be used for
cryptographic operations with the key
material remaining non-exportable.
The Keystore system is used by the
KeyChain API as well as the Android
Keystore provider feature that was
introduced in Android 4.3 (API level
18).
Android Keystore
Key material may be bound to the
secure hardware (e.g., Trusted
Execution Environment (TEE), Secure
Element (SE)) of the Android device
Supporting wide range of algorithms
Generating new key pair
Signing data
Verifying data
Key Attestation (N)
Key Attestation gives you more
confidence that the keys you use in
your app are stored in a device's
hardware-backed keystore.
Key attestation allows you to verify
that an RSA or EC key pair has been
created and stored in a device’s
hardware-backed keystore within the
device’s trusted execution
environment (TEE).
Get Certificate Chain from the KeyStore
Key attestation
Authentication
Remembering and entering passwords and patterns is pain
Smart Lock
● Smart Lock’s on-body detection
reduces lock screen prompts by
50%
Fingerprint
● Fingerprint increased usage of
lockscreen to 90%+ on Nexus
devices
AndroidPay is critical about authentication
Stronger authentication
● Tied to app secrets (KeyStore)
● Credential verification in hardware (Trustzone)
Fingerprint API (M)
Fingerprint API (M)
PIN security, Fingerprint and Gatekeeper
Best practices
● Check KeyguardManager.isDeviceSecure() to identify that device has
lockscreen or password protection.
● Use setUserAuthenticationValidityDurationSeconds during the key
generation to set the duration for which authentication is valid:
Best practices
When generating key - set authentication timeout and on body detection:
Best practices
Best practices
If no Fingerprint available - fall back to Gatekeeper and
KeyguardManager.createConfirmDeviceCredentialIntent:
Network security
Restrict HTTP in Manifest
Network Security Configuration (N)
Domain level rules
Debug-overrides
● Eliminate debugging-related code in your release build
● Avoid writing custom code that removes security for debug and shipping it
When debugging an app that connects over HTTPS you may want to connect to
a local development server, which does not have the SSL certificate for your
production server. In order to support this without any modification to your
app's code you can specify debug-only CAs that are only trusted when
android:debuggable is true by using debug-overrides.
Debug-overrides
Trusted CAs
Certificate pinning
And one more thing:
User CAs are not trusted by default anymore
Storage Encryption
Storage Encryption
● Encryption required for all capable devices (M)
● Backed by hardware and TrustZone (N)
● Better UX with DirectBoot (N)
Direct Boot
● Boot directly to the lock screen
● Calls, SMS, TalkBack, alarms work after device reboot before unlock
● Per-user disk encryption
DirectBoot
● Credential encrypted storage, which is the default storage location and
only available after the user has unlocked the device.
● Device encrypted storage, which is a storage location available both during
Direct Boot mode and after the user has unlocked the device.
directBootAware
Using DirectBoot storage
Verified Boot
Verified Boot
Verified boot guarantees the
integrity of the device software
starting from a hardware root of
trust up to the system partition.
During boot, each stage verifies
the integrity and authenticity of
the next stage before executing
it.
This capability can be used to
warn users of unexpected
changes to the software when
they acquire a used device, for
example.
SafetyNet
SafetyNet
A SafetyNet compatibility check allows
your app to check if the device where it
is running matches the profile of a
device that has passed Android
compatibility testing. The compatibility
check creates a device profile by
gathering information about the device
hardware and software characteristics,
including the platform build.
SafetyNet attestation request
SafetyNet response
Sandboxing
Sandboxing
● SELinux
● Seccomp (N)
● Mediaserver
hardening
● ASLR randomness
● Library load order
randomization
● Integrity monitoring
Mediaserver
hardening
What’s outside N
security topic?
● Security Assesment Tools
(Santoku, drozer, etc.)
● Eternal secrets of ADB and
Manifest, Logs, etc.
● Exploits: sniffing network
traffic, attacking services,
providers
● SQL-injections
● Man-in-the-middle attacks
● Custom permissions protection
● ProGuard and DexGuard
● Reverse Engineering, DEX, GDB
● Cross-compiling native
executables
● Securing SharedPreferences
● SQLCipher
● etc...
Links
● Adrian Ludwig talk on Google I/O 2016
https://youtu.be/XZzLjllizYs?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC
● FingerprintDialog sample https://github.com/googlesamples/android-FingerprintDialog
● Authentication samples for M
http://android-developers.blogspot.com/2015/10/new-in-android-samples-authenticating.html
● Android Security Essentials by Pagati Ogal Rai
https://www.packtpub.com/application-development/android-application-security-essentials
● Google Security Blog https://security.googleblog.com/
● Android Security Bulletins https://source.android.com/security/bulletin/
● Annual Security Review https://goo.gl/VpYom1
Security Bulletins
Android Annual
Security Review
Thank you :)
Constantine Mars,
Sr. Android Developer @ DataArt,
GDG Dnipro Co-Organizer
+ConstantineMars
@ConstantineMars

More Related Content

PDF
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
PDF
Android Security
PDF
Android Security
PDF
Android system security
PDF
Stealing sensitive data from android phones the hacker way
PDF
Android security - an enterprise perspective
PPTX
Functional Safety and Security process alignment
PPTX
Safe and secure autonomous systems
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Android Security
Android Security
Android system security
Stealing sensitive data from android phones the hacker way
Android security - an enterprise perspective
Functional Safety and Security process alignment
Safe and secure autonomous systems

What's hot (20)

PDF
Android Security
PDF
Android Security Overview and Safe Practices for Web-Based Android Applications
PPTX
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
PPTX
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
PPT
Analysis and research of system security based on android
PDF
2015.04.24 Updated > Android Security Development - Part 1: App Development
PDF
Android security and penetration testing | DIVA | Yogesh Ojha
PDF
Anti-tampering in Android and Take Look at Google SafetyNet Attestation API
PDF
Android Security Development
PPTX
Whats different in android L, M, N and O
PPTX
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
PDF
Android Hacking
PDF
Samsung beyond basic android online 0
PPTX
Android Security
PPTX
Pentesting Android Applications
PPTX
Will future vehicles be secure?
PPTX
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
PDF
My Null Android Penetration Session
PPTX
PPTX
introduction to Embedded System Security
Android Security
Android Security Overview and Safe Practices for Web-Based Android Applications
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
Analysis and research of system security based on android
2015.04.24 Updated > Android Security Development - Part 1: App Development
Android security and penetration testing | DIVA | Yogesh Ojha
Anti-tampering in Android and Take Look at Google SafetyNet Attestation API
Android Security Development
Whats different in android L, M, N and O
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
Android Hacking
Samsung beyond basic android online 0
Android Security
Pentesting Android Applications
Will future vehicles be secure?
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
My Null Android Penetration Session
introduction to Embedded System Security
Ad

Viewers also liked (7)

PDF
Android Security, From the Ground Up
PDF
Embedded Android Workshop at AnDevCon IV
PDF
La blockchain en détail - Devoxxfr 2016 - Benoit Lafontaine - Yann Rouillard
PDF
How to not disable SELinux
PDF
Embedded Android Workshop with Nougat
PDF
Brief Tour about Android Security
PDF
AndroidとSELinux
Android Security, From the Ground Up
Embedded Android Workshop at AnDevCon IV
La blockchain en détail - Devoxxfr 2016 - Benoit Lafontaine - Yann Rouillard
How to not disable SELinux
Embedded Android Workshop with Nougat
Brief Tour about Android Security
AndroidとSELinux
Ad

Similar to Android N Security Overview - Mobile Security Saturday at Ciklum (20)

PDF
PRIV Security: How BlackBerry PRIV Safeguards Your Data
PDF
An overview of the samsung knox platform v1 14
ODP
Android security in depth - extended
PDF
The samsung knox platform 0
PDF
Agile Secure Development
PDF
Securing the Internet of Things - Hank Chavers
PPTX
Copy of Copy of AI Tech Agency Infographics by Slidesgo.pptx
PDF
App Security and Securing App
PDF
Android Application Security from consumer and developer perspectives
PDF
Hardware Security on Vehicles
PDF
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
ODP
Portakal Teknoloji Otc Lyon Part 1
PPTX
Security Best Practices for Your Ignition System
PDF
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
PDF
Introduction to Application Security Testing
PDF
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
PDF
Android Security Maximized by Samsung KNOX
PDF
Android security maximized by samsung knox
PDF
Security Fundamentals and Threat Modelling
PDF
Sumeet Mandloi: Robust Security Testing Framework
PRIV Security: How BlackBerry PRIV Safeguards Your Data
An overview of the samsung knox platform v1 14
Android security in depth - extended
The samsung knox platform 0
Agile Secure Development
Securing the Internet of Things - Hank Chavers
Copy of Copy of AI Tech Agency Infographics by Slidesgo.pptx
App Security and Securing App
Android Application Security from consumer and developer perspectives
Hardware Security on Vehicles
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
Portakal Teknoloji Otc Lyon Part 1
Security Best Practices for Your Ignition System
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
Introduction to Application Security Testing
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Android Security Maximized by Samsung KNOX
Android security maximized by samsung knox
Security Fundamentals and Threat Modelling
Sumeet Mandloi: Robust Security Testing Framework

More from Constantine Mars (17)

PDF
Mobile Applications Architecture - GDG Ternopil' Architecture Components Meetup
PDF
Quick look at Design Patterns in Android Development
PDF
Dagger 2 - Ciklum Speakers' Corner
PDF
Architecture components - IT Talk
PDF
Jump into cross platform development with firebase
PDF
Android Wear 2.0 - New Level of Freedom for Your Action - GDG CEE Leads Summi...
PDF
Android Wear 2.0 - Great Changes Upcoming This Fall - GDG DevFest Ukraine 2016
PDF
Dagger2 - IT NonStop Voronezh 2016
PDF
DeviceHive Android BLE Gateway
PDF
Scrum Overview
PDF
Android Wear 2.0, Awareness API - GDG Dnipro Post I/O 2016
PDF
RxJava for Android - GDG and DataArt
PDF
Android Wear 2.0 - IT NonStop Dnipro
PDF
Study Jam: Android for Beginners, Summary
PDF
Pebble Watch Development
PDF
Xamarin Forms in Action
PDF
RxJava for Android - GDG DevFest Ukraine 2015
Mobile Applications Architecture - GDG Ternopil' Architecture Components Meetup
Quick look at Design Patterns in Android Development
Dagger 2 - Ciklum Speakers' Corner
Architecture components - IT Talk
Jump into cross platform development with firebase
Android Wear 2.0 - New Level of Freedom for Your Action - GDG CEE Leads Summi...
Android Wear 2.0 - Great Changes Upcoming This Fall - GDG DevFest Ukraine 2016
Dagger2 - IT NonStop Voronezh 2016
DeviceHive Android BLE Gateway
Scrum Overview
Android Wear 2.0, Awareness API - GDG Dnipro Post I/O 2016
RxJava for Android - GDG and DataArt
Android Wear 2.0 - IT NonStop Dnipro
Study Jam: Android for Beginners, Summary
Pebble Watch Development
Xamarin Forms in Action
RxJava for Android - GDG DevFest Ukraine 2015

Recently uploaded (20)

PDF
Understanding Forklifts - TECH EHS Solution
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
medical staffing services at VALiNTRY
PPTX
history of c programming in notes for students .pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
ai tools demonstartion for schools and inter college
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Essential Infomation Tech presentation.pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
AI in Product Development-omnex systems
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
medical staffing services at VALiNTRY
history of c programming in notes for students .pptx
Wondershare Filmora 15 Crack With Activation Key [2025
ai tools demonstartion for schools and inter college
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
2025 Textile ERP Trends: SAP, Odoo & Oracle
wealthsignaloriginal-com-DS-text-... (1).pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Design an Analysis of Algorithms II-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
CHAPTER 2 - PM Management and IT Context
Essential Infomation Tech presentation.pptx
Design an Analysis of Algorithms I-SECS-1021-03
AI in Product Development-omnex systems

Android N Security Overview - Mobile Security Saturday at Ciklum