Перейти к основному содержимому

Audit an Android app for regulatory compliance

Advanced guide · written by Esther Onfroy

This guide shows how to audit the data collection of an Android app, in a reproducible environment, with the PiRogue and Colander. It implements the Mobile application regulatory compliance audit methodology.

Prepare the mobile device​

Use a consumer-grade mobile device such as one with the following specifications:

The modified OS used on the mobile device creates a unique privacy enhanced environment with the following features:

  • any feature or code that enables the transmission of data to Google servers disabled or at the very least the accesses are anonymized;
  • Google Services is replaced by microG and by alternative services
  • all Google apps are removed and replaced by equivalent Open Source applications;
  • no use of Google servers to check connectivity;
  • NTP servers that do not belong to Google used;
  • geolocation using Mozilla Location Services in addition to GPS.

Since a standard Android phone does not come with the specific privacy features provided by /e/ Murena OS, it is decided to disable the "Advanced Privacy" /e/ Murena OS-specific feature turning off:

  • the filtering of trackers network traffic (blocking the network traffic);
  • the mocking of the geolocation (faking the real location);
  • the mocking of the real IP address of the device (faking the IP address).

As mentioned in the previous section, the version of the Android OS on the device used an alternative to Google Play Services called "MicroG". MicroG never returns the same Android advertising identifier. Every time a mobile app reads it, a new AdID is generated and returned. In other words, if a given mobile application reads the AdID three times, the OS will return three different advertising identifiers.

The device is rooted by flashing the OS image listed previously with the program "easy-installer" provided by e foundation. The OS image, also provided by e foundation, is rooted by default.

Download the application​

If the application you want to be analyzed is available on Google Play Store, use apkeep to download it with your Google account. Once downloaded, compute the SHA256 hash of the APK or XAPK and retrieve basic information about the app such as package name, version code and certificate signature. Handle a potentially malicious mobile app describes these steps.

Record the origin and the version of the application​

Save the following information to ensure traceability and reproducibility:

  • the origin of the application (Google Play, F-Droid, …)
  • the Google account you used for downloading the application
  • the SHA256 hash of the application file (APK or XAPK)
  • the application package name
  • the application version code and version name
  • the fingerprint of the certificate used to sign the application
  • the model of the Android device
  • the version of Android installed on the device
  • the version of the operating system
  • the SHA256 hash and the URL of the OS image
  • the SHA256 hash and the URL of the recovery image
  • the phone number
  • the IMEI
  • the mobile carrier name

Use a reproducible test environment​

By using a uniquely identifiable Android operating system image on the device, you ensure that anyone wanting to verify your findings and conclusions will be able to reproduce the execution environment you used.

Analyze the application dynamically​

Execute the application in an instrumented environment, see Intercept and decrypt the TLS traffic of an app.

Analyze the data transmissions​

Analyze the data transmissions, see Analyze the network traffic of an app in Colander.

Use the report generated by Colander to illustrate your findings and conclusions. If you are working on a complaint, be sure to provide the APK or XAPK you used, all the files generated by the PiRogue and the report issued by Colander.