4. Exclude delicate information from backups
By default, cell purposes might retailer information in areas which can be included in system backups. If an attacker good points entry to a person’s backup, delicate utility information could possibly be uncovered.
Builders ought to explicitly exclude delicate data from being included in backups through the use of configurations resembling android:allowBackup=false in Android and NSFileProtectionComplete in iOS.
In case your backup contains notably delicate information, then it’s endorsed to both exclude this information or, if you happen to can’t exclude it, require end-to-end encryption.
To exclude information from backup, configure the backup_rules.xml file positioned in res/xml. Then, configure the file in accordance with the info persistence and safety necessities of the applying.
Requiring end-to-end encryption
If you cannot exclude delicate information out of your backup, then it’s endorsed to require end-to-end encryption, which suggests permitting backups solely on Android 9 or greater and solely when the lock display is ready. You may obtain this through the use of the requireFlags=”clientSideEncryption” flag, which must be renamed to disableIfNoEncryptionCapabilities and set to true ranging from Android 12.
Urged learn: OWASP MASVS & MASTG: Redefining Cellular App Safety in 2025 [Guide]
5. Use safe encryption modes
Encryption is important for safeguarding delicate information, however utilizing weak encryption modes can render it ineffective.
Builders ought to use sturdy, industry-accepted encryption algorithms, resembling AES-GCM or AES-CCM, and keep away from insecure modes like ECB, which might leak information patterns. Whereas CBC is safer than ECB, improper implementation, particularly incorrect padding, can result in vulnerabilities resembling padding oracle assaults. Correct IV dealing with and integrity checks (e.g., HMAC) are mandatory when utilizing CBC.
6. Expend-to-date APK signing schemes
For Android purposes, utilizing older APK signing schemes can result in safety vulnerabilities, resembling APK modification or tampering.
Builders ought to at all times use the newest Android App Signing schemes (resembling v2 or v3) to make sure the integrity and authenticity of their purposes. Apksigner may also help right here to confirm the signing scheme used to signal the APK.
apksigner confirm --verbose app-release.apk
7. Disable the debuggable flag within the AndroidManifest
The android:debuggable flag, when enabled, permits anybody to connect a debugger to the applying, probably exposing delicate data resembling encryption keys, and permits attackers to tamper with the app’s execution. For these causes, this flag must be set to false within the AndroidManifest.xml file to stop unauthorized debugging.
android:debuggable="false" />
8. Disable debugging for WebViews
WebViews enable cell apps to render internet content material, however enabling debugging for WebViews in manufacturing generally is a safety danger. Attackers can execute arbitrary JavaScript code, steal person credentials, or bypass safety controls.
Builders ought to disable debugging options in WebViews utilizing setWebContentsDebuggingEnabled(false) for Android and WKWebView configurations for iOS.
9. Use safe encryption algorithms
Weak or deprecated cryptographic algorithms could be simply cracked by attackers, placing delicate information in danger.
Builders ought to at all times use trendy cryptographic requirements, resembling AES-256 for encryption and SHA-256 or SHA-3 for hashing. For sturdy encryption, use AES (Superior Encryption Commonplace) with GCM mode for symmetric encryption.
They need to additionally keep away from customized cryptographic implementations and as an alternative depend on well-vetted libraries like OpenSSL, Bouncy Fort, or Apple’s CryptoKit.
How can Appknox enable you automate compliance with MASTG?
Staying compliant with OWASP MASTG could be difficult, particularly as cell threats and regulatory necessities evolve. Appknox simplifies this course of by integrating automated safety testing straight into your growth pipeline. Our platform maps each scan to MASTG’s finest practices, delivering clear, actionable studies that spotlight gaps and supply step-by-step remediation steerage.
Whether or not you’re a developer, DevOps supervisor, safety analyst, or CISO, Appknox helps you automate your safety compliance and persistently meet the best safety requirements, with out slowing down your launch cycles.
Conclusion
As cell threats develop extra subtle, following one of the best practices really useful by OWASP Cellular Utility Safety (MAS) is now not optionally available—it’s important for safeguarding your customers, your information, and your model popularity.
By following these OWASP MAS finest practices and leveraging automation with Appknox, you may confidently preserve tempo with evolving threats and compliance calls for.
🚀 Able to put OWASP MASTG into motion?
Join a free Appknox trial in the present day and begin securing your cell apps with automated testing that checks each field—quick.