26
SECURITY IN ANDROID APPLICATION 08/04/2016 ALEXANDER SMIRNOV v1.0

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

Embed Size (px)

Citation preview

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

SECURITYIN ANDROID APPLICATION

08/04/2016ALEXANDER SMIRNOV

v1.0

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

- 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, Александр Смирнов, RedMadRobot, Москва

Why?

3

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

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

Agenda

4

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

Security

• I •

Android Security Model

5

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

6

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

Application Isolation

7

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

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

Zygote

8

App 1

App 2

App 3

Zygote

fork()

fork()

fork()

start newApp

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

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

Permissions

9

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

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

Android Security Overview

10

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

• II •

Android Security ModelReality

Security

11

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

12

Root

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

13

TRIADA

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

Security

14

• III•

Vulnerabilities

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

- Memory Cache- DB + SQLCipher- SharedPreference +

MODE_PRIVATE + Cipher- 21+ setStorageEncryption for

local files- KeyStore

Data Storage

15

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

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

(okhttp 2.7.4 || 3.1.2)

Transport

16

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

- Use explicit intents- Validate Input- Manifest:

intent-filter = exported=«yes»

Intent

17

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

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

2FA: SMS

18

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

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

Insecure Device

19

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

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

Reverse Protection

20

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

Security

21

• IV •

One more sentence

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

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

One more sentence

22

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

Security

23

• V •

Appendix

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

- 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

24

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

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

Result

25