Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - Security SSL #68

Open
narayan8291 opened this issue Jun 23, 2018 · 1 comment
Open

Android - Security SSL #68

narayan8291 opened this issue Jun 23, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@narayan8291
Copy link

narayan8291 commented Jun 23, 2018

We can try to incorporate test cases that can be used to identify issues with SSL/TLS in Android apps. Reference Doc: https://developer.android.com/training/articles/security-ssl

  1. Loading custom certificates into the Android KeyStore.
    This is usually done to accept self-signed certs or certs signed using unknown CA.
    Regex Used: .keyStore.setCertificateEntry.

  2. HostName Verifier.
    Failing to check the hostname for a certificate.
    Regex: *public boolean verify(.String.SSLSession.)

NOTE:
===> This check needs to be done on the entire function and not just on the line of code. The function content has to be chunked out and matched with .return true;.

  1. Overriding SSLCheck in WebViews
    This is already a part of owasp_static_android.txt

  2. Overriding SSL Check
    Android apps can override SSL checks thus suppressing any SSL validation error.
    Regex: checkServerTrusted.*{}

NOTE:
====> This check needs to be done on the entire function and not just on the line of code. The function content has to be chunked out and matched with an empty string.

  1. SSLSocket
    According to the official Android doc,

Caution: SSLSocket does not perform hostname verification. It is up to your app to do its own hostname verification, preferably by calling getDefaultHostnameVerifier() with the expected hostname. Further beware that HostnameVerifier.verify() doesn't throw an exception on error but instead returns a boolean result that you must explicitly check.

Regex: .*SSLSocket.createSocket(.

@vincentcox vincentcox self-assigned this Jun 26, 2018
@vincentcox vincentcox added the enhancement New feature or request label Jun 26, 2018
@vincentcox
Copy link
Owner

Thanks for the detailed explanation! I will add them under the OWASP rules. Will keep you updated on the progress!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants