OWASP Mobile App


Dampak dari kebocoran security / credentials adalah memungkinkan orang tidak bertanggungjawab memiliki akses data-data rahasia / private (kebocoran data).

M1: Improper Credential Usage
Contoh : Hardcoded, Insecure (tidak di enkrip), menyimpan password di device pengguna.

Solusi : Jangan hardcode credentials, harus di encrypt, jangan simpan password di device pengguna.

M2: Inadequate Supply Chain Security
Contoh : Kurangnya Keamanan di Komponen Pihak Ketiga (library / dependency), orang dalam / karyawan jahat yang dengan sengaja memasukan celah / malware.

Solusi : Cek dan validasi penggunaan library, selalu lakukan code review untuk saling mengecek keamanan code base.

M3: Insecure Authentication/Authorization
Contoh : End point back end dapat di akses tanpa autentifikasi, menyimpan credentials pada device pengguna termasuk menggunakan fingger print / face id, kebijakan kata sandi yang lemah (tidak menggunakan standar kombinasi yang kuat)

Solusi : selalu verifikasi setiap end point, sebaiknya jangan simpan credentials pengguna atau gunakan verifikasi ganda menggunakan PIN dsb ketika pengguna melakuka action sensitif, gunakan standar kombinasi password yang kuat.

M4: Insufficient Input/Output Validation
Contoh : SQL Injection

Solusi : Selalu set max length pada edit text, validasi user input, gunakan library yang sudah handle security issue seperti Room Database

M5: Insecure Communication
Contoh : terjadi perubahan data yang dikirm / request upaya dari man-in-the-middle attack, sehingga terjadi kebocoran atau perubahan data, misalnya data jumlah uang yang di transfer / nomor rekening tujuan.

Solusi : selalu gunakan SSL/TLS di sisi server, jika memungkinkan encrypt data yang dikirim ke server sebagai pertahanan kedua.

M6: Inadequate Privacy Controls
Contoh : kebocoran informasi identitas pribadi karena insecure data storage and communication & insecure authentification and authorization

Solusi : Hanya minta / simpan data sensitif pengguna (Nomor KTP, Tanggal Lahir, Nama Orang Tua) jika benar-benar diperlukan, amankan tempat penyimpanan dan komunikasi client server seperti menggunakan SSL/TLS dan enkripsi, pastikan data sensitif pengguna hanya bisa diakses dengan autentifikasi (misal harus login terlebih dahulu atau harus memasukan PIN)

M7: Insufficient Binary Protections
Contoh : reverse engineering dari APK menjadi source-code, sehingga memungkinkan orang jahat untuk mengambil data sensitif aplikasi seperti app key dsb.

Solusi : gunakan tehnik obfuscation / pengacakan code ketika compile app sehingga code tidak mudah dibaca, salah satu yang sering digunakan dalam pengembangan aplikasi android adalah proguard, jika memungkinkan gunakan dexguard atau library berbayar lainnya yang lebih aman.

M8: Security Misconfiguration
- Jangan menggunakan kredensial default / hardcode.
- Hanya minta izin yang diperlukan untuk mengurangi resiko kebocoran data.
- Jangan gunakan cleartext traffic dan gunakan SSL pinning jika memungkinkan.
- Nonaktifkan fitur debugging di versi produksi aplikasi.
- Nonaktifkan mode pencadangan (backup mode Android): Dengan menonaktifkan mode pencadangan pada perangkat Android, Anda mencegah penyertaan data aplikasi dalam pencadangan perangkat, memastikan bahwa data sensitif dari aplikasi tidak disimpan dalam pencadangan perangkat.
- Batasi akses ke aplikasi dengan hanya mengekspor class yang benar-benar perlu untuk diekspor atau tambahkan autentifikasi untuk mengakses class tersebut.

M9: Insecure Data Storage
Use Strong Encryption: Implement robust encryption algorithms and practices to protect sensitive data both at rest and in transit. Utilise industry-standard encryption algorithms and ensure that encryption keys are securely stored and managed.

Secure Data Transmission: Utilise secure communication protocols (e.g., HTTPS, SSL/TLS) to protect data during transmission between the mobile application and backend servers. Avoid sending sensitive data over unsecured channels.

Implement Secure Storage Mechanisms: Store sensitive data in secure storage locations that are inaccessible to unauthorised users. Use platform-specific secure storage mechanisms provided by the mobile operating system, such as Keychain (iOS) or Keystore (Android).

Employ Proper Access Controls: Implement strong access controls to restrict unauthorised access to sensitive data. Authenticate users securely, enforce role-based access controls, and validate user permissions before granting access to sensitive information.

Validate Input and Sanitize Data: Implement input validation and data sanitization techniques to prevent injection attacks and ensure that only valid and expected data is stored. Validate user inputs to mitigate the risk of malicious code injection or unintended data leakage.

Apply Secure Session Management: Implement secure session management techniques, such as using randomly generated session tokens, setting proper session timeouts, and securely storing session data on the client and server sides.

Regularly Update and Patch Dependencies: Keep all libraries, frameworks, and third-party dependencies up to date, as they may contain security vulnerabilities that could lead to insecure data storage. Regularly apply security patches and updates provided by the respective vendors.

Stay Informed: Stay up to date with the latest security threats and vulnerabilities in the mobile application landscape. Monitor security forums, security advisories, and mobile platform updates to ensure timely mitigation of emerging risks.

M10: Insufficient Cryptography
Use Strong Encryption Algorithms: Implement widely accepted and secure encryption algorithms, such as AES (Advanced Encryption Standard), RSA (Rivest-Shamir-Adleman), or Elliptic Curve Cryptography (ECC). Stay updated with current cryptographic standards and avoid deprecated or weak algorithms.

Ensure Sufficient Key Length: Select encryption keys with an appropriate length to ensure strong cryptographic strength. Follow industry recommendations for key lengths, considering the specific encryption algorithm being used.

Secure Storage of Encryption Keys: Ensure encryption keys are securely stored on the mobile device. Avoid storing keys in plain text or easily accessible locations. Consider using secure storage mechanisms provided by the operating system or utilizing hardware-based secure storage options.

Employ Secure Transport Layer: Use secure transport layer protocols, such as HTTPS (HTTP Secure), for transmitting encrypted data over networks. Implement proper certificate validation and ensure secure communication channels between the mobile app and backend systems.

Validate and Authenticate: Implement strong validation and authentication mechanisms to verify the integrity and authenticity of parties involved in the encryption process. Perform proper validation of certificates, digital signatures, or other mechanisms used for authentication.

Komentar