is my app secure?

69
Neo: Is my App Secure ? Herman Duarte @hdontwit Cláudio André @clviper 1

Upload: claudio-andre

Post on 19-Aug-2015

309 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Is my app secure?

Neo: Is my App Secure ?

Herman Duarte @hdontwit Cláudio André @clviper

1

Page 2: Is my app secure?

Agenda

●  Who ●  Objectives ●  Approach ●  Building blocks ●  Analysis Statistics ●  How we did it ●  Interesting findings ●  Q&A

2

Page 3: Is my app secure?

Who

Herman Duarte @hdontwit

3

Page 4: Is my app secure?

Who

Cláudio André @clviper

4

Page 5: Is my app secure?

Who

-  We work @ Integrity S.A. -  Awesome co-workers and awesome

workplace. -  We identify security issues for our clients to

help them lower their security risks.

5

Page 6: Is my app secure?
Page 7: Is my app secure?
Page 8: Is my app secure?
Page 9: Is my app secure?
Page 10: Is my app secure?
Page 11: Is my app secure?

-  Evaluate iOS and Android apps from a security point of view.

-  Automate pentest tasks for both Android and

iOS -  Share results. -  Have fun :)

Objectives

11

Page 12: Is my app secure?

Approach

Page 13: Is my app secure?

13

Page 14: Is my app secure?

14

Page 15: Is my app secure?

15

Page 16: Is my app secure?

+50  Apps  

Page 17: Is my app secure?

Client

17

Page 18: Is my app secure?

Network

18

Page 19: Is my app secure?

Server

19

Page 20: Is my app secure?

20

Page 21: Is my app secure?

21

Page 22: Is my app secure?
Page 23: Is my app secure?

Vulns by Owasp Risk

23

Page 24: Is my app secure?

Android Vulns by Owasp Risk

24

Page 25: Is my app secure?

iOS Vulns by Owasp Risk

25

Page 26: Is my app secure?

Insecure Data Storage

26

Page 27: Is my app secure?

Transport Layer Security

Android iOS

27

Page 28: Is my app secure?

Certificate Pinning

28

Page 29: Is my app secure?

iOS Background Screenshot

29

Page 30: Is my app secure?

Android Obfuscation

30

Page 31: Is my app secure?

Android Obfuscated Apps By Category

31

Page 32: Is my app secure?

iOS Binary Protection

All  apps  analyzed  have  the  following  security  features  enabled  in  the  binary:    ●  PIE  (Posi=on  Independent  Executable  aka  ASLR)  ●  ARC  (Automa=c  Reference  Coun=ng)  ●  SSPRO  (Stack  Smashing  Protec=on)  ●  Encrypted  binary  

32

Page 33: Is my app secure?
Page 34: Is my app secure?

34

Page 35: Is my app secure?

-  iOS and Android Security Analyser Tools -  Command line. -  Way to mass analyse ipas and apks. -  Search and Downloads apps (Android only) -  Bulk decryption of apps (iOS only) -  Bulk install, uninstall and backup of apps -  Easy way to extend heuristics check (Android only,

for now)

35

iStat & Droidstat

Page 36: Is my app secure?

36

iStat

https://youtu.be/bOtosGya_G4

Page 37: Is my app secure?

37

https://youtu.be/zPKUj8rb_ok

Droidstat – Intro Video

Page 38: Is my app secure?

Droidstat - Checks Config File

38

Page 39: Is my app secure?

39

https://youtu.be/uWJZa0vgbQ4

Droidstat – Example Findings Video

Page 40: Is my app secure?

Interesting Findings

Page 41: Is my app secure?

Invoice Registration App (Android)

41

-  Under 100.000 installs. -  The credentials used for this service is used

on multiple Portuguese Government Public Services websites.

Page 42: Is my app secure?

Invoice Registration App (Android)

42

Page 43: Is my app secure?

Invoice Registration App (Android)

43

Page 44: Is my app secure?

Invoice Registration App (Android)

44

Page 45: Is my app secure?

Invoice Registration App

45

Page 46: Is my app secure?

Invoice Registration App

46

Page 47: Is my app secure?

Invoice Registration App (Android)

47

Page 48: Is my app secure?

Invoice Registration App (Android)

48

Page 49: Is my app secure?

Invoice Registration App (Android)

49

Page 50: Is my app secure?

Invoice Registration App

50

Page 51: Is my app secure?

Invoice Registration App (Android)

51

Page 52: Is my app secure?

Invoice Registration App (Android)

Recommendations: -  Use right TLS implementations that correctly

validate TLS certificates. -  Use strong cryptographic algorithms to store

sensitive information.

52

Page 53: Is my app secure?

Invoice Registration App – Dev Response

53

“As for the problems, although I think that both are difficult to replicate in a real case , I recognize that the app can be improved , taking this into account we will release an update until the weekend to solve the problems.” June 9

Page 54: Is my app secure?

Invoice Registration App – Dev Response

54

“As for the problems, although I think that both are difficult to replicate in a real case , I recognize that the app can be improved , taking this into account we will release an update until the weekend to solve the problems.” June 9 “The update of this weekend corrects the problems mentioned. Thanks again for the analysis.” June 22

Page 55: Is my app secure?

Shopping App (Android & iOS)

55

-  Between 1M and 5M installs -  More than 10M users.

Page 56: Is my app secure?

Shopping App (Android & iOS)

56

Page 57: Is my app secure?

Shopping App (Android & iOS)

57

Page 58: Is my app secure?

Shopping App (Android & iOS)

58

Page 59: Is my app secure?

Shopping App (Android & iOS)

59

Page 60: Is my app secure?

Shopping App (Android & iOS)

60

Page 61: Is my app secure?

Shopping App (Android & iOS)

61

Page 62: Is my app secure?

Shopping App (Android & iOS)

62

Page 63: Is my app secure?

Shopping App (Android & iOS)

Recommendations: -  Correctly override TLS implementations or

use the framework’s default one, that correctly validate certificates chains.

63

Page 64: Is my app secure?

Mr.Smith: So, you’re asking me if your app is secure?

Page 65: Is my app secure?

M2 - Insecure Data Storage

●  In iOS some applications still uses property list files (.plist), or NSUserDefaults (files created in the app Documents folder) to store sensitive information, instead of the keychain.

●  In Android some applications store sensitive information

in shared preferences file and SQLite databases without any type of encryption.

65

Page 66: Is my app secure?

M3 - Insufficient Transport Layer Protection

●  The OS’s framework already does the hard work in TLS, so what we have seen is that the majority of TLS is correctly implemented; Nonetheless when developers override the default implementation, most of the time bad things happen.

●  We have seen that in Android, Certificate Pinning, is

more used that in iOS applications.

66

Page 67: Is my app secure?

M4 - Unintended Data Leakage

●  In iOS the background screenshot information leakage happens most of the time, because it is a side effect of the OS behaviour, that most of developers are not aware of.

67

Page 68: Is my app secure?

M10 - Lack of Binary Protections

●  Regarding Obfuscation we have seen in Android that there are not many apps obfuscated although the SDK comes with tools to do this out of the box.

●  In iOS because of default configurations of XCode,

binary security features (e.g. PIE, ARC, SSPRO) are applied in all of the apps analyzed.

68

Page 69: Is my app secure?

Q&A