Top Banner
Hacking Mobile Applications – Industry Case Studies Michael Gianarakis Securus Global
55

Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Jul 18, 2015

Download

Mobile

eightbit
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Hacking Mobile Applications – Industry Case Studies

Michael Gianarakis Securus Global

Page 2: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Introduction

About Me • Michael Gianarakis • Senior Security Consultant • Working in application security for seven years •  Focus on mobile application security

Page 3: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Overview

Mobile platforms have presented many opportunities for businesses and online retailers….

Page 4: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Overview

Mobile platforms have presented many opportunities for businesses and online retailers…. BUT

Page 5: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Overview

Mobile platforms have presented many opportunities for businesses and online retailers…. BUT It’s also created a lucrative target for hackers.

Page 6: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Key Takeaways

Understand

Identify

Defend

Page 7: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Key Takeaways

Understand

Identify

Defend

Page 8: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Key Takeaways

Understand

Identify

Defend

Page 9: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Before we get

started….

Page 10: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

Page 11: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

Page 12: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

Page 13: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

User  

Page 14: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

User  

Back  End  Web  Service  

Page 15: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

Page 16: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 17: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Understanding the Risks – Mobile Threat Model

So what are the

threats?

Page 18: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 19: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 20: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 21: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 22: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 23: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 24: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Mobile  Device  

Understanding the Risks – Mobile Threat Model

Mobile  Applica,on  

3rd  Party  Applica,ons  

User  

Back  End  Web  Service  

3rd  Party  Web  Service  

Page 25: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Understanding the Risks

Page 26: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Understanding the Risks

Page 27: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats

•  Focus on the most prevalent risks and how they can be exploited

•  Insecure data storage •  Insufficient transport layer protection

(communication security) •  Client side injection

Page 28: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

•  Improperly secured data stored on the device is very common

•  I have come across all kinds of sensitive information stored in clear text including:

•  Usernames and passwords •  Encryption keys •  Personal information •  Location data

Page 29: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

•  Two main types of insecure data storage:

1.  Sensitive data stored on the device by the application that was not secured appropriately by the developer

2.  Data stored by the operating system automatically

Page 30: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

•  Sensitive data not appropriately secured by the developer includes:

•  Unencrypted databases •  Storing sensitive information in

preference files •  Encrypting data but storing the

encryption key in a clear text file •  Logging sensitive information to the

device logs

Page 31: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

Page 32: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

Page 33: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

Page 34: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

This  was  in  a  banking  app!  

Page 35: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

•  Sensitive data stored by the operating system

•  Back grounding screenshots (iOS) •  Caches (browser caching, autocorrect

etc.) •  Pasteboard

•  Oftentimes developers do not realise that the OS is storing this information

Page 36: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

Page 37: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insecure Data Storage

Page 38: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insufficient Transport Layer Security

•  Most users will connect their devices to untrusted networks

•  It is common to find insecurely implemented communication security:

•  Lack of SSL validation •  Unencrypted communications

Page 39: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Insufficient Transport Layer Security

Page 40: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Client Side Injection

•  In web applications injection issues such as XSS and SQL Injection are a big problem

•  Still found in mobile applications

•  Can be worse in mobile application - runtime manipulation can lead to significant security issues

Page 41: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Client Side Injection

Page 42: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Client Side Injection

Page 43: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Identify the Threats – Client Side Injection

Page 44: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Challenges •  Devices are easily lost, stolen or

compromised •  Multiple attack vectors outside of your

control •  Once the security of the device is

compromised ‘all bets are off’ •  Platform is constantly evolving •  Customer expectation of rapid

iteration •  Developer inexperience with

platforms (although this is improving)

Page 45: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  First of all focus on the basics •  Define the risk profile of the application •  Secure development practices •  Thorough security testing •  Monitoring and review

•  Effective information security is a process for managing business risk, not a product. Beware of “silver bullet” solutions.

•  The security of your application is your responsibility - not Apple, or Google or Microsoft

Page 46: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Mobile application security design principles

•  Assume the client is compromised

•  Assume the application will connect to untrusted networks

•  Assume that the underlying operating system is compromised

Page 47: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Assume the client is compromised

•  Do not store sensitive information on the device

•  Do not implement sensitive functionality in the client – always implement on the server

•  Do not trust user input

Page 48: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Assume the application will connect to untrusted networks

•  Do not transmit sensitive information unencrypted

•  Do not use weak encryption •  Establish and validate certificate

chain

Page 49: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Assume the underlying operating system is compromised

•  Genuine users will jailbreak their devices

•  Attackers will jailbreak target devices

•  Do not assume that physical access to the device is necessary for an attacker to compromise the device

Page 50: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Assume the underlying operating system is compromised

•  Genuine users will jailbreak their devices

•  Attackers will jailbreak target devices

•  Do not assume that physical access to the device is necessary for an attacker to compromise the device

Page 51: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Data Security •  Preference is to not store sensitive

data •  Be realistic about requirements to

actually store data (remember these devices are always connected)

•  Be conscious of inadvertent data leakage by the operating system

•  If storing sensitive data – encyrpt but be aware of key management difficulties

Page 52: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Communication Security •  Encrypt all traffic •  ALWAYS validate certificates •  Certificate pinning •  Be aware of lax controls in

development environments filtering through to production

•  Do not use weak protocols (SSLv2, BEAST, CRIME etc)

Page 53: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Injection and Runtime Security •  Don’t trust user input •  Although hard to implement consider

runtime security mechanisms •  Anti-debugging •  Jailbreak detection •  Tamper response

Page 54: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Defending Mobile Applications

•  Unfortunately it is impossible to completely secure mobile applications

•  Anybody with a copy of the application and a debugger can compromise the security of the application

•  The aim is to make it significantly harder for the attacker such that the economic benefits of attacking the application are outweighed by the difficulty of the attack.

Page 55: Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Case Studies

Questions?