SlideShare a Scribd company logo
1 of 28
Download to read offline
PSCG
Ron Munitz
Founder & CEO - The PSCG
ron@thepscg.com
CodeMotion
Tel-Aviv
17 December 2015
@ronubo
The slides are available online at:
thepscg.com/talks/
Burning
Marshmallows
This work is licensed under the Creative Commons
Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-
sa/4.0/
© Copyright Ron Munitz 2015
PSCG
about://Ron Munitz
● Founder and CEO of the PSCG
○ The Premium Embedded/Android consulting and Training firm
● Android*, Linux*, Security* Trainer and Instructor
○ The PSCG, NewCircle and the Linux Foundation
○ For Q1 2016 training, Contact training@thepscg.com
● NIche Conference Organizer
○ MobSecCon, MobModCon, Voxxed Days Tel-Aviv
○ CFP is open. Follow me on Twitter and Google+ for announcements
( @ronubo , +RonMunitz )
● Working hard on the next huge thing…
Looking for co-founders!!!
○ Full Stack developer
○ Offensive Security experts (Mobile - huge advantage. Otherwise… Be
smart and serious and I’ll teach you what you need to know)
PSCG
Agenda
● Android Security features timeline
● PR stunts and Software Security faceoff
● Android Security Patching and Nexus Security Bulletin
● Introducing: Android 6.0 - Marshmallow
● Burning Marshmallows - Future PR stunts
Android Security Timeline
PSCG
Days of future past
Android Security Architecture
● Key Features
○ Robust security at the OS level through the Linux
kernel
○ Mandatory application sandbox for all applications
○ Secure interprocess communication
○ Application signing
○ Application-defined and user-granted permissions
○ SE Linux
○ Multi-User support, “work profiles”, “guest profiles”,...
○ FUSE for sdcard (permissions, encryption)
○ Trusted Execution Environment and HW support
PSCG
Android Security features timeline
● Permission System / Signature Systems
● JCE (BouncyCastle), OpenSSL
● Partial ASLR (“stagefright” → ICS!)
● Hardware Backed KeyStore
● Full ASLR (and later heap randomization and full PIE)
● SE Linux (first Permissive, then Enforcing)
● OTA Update System (e.g. Chromium)
● Full disk encryption, dm-crypt
● Trusted Boot support, dm-verity
● SE Linux - Full domain enforcement (important addition)
● Partial Permission Module (Burden on the developer...)
● Fingerprinting API,
● Keystore redesign
● ...
Popular “Victims”
PSCG
A pre Marshmallow candy barbeque
(or is it?)
Popular Attack Surfaces
● The AOSP builds on countless lines of code
○ Developed by Google and Partners
■ AOSP → OEM → Carrier chain of (mis)trust
○ “Borrowed”/Ported
● init services
○ If defined critical may lead to device reboot
○ If restarts other services - may lead to DoS
● Android services
○ Usually one service (server) serves multiple
components (clients) ⇒ DoS
● Separate code injection and privilege
escalation from DoS!
Don’t (blindly) believe the news
● StageFright sequences (by several vendors)
○ Fact: “Everyone” is fuzzing stagefright.
■ @see “Fuzzing the media framework in android”
by the Intel OTC, at ELC 2015
○ The mediaserver runs stagefright as the “media
backend”
○ If “everyone” fuzzes ⇒ at least someone succeeds
● Skia sequences
● gralloc sequences
● Kernel sequences...
Don’t (blindly) believe the news
● Fact: One of the Stagefright exploits was
severe because it could be triggered
remotely.
○ This is a huge deal.
○ If only...
● Fact: ASLR, PIE, DEP, SELinux,...
● Home exercise/Group bet:
○ Assuming an MMS costs $0.01. How many USD
would you spend on arbitrary remote code
execution?
○ Volunteers?
■ Regardless: Potential remote code execution ⇒ Critical severity
Don’t (blindly) believe the news
● Fact: One of the stagefright exploits resulted
in DoS attacks on the media server due to
heap overflow.
● This can lead to annoying behavior, and
more.
● Fact: mediaserver is not a privileged user.
Software components have bugs. It’s a part
of life.
● Opinion: If someone manages to exploit
those vulnerabilities, they probably deserve
a prize...
Yet, don’t avoid somewhat silent news
● A good attack is a low profile attack.
● An excellent attack is a zero-day attack
● Disclosure does not always help, and the
Android Ecosystem is not a great helper
○ AOSP → OEM → Carrier → (?) → User
● And when someone in the chain decides to
do something stupid within the chain -
someone else will take advantage
○ @see the “yearly” signature verification attacks
○ In fact, let’s have a quick look at a recent one
Silent but lethal news as per Sep 15
A great example which has not been published without
proportions and been recently patched at most, but not all
implementations is the Certifi-gate attack against RST
(Remote Support Tools):
Silent but lethal news as per Sep 15
● It turns out that RST such as TeamViewer, RSupport
and more, which were bundled in some popular device
ROMs from leading companies (LG, Samsung, Huawei
and more), had privileged access to elements such as
○ Screen Recording (Surface Flinger/Framebuffer)
○ Event Injection
○ Package Installation
Silent but lethal news as per Sep 15
● It also turns out that these RST’s enabled “trusted”
applications to take advantage of these permissions, by
using them as a (confused?) deputy, while the
applications would be an “extension”.
● What is trust?
○ Apparently, comparing an X509 certificate serial
number to a hard-coded value, comparing a
certificate “HashCode” to a hardcoded value etc…
● Given that, one could just build a “trusted” “extension” to
the RST, that would have full device control, without
ever asking for any permission.
● Great.
Getting the latest news
● In the last year, the Android team has started
a monthly security pathcing cycle
○ @see About→ Phone→ Security Patch Level
● Most insights/changelogs/CVE) can be seen
in https://source.android.com/security/bulletin/index.html
● The patch levels are (obviously) applied only
to the Nexus phones at the released dates.
○ The rest is up to the OEM’s good will
● Classified into 4 severity levels:
○ Critical, High, Moderate, Low
Understanding Android Security Bulletin
ratings
The severity of a bug generally reflects the potential harm that could occur if a bug was
successfully exploited. Use the following criteria to determine the severity:
Critical
● Remote privileged code execution (execution at a privilege level that third-party apps cannot obtain)
● Local permanent device compromise (device cannot be repaired without re-flashing the entire operating
system, such as a verified boot or Trusted Execution Environment/TEE compromise)
● Remote permanent denial of service (inoperability, either completely permanent or requiring re-flashing the
device)
High
● Remote unprivileged code execution (execution at a privilege level that third-party apps can obtain through
installation)
● Local access to system/signature-level permission data or capabilities without permission
● Local permanent denial-of-service (inoperability, either completely permanent or requiring re-flashing the
device)
● Remote temporary denial-of-service (remote hang or reboot)
Moderate
● Access to "dangerous" level permission data or capabilities without permission with an app installed on the
device
● Local temporary denial-of-service (can be resolved only through a factory reset)
Low
● Access to "normal" level permission capabilities without permission with an app installed on the device
● Local temporary denial-of-service (can be resolved by booting the device into Safe Mode and removing the
problem application)
Marshmallow Additions
PSCG
Marshmallow Additions
● FingerPrinting API
○ Biometric ID’s anyone?
○ Trusted Execution Environment implementation
■ @see attacks on ARM TrustZone..
○ What if the device has no TEE?
■ Prone to forensics…
● Dynamic Permission API
○ Basically a good thing. Finally catches up with iOS
dynamic permission model
○ Drawback: Will break applications. Not because it is
a bad things. But because of application developers
○ Mitigation: SDL, Captain Hindsight
Marshmallow Additions
● Keystore API redesign
● Keystore HAL redesign/additions
○ keymaster v. 1.0 - First signs of maturity?
● Symmetric key cryptography support at (HW
backed) keystores
○ This has been out for a while.
○ But on a platform hidden API (@hide)
○ Now available for all!
● Enable timed authentication
○ Introducing the gatekeeper HAL
Marshmallow Additions
● APK Validation changes
○ Following various notorious APK signing bugs (Master
Key etc.).
○ If a file is declared in the manifest but not present in
the APK itself ⇒ APK is considered corrupt
● Android for Work
○ Behavior is still evolving (for better? worse?)
○ Examples: Automatic System updates
○ Runtime Permission policy for all applications
○ Data usage tracking.
○ Most changes are Android. Not Google Play services.
● External Storage Encryption, App Linking,
Dynamic Permission API
Target API < 23 Target API >= 23
Device API < 23 No change (shocking, isn’t it?) Use Build.VERSION.SDK_INT switch.
Device API >= 23 No change on installation (all
permissions granted)
Permission can be revoked -
may break apps. The device
will warn the user about it.
Full dynamic permission model.
Make sure you check for SDK_INT ,
and always checkSelfPermission() ,
[shouldShowPermissionRationale()],
and requestPermission() when
relevant.
Then, handle the user’s choice on
onRequestPermissionResults()
Dynamic Permission API
● Long story short:
Target API Level 23 ⇒ Application
developer needs to be aware of dynamic
permissions
● Device Level 23 ⇒ End User needs to be
aware of the consequences of disabling
permissions for older SDK level apps.
● It’s quite obvious researchers will
celebrate this significant behavior
change...
Ahead Of Time Compiling (ART)
● Marshmallow provides ART as the default
(and only unless specifically configured) run
time.
● It seems that the OAT files are still “Lollipop
compliant” ⇒ Trivially reversible due to:
● A full mapping from Native code to DEX bytecode
● A full mapping from both to Java functions.
● So you can apply the same techniques for .dex
file decompiling.
● @see my upcoming Android Reverse Engineering
Lab
Speculations
● The most dominant attacks we’ll hear of will
be in the categories of:
○ Certificate validation, self Certificate Chain validation
○ Everything under the AOSP /external/
■ Home exercise: Can you play with toybox?
○ Everything media, graphics, binder, native related
○ Application breaking
○ Fingerprint stealing (if and when)
○ Bad SE Linux policies (unlikely for the “serious”
vendors, but hey, Android fragmentation…)
○ Timing attacks against the new Keystore API’s
● Or maybe we will hear of nothing. But
attackers/researchers will definitely try.
Follow up:
● Android Security workshop
○ Public class in Tel-Aviv - January 24-28, 2015.
○ training@thepscg.com
○ Discount Code: CodeMotionTLV1711
● On-Site/Public classes anywhere??
○ Contact me - training@thepscg.com
● MobSecCon and MobModCon
○ http://thepscg.com/events/mobmodcon
○ http://thepscg.com/events/mobseccon
○ CFP is now open!
Thank You
PSCG
Consulting/Training requests:
ron@thepscg.com

More Related Content

What's hot

Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The UniversityDominique Cimafranca
 
HackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisHackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisAntonio Parata
 
8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 Matrix8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 MatrixJorge Orchilles
 
The Art of defence: How vulnerabilites help shape security features and mitig...
The Art of defence: How vulnerabilites help shape security features and mitig...The Art of defence: How vulnerabilites help shape security features and mitig...
The Art of defence: How vulnerabilites help shape security features and mitig...Priyanka Aash
 
BlueHat v17 || You Are Making Application Whitelisting Difficult
BlueHat v17 || You Are Making Application Whitelisting Difficult BlueHat v17 || You Are Making Application Whitelisting Difficult
BlueHat v17 || You Are Making Application Whitelisting Difficult BlueHat Security Conference
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!CTruncer
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareBrandon Arvanaghi
 
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016grecsl
 
Security Issues in Android Custom ROM
Security Issues in Android Custom ROMSecurity Issues in Android Custom ROM
Security Issues in Android Custom ROMAnant Shrivastava
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofCTruncer
 
CheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityCheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityBrandon Arvanaghi
 

What's hot (12)

Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
HackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisHackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware Analysis
 
8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 Matrix8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 Matrix
 
The Art of defence: How vulnerabilites help shape security features and mitig...
The Art of defence: How vulnerabilites help shape security features and mitig...The Art of defence: How vulnerabilites help shape security features and mitig...
The Art of defence: How vulnerabilites help shape security features and mitig...
 
BlueHat v17 || You Are Making Application Whitelisting Difficult
BlueHat v17 || You Are Making Application Whitelisting Difficult BlueHat v17 || You Are Making Application Whitelisting Difficult
BlueHat v17 || You Are Making Application Whitelisting Difficult
 
Pentester++
Pentester++Pentester++
Pentester++
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
 
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
 
Security Issues in Android Custom ROM
Security Issues in Android Custom ROMSecurity Issues in Android Custom ROM
Security Issues in Android Custom ROM
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack Thereof
 
CheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityCheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant Security
 

Viewers also liked

X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)Ron Munitz
 
2015 POM Chapter 4 Organizing
2015 POM Chapter 4 Organizing2015 POM Chapter 4 Organizing
2015 POM Chapter 4 OrganizingLaura Law
 
2015 DHK 3634 Topic 6 housekeeping management
2015 DHK 3634 Topic 6 housekeeping management2015 DHK 3634 Topic 6 housekeeping management
2015 DHK 3634 Topic 6 housekeeping managementLaura Law
 
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)Ron Munitz
 
2016 DHT2563 Topic 11 building, structure, finishes and sites
2016 DHT2563 Topic 11 building, structure, finishes and sites2016 DHT2563 Topic 11 building, structure, finishes and sites
2016 DHT2563 Topic 11 building, structure, finishes and sitesLaura Law
 
2015 HTM130 Topic8 Leadership and Management
2015 HTM130 Topic8 Leadership and Management2015 HTM130 Topic8 Leadership and Management
2015 HTM130 Topic8 Leadership and ManagementLaura Law
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Ron Munitz
 

Viewers also liked (8)

X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)
 
Sahabat sejati
Sahabat sejatiSahabat sejati
Sahabat sejati
 
2015 POM Chapter 4 Organizing
2015 POM Chapter 4 Organizing2015 POM Chapter 4 Organizing
2015 POM Chapter 4 Organizing
 
2015 DHK 3634 Topic 6 housekeeping management
2015 DHK 3634 Topic 6 housekeeping management2015 DHK 3634 Topic 6 housekeeping management
2015 DHK 3634 Topic 6 housekeeping management
 
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)
Android ROM cooking: A practical Tutorial (DroidCon Torino 2014)
 
2016 DHT2563 Topic 11 building, structure, finishes and sites
2016 DHT2563 Topic 11 building, structure, finishes and sites2016 DHT2563 Topic 11 building, structure, finishes and sites
2016 DHT2563 Topic 11 building, structure, finishes and sites
 
2015 HTM130 Topic8 Leadership and Management
2015 HTM130 Topic8 Leadership and Management2015 HTM130 Topic8 Leadership and Management
2015 HTM130 Topic8 Leadership and Management
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
 

Similar to CodeMotion tel aviv 2015 - burning marshmallows

Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at DecisivTeleport
 
The Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingThe Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingMatt Tesauro
 
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...LibreCon
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depthSander Alberink
 
Embedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VEmbedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VOpersys inc.
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYEnterprise Management Associates
 
Blockade.io : One Click Browser Defense
Blockade.io : One Click Browser DefenseBlockade.io : One Click Browser Defense
Blockade.io : One Click Browser DefenseRiskIQ, Inc.
 
Deepfence.pdf
Deepfence.pdfDeepfence.pdf
Deepfence.pdfVishwas N
 
Talking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionTalking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionDocker, Inc.
 
Android security in depth - extended
Android security in depth - extendedAndroid security in depth - extended
Android security in depth - extendedSander Alberink
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIOpersys inc.
 
ToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsAditya K Sood
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Embedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVEmbedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVOpersys inc.
 
Android Tamer (Anant Shrivastava)
Android Tamer (Anant Shrivastava)Android Tamer (Anant Shrivastava)
Android Tamer (Anant Shrivastava)ClubHack
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsNetsparker
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Opersys inc.
 

Similar to CodeMotion tel aviv 2015 - burning marshmallows (20)

Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at Decisiv
 
The Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingThe Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security Testing
 
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Embedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VEmbedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon V
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
 
DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019
 
Blockade.io : One Click Browser Defense
Blockade.io : One Click Browser DefenseBlockade.io : One Click Browser Defense
Blockade.io : One Click Browser Defense
 
Deepfence.pdf
Deepfence.pdfDeepfence.pdf
Deepfence.pdf
 
Talking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionTalking TUF: Securing Software Distribution
Talking TUF: Securing Software Distribution
 
Android security in depth - extended
Android security in depth - extendedAndroid security in depth - extended
Android security in depth - extended
 
Embedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VIEmbedded Android Workshop at AnDevCon VI
Embedded Android Workshop at AnDevCon VI
 
ToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android Infections
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Security Issues in Android Custom Rom
Security Issues in Android Custom RomSecurity Issues in Android Custom Rom
Security Issues in Android Custom Rom
 
Embedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVEmbedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IV
 
Android Tamer (Anant Shrivastava)
Android Tamer (Anant Shrivastava)Android Tamer (Anant Shrivastava)
Android Tamer (Anant Shrivastava)
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass Firewalls
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014
 

Recently uploaded

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

CodeMotion tel aviv 2015 - burning marshmallows

  • 1. PSCG Ron Munitz Founder & CEO - The PSCG ron@thepscg.com CodeMotion Tel-Aviv 17 December 2015 @ronubo The slides are available online at: thepscg.com/talks/ Burning Marshmallows
  • 2. This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/4.0/ © Copyright Ron Munitz 2015 PSCG
  • 3. about://Ron Munitz ● Founder and CEO of the PSCG ○ The Premium Embedded/Android consulting and Training firm ● Android*, Linux*, Security* Trainer and Instructor ○ The PSCG, NewCircle and the Linux Foundation ○ For Q1 2016 training, Contact training@thepscg.com ● NIche Conference Organizer ○ MobSecCon, MobModCon, Voxxed Days Tel-Aviv ○ CFP is open. Follow me on Twitter and Google+ for announcements ( @ronubo , +RonMunitz ) ● Working hard on the next huge thing… Looking for co-founders!!! ○ Full Stack developer ○ Offensive Security experts (Mobile - huge advantage. Otherwise… Be smart and serious and I’ll teach you what you need to know) PSCG
  • 4. Agenda ● Android Security features timeline ● PR stunts and Software Security faceoff ● Android Security Patching and Nexus Security Bulletin ● Introducing: Android 6.0 - Marshmallow ● Burning Marshmallows - Future PR stunts
  • 6. Android Security Architecture ● Key Features ○ Robust security at the OS level through the Linux kernel ○ Mandatory application sandbox for all applications ○ Secure interprocess communication ○ Application signing ○ Application-defined and user-granted permissions ○ SE Linux ○ Multi-User support, “work profiles”, “guest profiles”,... ○ FUSE for sdcard (permissions, encryption) ○ Trusted Execution Environment and HW support PSCG
  • 7. Android Security features timeline ● Permission System / Signature Systems ● JCE (BouncyCastle), OpenSSL ● Partial ASLR (“stagefright” → ICS!) ● Hardware Backed KeyStore ● Full ASLR (and later heap randomization and full PIE) ● SE Linux (first Permissive, then Enforcing) ● OTA Update System (e.g. Chromium) ● Full disk encryption, dm-crypt ● Trusted Boot support, dm-verity ● SE Linux - Full domain enforcement (important addition) ● Partial Permission Module (Burden on the developer...) ● Fingerprinting API, ● Keystore redesign ● ...
  • 8. Popular “Victims” PSCG A pre Marshmallow candy barbeque (or is it?)
  • 9. Popular Attack Surfaces ● The AOSP builds on countless lines of code ○ Developed by Google and Partners ■ AOSP → OEM → Carrier chain of (mis)trust ○ “Borrowed”/Ported ● init services ○ If defined critical may lead to device reboot ○ If restarts other services - may lead to DoS ● Android services ○ Usually one service (server) serves multiple components (clients) ⇒ DoS ● Separate code injection and privilege escalation from DoS!
  • 10. Don’t (blindly) believe the news ● StageFright sequences (by several vendors) ○ Fact: “Everyone” is fuzzing stagefright. ■ @see “Fuzzing the media framework in android” by the Intel OTC, at ELC 2015 ○ The mediaserver runs stagefright as the “media backend” ○ If “everyone” fuzzes ⇒ at least someone succeeds ● Skia sequences ● gralloc sequences ● Kernel sequences...
  • 11. Don’t (blindly) believe the news ● Fact: One of the Stagefright exploits was severe because it could be triggered remotely. ○ This is a huge deal. ○ If only... ● Fact: ASLR, PIE, DEP, SELinux,... ● Home exercise/Group bet: ○ Assuming an MMS costs $0.01. How many USD would you spend on arbitrary remote code execution? ○ Volunteers? ■ Regardless: Potential remote code execution ⇒ Critical severity
  • 12. Don’t (blindly) believe the news ● Fact: One of the stagefright exploits resulted in DoS attacks on the media server due to heap overflow. ● This can lead to annoying behavior, and more. ● Fact: mediaserver is not a privileged user. Software components have bugs. It’s a part of life. ● Opinion: If someone manages to exploit those vulnerabilities, they probably deserve a prize...
  • 13. Yet, don’t avoid somewhat silent news ● A good attack is a low profile attack. ● An excellent attack is a zero-day attack ● Disclosure does not always help, and the Android Ecosystem is not a great helper ○ AOSP → OEM → Carrier → (?) → User ● And when someone in the chain decides to do something stupid within the chain - someone else will take advantage ○ @see the “yearly” signature verification attacks ○ In fact, let’s have a quick look at a recent one
  • 14. Silent but lethal news as per Sep 15 A great example which has not been published without proportions and been recently patched at most, but not all implementations is the Certifi-gate attack against RST (Remote Support Tools):
  • 15. Silent but lethal news as per Sep 15 ● It turns out that RST such as TeamViewer, RSupport and more, which were bundled in some popular device ROMs from leading companies (LG, Samsung, Huawei and more), had privileged access to elements such as ○ Screen Recording (Surface Flinger/Framebuffer) ○ Event Injection ○ Package Installation
  • 16. Silent but lethal news as per Sep 15 ● It also turns out that these RST’s enabled “trusted” applications to take advantage of these permissions, by using them as a (confused?) deputy, while the applications would be an “extension”. ● What is trust? ○ Apparently, comparing an X509 certificate serial number to a hard-coded value, comparing a certificate “HashCode” to a hardcoded value etc… ● Given that, one could just build a “trusted” “extension” to the RST, that would have full device control, without ever asking for any permission. ● Great.
  • 17. Getting the latest news ● In the last year, the Android team has started a monthly security pathcing cycle ○ @see About→ Phone→ Security Patch Level ● Most insights/changelogs/CVE) can be seen in https://source.android.com/security/bulletin/index.html ● The patch levels are (obviously) applied only to the Nexus phones at the released dates. ○ The rest is up to the OEM’s good will ● Classified into 4 severity levels: ○ Critical, High, Moderate, Low
  • 18. Understanding Android Security Bulletin ratings The severity of a bug generally reflects the potential harm that could occur if a bug was successfully exploited. Use the following criteria to determine the severity: Critical ● Remote privileged code execution (execution at a privilege level that third-party apps cannot obtain) ● Local permanent device compromise (device cannot be repaired without re-flashing the entire operating system, such as a verified boot or Trusted Execution Environment/TEE compromise) ● Remote permanent denial of service (inoperability, either completely permanent or requiring re-flashing the device) High ● Remote unprivileged code execution (execution at a privilege level that third-party apps can obtain through installation) ● Local access to system/signature-level permission data or capabilities without permission ● Local permanent denial-of-service (inoperability, either completely permanent or requiring re-flashing the device) ● Remote temporary denial-of-service (remote hang or reboot) Moderate ● Access to "dangerous" level permission data or capabilities without permission with an app installed on the device ● Local temporary denial-of-service (can be resolved only through a factory reset) Low ● Access to "normal" level permission capabilities without permission with an app installed on the device ● Local temporary denial-of-service (can be resolved by booting the device into Safe Mode and removing the problem application)
  • 20. Marshmallow Additions ● FingerPrinting API ○ Biometric ID’s anyone? ○ Trusted Execution Environment implementation ■ @see attacks on ARM TrustZone.. ○ What if the device has no TEE? ■ Prone to forensics… ● Dynamic Permission API ○ Basically a good thing. Finally catches up with iOS dynamic permission model ○ Drawback: Will break applications. Not because it is a bad things. But because of application developers ○ Mitigation: SDL, Captain Hindsight
  • 21. Marshmallow Additions ● Keystore API redesign ● Keystore HAL redesign/additions ○ keymaster v. 1.0 - First signs of maturity? ● Symmetric key cryptography support at (HW backed) keystores ○ This has been out for a while. ○ But on a platform hidden API (@hide) ○ Now available for all! ● Enable timed authentication ○ Introducing the gatekeeper HAL
  • 22. Marshmallow Additions ● APK Validation changes ○ Following various notorious APK signing bugs (Master Key etc.). ○ If a file is declared in the manifest but not present in the APK itself ⇒ APK is considered corrupt ● Android for Work ○ Behavior is still evolving (for better? worse?) ○ Examples: Automatic System updates ○ Runtime Permission policy for all applications ○ Data usage tracking. ○ Most changes are Android. Not Google Play services. ● External Storage Encryption, App Linking,
  • 23. Dynamic Permission API Target API < 23 Target API >= 23 Device API < 23 No change (shocking, isn’t it?) Use Build.VERSION.SDK_INT switch. Device API >= 23 No change on installation (all permissions granted) Permission can be revoked - may break apps. The device will warn the user about it. Full dynamic permission model. Make sure you check for SDK_INT , and always checkSelfPermission() , [shouldShowPermissionRationale()], and requestPermission() when relevant. Then, handle the user’s choice on onRequestPermissionResults()
  • 24. Dynamic Permission API ● Long story short: Target API Level 23 ⇒ Application developer needs to be aware of dynamic permissions ● Device Level 23 ⇒ End User needs to be aware of the consequences of disabling permissions for older SDK level apps. ● It’s quite obvious researchers will celebrate this significant behavior change...
  • 25. Ahead Of Time Compiling (ART) ● Marshmallow provides ART as the default (and only unless specifically configured) run time. ● It seems that the OAT files are still “Lollipop compliant” ⇒ Trivially reversible due to: ● A full mapping from Native code to DEX bytecode ● A full mapping from both to Java functions. ● So you can apply the same techniques for .dex file decompiling. ● @see my upcoming Android Reverse Engineering Lab
  • 26. Speculations ● The most dominant attacks we’ll hear of will be in the categories of: ○ Certificate validation, self Certificate Chain validation ○ Everything under the AOSP /external/ ■ Home exercise: Can you play with toybox? ○ Everything media, graphics, binder, native related ○ Application breaking ○ Fingerprint stealing (if and when) ○ Bad SE Linux policies (unlikely for the “serious” vendors, but hey, Android fragmentation…) ○ Timing attacks against the new Keystore API’s ● Or maybe we will hear of nothing. But attackers/researchers will definitely try.
  • 27. Follow up: ● Android Security workshop ○ Public class in Tel-Aviv - January 24-28, 2015. ○ training@thepscg.com ○ Discount Code: CodeMotionTLV1711 ● On-Site/Public classes anywhere?? ○ Contact me - training@thepscg.com ● MobSecCon and MobModCon ○ http://thepscg.com/events/mobmodcon ○ http://thepscg.com/events/mobseccon ○ CFP is now open!