On January 10th 2024 the Cyber Security Agency of Singapore (CSA) published V1.0 of the Singapore Safe App Standard. This is intended to help app developers and providers enhance mobile app security. The standard provides a common security benchmark and guidance to app developers and providers on the necessary security controls and best practices to better protect any mobile applications, and in so doing, enhance the protection of user data and app transactions. It is intended to cover apps developed or deployed in Singapore.
This standard builds on previous work such as OWASP MASVS. These recommendations should be used to secure and test your mobile apps and can also be used to evaluate the effectiveness of security solutions. It is therefore important that vendors make very clear how their solutions fit with the framework.
Approov is a leading provider of end-to-end mobile app protection and is very supportive of this initiative by the CSA. This blog introduces the Singapore Safe App Standard and summarizes how the Approov solution can help enterprises align their mobile app security with the guidelines. More information about how Approov aligns with MASVS can be found here.
The Safe App Standard was developed by the Cyber Security Agency of Singapore (CSA) in consultation with industry partners from financial institutions, tech organizations, consultancy firms, and government agencies.
The Monetary Authority of Singapore (MAS) Technology Risk Management (TRM) Guidelines, first issued in 2013, established a set of best practices that financial institutions in Singapore must follow to manage their technology risks. The TRM Guidelines were updated in 2021. These MAS TRM Guidelines include a number of specific requirements for mobile application security: including putting in place app attestation and anti-tampering and also the recommendation to implement certificate pinning between apps and backend services.
The Safe App Standard references expands on these recommendations and references industry standards from the Open Web Application Security Project (OWASP), the European Union Agency for Network and Information Security (ENISA) and the Payment Card Industry Data Security Standard (PCI DSS)
The Safe App Standard is intended to evolve in view of the evolving risk landscape. V1.0 is targeted at applications that perform high-risk transactions; defined as “those that allow transactions with some or full access to users’ financial accounts, which when compromised, can possibly result in significant monetary losses”.
There is currently no enforcement element, but developers of applications created and hosted in Singapore are encouraged to adopt the standard in their app development.
The Standard focuses on four critical areas commonly targeted by threat actors. These are:
It is interesting to note that some elements of the comprehensive OWASP MASVS recommendations are not addressed in the Safe App Standard. The CSA have clearly decided to focus on some elements of mobile app security - and other aspects will certainly be addressed in later versions of the standard.
These elements of MASVS are covered by the Safe App Standard:
These elements of MASVS that are not covered in the Singapore Safe App standard:
Approov provides a unique and patented run-time shielding solution which is easy to deploy and protects your APIs and the channel between your apps and APIs from any automated attack. It uses a cryptographically signed “Approov token” to allow the app to provide proof that it has passed the runtime shielding process.
Integration involves including an SDK in your mobile app via a mobile app quickstart and adding an Approov token check in your backend API implementation. A full set of frontend and backend Quickstarts are available to facilitate integration with common native and cross-platform development environments.
Additionally, Approov provides a runtime secrets capability whereby app secrets are only delivered just-in-time to the app if it passes attestation. These secrets can then be used by the app, including as API keys to authenticate access to other APIs. In this case no modification to the backend API is required at all, making integration very fast and straightforward.
In summary, Approov provides the following security features which are relevant to both the Singapore TRM Guidelines and the Singapore Safe App Standards:
The Approov solution itself is implemented in a way that satisfies the first 3 sections (for Authentication, Authorization and Data Storage: see this description of the Approov Security Architecture.
The Approov solution systematically protects deployed apps from the threats in SECTION 4. Anti-Tampering & Anti-Reversing. These security controls ensure that apps run on trusted platforms, prevent tampering at runtime and ensure the integrity of the apps’ functionalities. In addition, the controls impede comprehension by making it difficult for attackers to figure out how the apps operate. We will look at each in detail:
RESILIENCE-BP01 Sign with certificates from official app stores.
This control is focused on checks which verify the integrity of the application, ensuring it has not been modified or repackaged. It can also focus on guaranteeing the runtime integrity of the application and the resources it depends on. However, dependence on official app store mechanisms is not the best approach: both Google and Apple are now allowing alternative app stores and sideloaded apps after pressure from the EU.
Approov captures signatures of valid apps and checks that the correct code is present at runtime. Tampering attempts are detected and prevent the app receiving valid Approov tokens or runtime secrets.
Approov analyzes the runtime memory space of the app sandbox and compares this to the expected layout. Mismatches are reported to the Approov cloud, allowing direct reporting and ensuring such an app does not receive valid Approov tokens or runtime secrets.
RESILIENCE-BP02 Implement jailbreak/root detection.
RESILIENCE-BP03 Implement emulator detection.
RESILIENCE-BP04 Implement anti-malware detection.
RESILIENCE-BP05 Implement anti-hooking mechanisms.
These controls are aimed at ensuring the mobile platform (Android, iOS etc.) have not been compromised in a way that gives an advantage when performing reverse engineering or manipulation of the app. This requirement includes a focus on root/jailbreak detection, virtual environment detection, as well as device attestation in order to guarantee the authenticity of the user device.
Various root and jailbreak detection approaches are integrated into the Approov SDK. This can be configured so the app can report the detection, as well as ensuring the app does not receive valid Approov tokens or runtime secrets. A range of debug detection approaches are also integrated into the Approov SDK, covering low level and high level debug attachments.
Approov has a range of specific detections for common instrumentation frameworks, such as Frida. Mechanisms are also in place to detect late attachment after the app has started. Further countermeasures are in place to detect the presence of hooking on key methods that might otherwise be used to prevent the detection of instrumentation frameworks.
Also, various checks are in place for both Android and iOS to determine if execution is on an emulator or simulator. On iOS, specific detection is made for apps running on an arm64 based Mac. Again, a direct response can be made in the app but crucially such an app never receives valid Approov tokens or runtime secrets. Approov RASP provides ongoing anti-hooking checks on apps to prevent unauthorized access, protect high-risk transaction operations and detect and prevent tampering and modification attempts at runtime.
RESILIENCE-BP06 Implement overlay, remote viewing, and screenshot countermeasures.
RESILIENCE-BP07 Implement anti-keystroke capturing or anti-keylogger against third-party virtual keyboards.
These controls concern application programming best-practices, but Approov can help by providing visibility to any modification of the runtime environment.
Any mobile app security program should include the following elements:
The TRM Guidelines and the Singapore Safe App Standard together provide a comprehensive set of best practices for mobile application security. App developers should endeavor to comply with these guidelines, as well as OWASP MASVS to be better positioned to defend their mobile applications and protect their customers.
For more information on Approov's API Threat Protection, try out our free demo today.