Insufficient Cryptography
M7: Security Misconfiguration is a category that covers various types of flaws that allow attackers to exploit or abuse the settings or features of mobile applications or their related systems or services. Security configuration is the process of setting up or adjusting the security options or parameters of an app or a system or a service to make it more secure or suitable for its purpose. For example, when you use a banking app to access your account, you might need to enable or disable some security features, such as fingerprint login, two-factor authentication, transaction limit, etc.
Security misconfiguration can happen when mobile applications or their related systems or services do not configure or maintain their security settings or features properly or securely. For example, some common flaws are:
Insecure default settings: Some applications or systems or services use insecure default settings that are easy to exploit or bypass by attackers. They might use default passwords (such as “admin” or “guest”), default ports (such as 80 or 443), default encryption keys (such as 1234567890abcdef), etc. For example, an app that uses a database might use the default username and password of the database, which are well-known and easy to guess by attackers.
Insecure network services: Some applications or systems or services use insecure network services that expose them to unnecessary risks or reduce their security effectiveness. They might use unencrypted communication protocols (such as HTTP or FTP), weak encryption algorithms (such as DES or MD5), improper certificate validation (such as accepting self-signed certificates), etc. For example, an app that sends your credit card information might use HTTP to send it to the server, which means that anyone who can access the network can see or capture your credit card information in plain text.
Improper permissions: Some applications or systems or services use improper permissions that grant more access or privileges than needed to users or processes. They might use excessive permissions (such as READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE), unnecessary permissions (such as CAMERA or MICROPHONE), incorrect permissions (such as READ_CONTACTS instead of WRITE_CONTACTS), etc. For example, an app that provides weather information might ask for your camera and microphone permissions, which are not relevant or necessary for its functionality.
Incorrect error handling: Some applications or systems or services use incorrect error handling that reveals too much information or causes unexpected behavior when an error occurs. They might use verbose error messages (such as stack traces or SQL queries), generic error messages (such as “An error occurred”), unhandled exceptions (such as NullPointerException or IndexOutOfBoundsException), etc. For example, an app that searches for products might display a SQL query with the user’s input when a SQL error occurs, which can reveal the database structure and the user’s input to attackers.
These flaws can lead to serious consequences, such as data breach, account takeover, privilege escalation, denial of service, etc. Therefore, it is very important for mobile applications and their related systems and services to implement and enforce secure configuration mechanisms, such as:
Secure default settings: Applications and systems and services should use secure default settings that are hard to exploit or bypass by attackers. They should use strong passwords (such as “a9f3Gh7!”), random ports (such as 54321), secure encryption keys (such as 0987654321fedcba), etc. For example, an app that uses a database should use a strong username and password for the database, which are unique and random.
Secure network services: Applications and systems and services should use secure network services that protect them from unnecessary risks or enhance their security effectiveness. They should use encrypted communication protocols (such as HTTPS or SFTP), secure encryption algorithms (such as AES or SHA), proper certificate validation (such as verifying the certificate issuer and expiration date), etc. For example, an app that sends your credit card information should use HTTPS to send it to the server, which means that only you and the server can see or access your credit card information in encrypted form.
Proper permissions: Applications and systems and services should use proper permissions that grant only the minimum access or privileges needed to users or processes. They should use least privilege principle (such as granting only read permission when write permission is not needed), need-to-know principle (such as granting only camera permission when microphone permission is not needed), principle of separation of duties (such as granting only write contacts permission when read contacts permission is not needed), etc. For example, an app that provides weather information should only ask for your location permission, which is relevant and necessary for its functionality.
Correct error handling: Applications and systems and services should use correct error handling that conceals sensitive information and ensures normal behavior when an error occurs. They should use informative but concise error messages (such as “Invalid input” or “Server unavailable”), specific but generic error messages (such as “Invalid username” instead of “User does not exist”), handled exceptions (such as try-catch-finally blocks or error handlers), etc. For example, an app that searches for products should display a generic error message with the user’s input when a SQL error occurs, which can hide the database structure and the user’s input from attackers.
I hope this explanation helps you understand what M7: Security Misconfiguration is and why it is important. If you want to learn more about this category and how to prevent it, you can check out these resources:
[M7-Security Misconfiguration | OWASP Foundation]: The official website of the OWASP Mobile Top 10 project. It contains detailed information about this category and links to other useful resources.
[Mobile App Security: How To Secure Your Mobile App Configuration]: A blog post that provides an overview of the best practices for mobile app configuration security.
[Mobile App Security Testing | Cybrary]: A course that teaches you how to test and secure mobile applications against various security risks.
Last updated