Talk given in Bsides Lisbon 2015 by me and Herman Duarte.
Based on our experience on testing mobile applications, both on Android and iOS, we challenged ourselves on doing an assessment of both app stores' applications, using OWASP mobile top 10 as a reference in terms of vulnerabilities to search for.
As a criteria for choosing the apps to test, we focused on the most common mobile applications available in the Portuguese Android and iOS app stores, from several categories such as finance, social media, medical and security.
For this talk we expect to highlight the most interesting design choices both good and bad and what should be done to avoid such mistakes.
5. 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
6.
7.
8.
9.
10.
11. - 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
32. 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
35. - 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
41. Invoice Registration App (Android)
41
- Under 100.000 installs.
- The credentials used for this service is used
on multiple Portuguese Government Public
Services websites.
52. Invoice Registration App (Android)
Recommendations:
- Use right TLS implementations that correctly
validate TLS certificates.
- Use strong cryptographic algorithms to store
sensitive information.
52
53. 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
54. 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
65. 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
66. 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
67. 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
68. 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