Alternative Mobile Messengers From An OWASP Point Of View

research

During times of social distancing in the years of the pandemic and the growing popularity of alternative mobile messengers, SEC Consult decided to evaluate some of these alternatives for their security mechanisms.

Woman typing on Smartphone

The evaluation is based on the OWASP MASTG and MASVS that are being used actively by SEC Consult for conducting standardized and thorough security assessments of mobile applications. Thus, this blog post will first give a brief introduction into the key facts of the OWASP MASTG and MASVS followed by a short evaluation of selected mobile messengers.1

OWASP Mobile Application Security Testing Guide (MASTG) & Mobile Application Security Verification Standard (MASVS)

What is the MASTG?

The OWASP Mobile Application Security Testing Guide is a security standard for mobile apps and a comprehensive testing guide. It covers the processes, techniques and tools used during a mobile app security test. It is also in use as a comprehensive set of test cases that enables testers to deliver consistent and complete results.

What is the MASVS?

The overall goal of the MASVS is to provide a foundation for mobile application security (MASVS-L1), while also enabling the inclusion of defense-in-depth measures (MASVS-L2) and protection against client-side threats (MASVS-R).

The MASVS is meant to achieve the following:

  • Provide requirements for software architects and developers seeking to develop secure mobile applications,

  • Offer an industry standard, which can be used as a checklist in mobile app security reviews for verifying the security maturity,

  • Clarify the role of software protection mechanisms in mobile security and provide requirements to verify their effectiveness,

  • Provide specific recommendations on what level of security is recommended for different use-cases.

Whom is it for?

Security Consultants, Security Engineers, Administrators, DevOps Engineers, Developers

Why do we use it?

We as SEC Consult have chosen to use the OWASP MASTG for our mobile penetration assessments, because this standard is publicly accessible for everyone and well renowned in the mobile application security community. This means that customers, colleagues and even other companies, can use a common terminology when communicating about vulnerabilities and ways to mitigate them.

MASTG Checklist

There is a checklist available for use in security assessments.2 It is based on the MASVS and the MASTG standards, and it contains links to the MASTG test cases for each requirement.

Sponsorship

The Open Web Application Security Project® (OWASP) is a non-profit foundation that is community-led with tens of thousands of members. It is widely known for the OWASP Top 10 Vulnerabilities and a variety of open-source projects. We want to support their efforts in these great projects and have decided to support them both financially and by applying their mobile standard for our Mobile Security Product.

Smartphone showing apps

Mobile Messenger Evaluation

During times of social distancing and growing popularity of alternative messengers, SEC Consult decided to evaluate some of these alternatives for their security mechanisms. 15 applications have been analyzed on the mobile operating systems iOS and Android.

Some of the chosen applications were not available on the Apple App Store. Therefore, only 11 applications could be analyzed on iOS.

The following apps have been analyzed during 2022. More recent versions of those applications may already implement better security measures.

Analyzed Apps

Application Name iOS Android
Berty X X
Briar   X
Bridgefy X X
Chat.onion   X
Dust X X
Element X X
Grape X X
JioChat X X
KakaoTalk X X
Kik X X
Line X X
Namaste Bharat X X
Silence   X
Tox.chat   X
Viber X X

Test Devices

The iOS applications have been tested on an iPhone SE (1. Generation) running iOS 14.4.2 at the time of the analysis.

Android applications have been analyzed on a Pixel 3a running Android 11 at the time of the analysis.

Test Cases

The above mentioned mobile applications were analyzed for the following test cases of the OWASP MASTG:

 

Testing Local Data Storage (MSTG-STORAGE-1 and MSTG-STORAGE-2)

The applications were tested for the following statement:

The Keychain or Keystore is cleared when the application is being reinstalled

Reference in the Mobile Application Security Testing Guide:

https://mobile-security.gitbook.io/mobile-security-testing-guide/android-testing-guide/0x05d-testing-data-storage#testing-local-storage-for-sensitive-data-mstg-storage-1-and-mstg-storage-2

https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06d-testing-data-storage#testing-local-data-storage-mstg-storage-1-and-mstg-storage-2

 

Testing Custom Certificate Stores and Certificate Pinning (MSTG-NETWORK-3 and MSTG-NETWORK-4)

The applications were tested for the following statement:

The application uses SSL Pinning for the issued network requests

Reference in the Mobile Application Security Testing Guide:

https://mobile-security.gitbook.io/mobile-security-testing-guide/android-testing-guide/0x05g-testing-network-communication#testing-custom-certificate-stores-and-certificate-pinning-mstg-network-4

https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06g-testing-network-communication#testing-custom-certificate-stores-and-certificate-pinning-mstg-network-3-and-mstg-network-4

 

Testing Biometric Authentication (MSTG-AUTH-8 and MSTG-STORAGE-11)

The applications were tested for the following statement:

The application offers biometric authentication to secure the access to the messenger application

Reference in the Mobile Application Security Testing Guide:

https://mobile-security.gitbook.io/mobile-security-testing-guide/android-testing-guide/0x05f-testing-local-authentication#testing-biometric-authentication-mstg-auth-8

https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06f-testing-local-authentication#testing-local-authentication-mstg-auth-8-and-mstg-storage-11

 

Testing App Permissions (MSTG-PLATFORM-1)

The applications were tested for the following statement:

The application requests 20 or more permissions

Reference in the Mobile Application Security Testing Guide:

https://mobile-security.gitbook.io/mobile-security-testing-guide/android-testing-guide/0x05h-testing-platform-interaction#testing-app-permissions-mstg-platform-1

https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06h-testing-platform-interaction#testing-app-permissions-mstg-platform-1

 

Testing Root and Jailbreak Detection (MSTG-RESILIENCE-1)

The applications were tested for the following statement:

The application can be installed and used on a rooted/jailbroken device without an additional warning or the application exiting

Reference in the Mobile Application Security Testing Guide:

https://mobile-security.gitbook.io/mobile-security-testing-guide/android-testing-guide/0x05j-testing-resiliency-against-reverse-engineering

https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06j-testing-resiliency-against-reverse-engineering#jailbreak-detection-mstg-resilience-1

Results of the Analysis

The results of the analysis are summarized in the following table. 

Some interesting key facts are that 78% of the iOS and 43% of the Android applications request 20 or more application permissions. Of course, some permissions are necessary for the operation of an application. However, an excessive request for permissions allows them to access more data than they actually need to operate.

Furthermore, only 22% of iOS applications use SSL pinning to ensure that the communication between app and server is further secured. Especially when it comes to messaging apps, making sure that only the expected server is communicating with the app to ensure the confidentiality of messages is something that one would expect. However, to actually exploit such an issue, the attacker would face some obstacles, such as being in a man-in-the-middle position between the victim's device and the server.

Interestingly enough, 78% of the iOS applications clear the Keychain upon re-installation. In case a user sells their phone and forgets to wipe the whole device, the new owner could access the previously stored data (e.g., user credentials) in the Keychain and thus access the user account of the previous user. In Android, all data belonging to a specific app and stored in the Keystore is automatically wiped upon uninstallation of the app, making sure that the mentioned scenario would not be applicable.

Testcase iOS Android
The Keychain/Keystore is cleared when the application is being reinstalled 78% 100%
The application uses SSL Pinning for the issued network requests 22% 79%
The application offers biometric authentication to secure the access to the messenger application 56% 0%
The application requests 20 or more permissions 78% 43%
The application warns the user or exits the application, when it is installed and used on a rooted/jailbroken device 0% 0%
Results of Mobile Messenger Evaluation comparing iOS and Android

The below figure gives a graphical representation of the results of the analysis.

 

Conclusion

During our research we focused on some of the OWASP MASTG test cases. Our research showed that there are quite a few differences between how the messenger applications integrate into the iOS or Android operating system. Perhaps the most interesting result from the analysis is that there is quite a big difference between the apps protecting their client to server communication with SSL Pinning based on the operating system. This communication might very well include sensitive information, which one might hope would be secure during transit. It is important to note, however, that during the analysis the applications were not further investigated into whether the communication between two parties using an app was encrypted or even end-to-end encrypted or that data being sent between the parties was stored securely on the device. For future research this would be interesting to analyze, and to verify whether especially those messengers that want to provide a high level of security can really stand up to their claim.

 

This blog post has been published on behalf of the SEC Consult Vulnerability Lab.

 

This research have been conducted in 2022. Some of the evaluated apps as well as the guide might have changed since that time. 

The current version is v1.6.0 but an older version was used for the short evaluation.

Are you interested in working at SEC Consult?

SEC Consult is always searching for talented security professionals to work in our team.