Android Testing Cheat Sheet



{| style="padding: 0;margin:0;margin-top:10px;text-align:left;" |- Last revision (mm/dd/yy): // = Introduction = DRAFT MODE - This Cheat Sheet is a Work in Progress
 * valign="top" style="border-right: 1px dotted gray;padding-right:25px;" |

This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the OWASP Mobile Top 10 Risks list.

Testing Methodology
At the device level, there are 2 ways in which the application shall be tested.
 * 1) With Android device running in a factory default or normal mode
 * 2) With Android device running in a rooted mode

At the application level, there are 2 ways in which it shall be tested
 * 1) Application running on the device (to take benefits of touch related features)
 * 2) Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)

Application Mapping
Map the application for possible security vectors = OWASP Step-by-step Approach = (For each of the standards below, there shall be multiple steps for the tester to follow])
 * 1) What is the application genre ? (Game, business, productivity etc)
 * 2) Does the application connect to backend web services?
 * 3) Is the application purely native or incorporates readymade frameworks?
 * 4) Does the application store data on the device?
 * 5) What all features of the device are used by the application? (camera, gyroscope, contacts etc)

M2 - Insecure Data storage
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.

Commonplaces to look at


 * /data/data/app_folder
 * /sdcard/
 * /sdcard1/

M3 - Insufficient Transport Layer
Multiple layer of checks to be performed here

1. On Server side


 * Identify all ssl endpoints.

* SSLv2, SSLv3 is disabled * TLS 1.2, 1.1 and 1.0 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
 * Perform SSL Cipher Scan using (sslscan) or simmilar software. ensure following

2. On Device Side

1. Ensure application is working correctly by navigating around.

2. 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.

3. Place Proxy RootCA in trusted root CA list in device. (Burp) (OWASP-ZAP)

4. Try using application again. If application still doesn't connect, application might be doing cert pinning.

5. Install (Xposed Framework) and (Just Trust Me), enable JustTrustMe and then reboot device.

6. Try again if everything works we have a application which employee's cert pinning.

M4 - Unintended Data Leakage
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.


 * adb logcat output
 * cache and webcache folder locations

M5 - Poor Authorization and Authentication
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.


 * enumerate all exported activities
 * start each activity and identify if the activity was suppose to be publicly accessible or not.
 * Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)

M6 - Broken Cryptography
There are multiple things to look at


 * Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1
 * Do it Yourself / let me design my own algo for encryption
 * Secret key hard coded in the application code itself.

M10 - Lack of Binary Protection
= Authors and Primary Editors =

Jim Manico

Jonathan Carter

Prashant Phatak

Milan Singh Thakur

Anant Shrivastava

Other Cheatsheets

 * }