27
SECURITY IN ANDROID APPLICATION 22/04/2016 ALEXANDER SMIRNOV

Смирнов Александр, Security in Android Application

  • Upload
    secon

  • View
    245

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Смирнов Александр, Security in Android Application

SECURITYIN ANDROID APPLICATION

22/04/2016ALEXANDER SMIRNOV

Page 2: Смирнов Александр, Security in Android Application

- 3+ years Android dev- 6+ years commercial dev- 1 year bank app dev- BlackHat friends since 2007- DC7499 member

WhoAmI

2

Page 3: Смирнов Александр, Security in Android Application

Why?

3

Page 4: Смирнов Александр, Security in Android Application

- Android Security Model- Reality- Vulnerabilities- One more sentence- Appendix

Agenda

4

Page 5: Смирнов Александр, Security in Android Application

Security

• I •

Android Security Model

5

Page 6: Смирнов Александр, Security in Android Application

6

Page 7: Смирнов Александр, Security in Android Application

Application Isolation

7

- isolate CPU, RAM, devices, files in private directory

- every app run in own process- every app has own UserID and

GroupID- every app run in own instance of

Dalvik VM

Page 8: Смирнов Александр, Security in Android Application

Application Isolation

8

Page 9: Смирнов Александр, Security in Android Application

- Is the parent of all App processes- COW(Copy On Write) strategy- /dev/socket/zygote

Zygote

9

App 1

App 2

App 3

Zygote

fork()

fork()

fork()

start newApp

Page 10: Смирнов Александр, Security in Android Application

- Before M- After M- Custom permissions- Protection level

Permissions

10

Page 11: Смирнов Александр, Security in Android Application

- Protect user data- Protect system resources- Provide application isolation

Android Security Overview

11

Page 12: Смирнов Александр, Security in Android Application

• II •

Android Security ModelReality

Security

12

Page 13: Смирнов Александр, Security in Android Application

13

Root

Page 14: Смирнов Александр, Security in Android Application

14

TRIADA

Page 15: Смирнов Александр, Security in Android Application

Security

15

• III•

Vulnerabilities

Page 16: Смирнов Александр, Security in Android Application

- Memory Cache- DB + SQLCipher- SharedPreference +

MODE_PRIVATE + Cipher- 21+ setStorageEncryption for

local files- KeyStore

Data Storage

16

Page 17: Смирнов Александр, Security in Android Application

- MITM has you- Check network – why?- Diffie–Hellman key exchange- Certificate Pinning == SSL Pinning

(okhttp 2.7.4 || 3.1.2)

Transport

17

Page 18: Смирнов Александр, Security in Android Application

- Use explicit intents- Validate Input- Manifest:

intent-filter = exported=«yes»

Intent

18

Page 19: Смирнов Александр, Security in Android Application

- Secure PUSH- Mobile application- SIMApplets- DCV (Dynamic Code Verification)

2FA: SMS

19

Page 20: Смирнов Александр, Security in Android Application

- Custom keyboard- Secure persistent datastore- No EditText- No immutable (Strings -> char[])- Notify if root

Insecure Device

20

Page 21: Смирнов Александр, Security in Android Application

- Check debug- Verify sign- Emulator check- Obfuscation- JNI

Reverse Protection

21

Page 22: Смирнов Александр, Security in Android Application

Security

22

• IV •

One more sentence

Page 23: Смирнов Александр, Security in Android Application

- Convenience vs Security- Socialization & Tools- Layered Security- Better than others- OWASP TOP 10 Mobile Risks

One more sentence

23

Page 24: Смирнов Александр, Security in Android Application

Security

24

• V •

Appendix

Page 25: Смирнов Александр, Security in Android Application

- Cyber Risk Report: bit.ly/1MuoIDS- OWASP Top 10 Mobile Risks: bit.ly/1FAIJiv- DefCon Groups List: bit.ly/1JQlNgC- Triada Malware: bit.ly/1qvyFqY- Obfuscation tools list: bit.ly/1XiHf6Z- Security Official Docs: bit.ly/1qvw1BK- Diffie–Hellman Video: bit.ly/23jV7Se- Tools for SA and Hacking: bit.ly/1qvxpUM

Additional Information

25

Page 26: Смирнов Александр, Security in Android Application

- Android Security Model- Reality- Vulnerabilities- One more sentence

Result

26