Android Cheat Sheet PDF
Android Cheat Sheet PDF
Source: https://www.owasp.org/index.php/Android_Testing_Cheat_Sheet
• /data/data/app_folder
• /sdcard/
• /sdcard1/
Android applications need to store data locally in sqlite files or XML structures and hence need to
performs either SQL/XML Queries or file I/O.
This gives rise to 2 major issues.
1. SQL / XML injection, and if the reading intent is publicly exposed another application
could read this.
2. Local file read which can allow other application to read files of the application in question
and if they contain sensitive data then data leakage via this media.
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be
considered. XSS will expose the entire application to the attacker as HTML5 applications will
have the ability to call native functionality and hence control over the entire application.
(WebViews)
Additionally a backup of the application could be made using `adb backup` option and that can be
analyzed to identify what the application stores and leaks when the client interacts with it.
1. On Server side
• Identify all ssl endpoints.
• Perform SSL Cipher Scan using (sslscan)[1] or similar software.
• SSLv2, SSLv3 is disabled
• TLS 1.2 and 1.1 is supported (1.2 is essential to ensure highest possible secure connection)
• RC4 and CBC Based Ciphers are disabled
• DH Params are >2048 Bits
• SSL Certificate is signed with atleast sha2 / sha256
• ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred
• SSL Certificate is from Trusted RootCA
• SSL Certificate is not expired
• Verify Interprocess communication implementation
2. On Device Side
• Ensure application is working correctly by navigating around.
• Put a proxy in between the application and remote server. If application fails to load.
Application might be doing cert validation. Refer logcat if any message is printed.
• Place Proxy RootCA in trusted root CA list in device. (Burp)[2] (OWASP-ZAP)[3]
• Try using application again. If application still doesn't connect, application might be doing cert
pinning.
You could bypass the certification pinning by Hooking or changing the Smali code:
Using Xposed:
• Install (Xposed Framework)[4] and (Just Trust Me)[5], enable JustTrustMe and then reboot
device.
• Try again if everything works we have a application which employs certification pinning and
we have bypassed it using the xposed module.
• Android Security provider has been properly updated against SSL Exploits
Changing SMALI:
• Identify/search for the methods where the certificate pinning is implemented (keywords like
'sha256/' followed by a certificate value such as
"sha256/wl0L/C04Advn5NQ/xefY1aCEHOref7f/Q+sScuDcvbg="
• Change the value of the certificates being used by the one used by you generated BURP
certificate
• Handling credentials: does the application make use of authorization tokens instead of asking
Credentials all the time?
• Verify that the application allows access only to the allowed roles
• Storing username and password in the data storage instead of using AccountManager
• If you have access to the source code, doing code review on the Client app and the server
API.
• If you don't, you could still check the code by decompiling the APK
We strongly recommend a Code Review in this case. This will definitely extract many potential
vulnerabilities due to bad implementation