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

Adds info about extracting apps. Fixes #1238 #1301

Merged
merged 4 commits into from
Jun 7, 2019
Merged

Conversation

cldrn
Copy link
Collaborator

@cldrn cldrn commented Jun 6, 2019

Added info about extracting apps and the differences between the methods.

This PR covers issue #1238.

Copy link
Collaborator

@commjoen commjoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just minor requests for improvements :).

@@ -752,16 +752,49 @@ Check the [Termux Wiki](https://wiki.termux.com/wiki/Remote_Access "Termux Remot

#### Obtaining and Extracting Apps

-- ToDo: <https://github.com/OWASP/owasp-mstg/issues/1238>
There are several ways of extracting apk files from a device. You will need to decide which one is the easiest method depending if the app is public or private.

##### App Store
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app store, kinda feels like it is about the google play store. Maybe we call this alternative app-stores in the title?

Copy link
Collaborator Author

@cldrn cldrn Jun 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to 'Alternative App Stores'

##### Recovering the App Package from the Device

###### From Rooted Devices
Obtaining app packages from the device is the recommended method as we can guarantee the app hasn't been modified.

###### From Non-Rooted Devices
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the level of depth is just too high unfortunately... Can you restructure this a bit ? After all, you are ending the story with that you do not need a rooted device.


There are also apps like [APK Extractor](https://play.google.com/store/apps/details?id=com.ext.ui "APK Extractor") that do not require root and can even share the extracted apk via your prefered method. This can be useful if you don't feel like connecting the device or setting up adb over the network to transfer the file.

###### From Rooted Devices
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see previous remark.

Copy link
Collaborator

@TheDauntless TheDauntless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! We should also add google playcli as an option.


##### App Store

One of the easiest option is to download the apk from websites that mirror public applications from the Google Play Store. However, keep in mind that these sites are not offical and there is no guarantee that the application hasn't been repackaged or contain malware. A few reputable websites that host apks and are not known for modifying apps and claim to MD5 checksum the apps are:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasn't been repackaged or contain malware

Sounds a bit weird (though might be technically correct). How about:

hasn't been repackaged to contain malware

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there were some cases where they repackaged the application to change the admob id so the revenue went to a different team so not exactly malware there.

- [APKMirror](https://apkmirror.com "APKMirror")
- [APKPure](https://apkpure.com "APKPure")

Beware that you do not have control over these sites and you can not guarantee what they do in the future. Only use them if it's your only option left.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can not -> cannot

Once you have located the package name of the application, you need the full path where it is stored on the system to download it.

```shell
$ adb shell pm path (package)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use angle brackets for things that need to be filled in. (<package>)

With the full path to the apk, you can now simply use `adb pull` to extract the apk.

```shell
$ adb pull (apk path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous

Copy link
Collaborator

@commjoen commjoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small feedback @cldrn : can you have a look on whether we can recommend people to use the sha-sum for validation (e.g. change md5 to sha-256, but that means that they have to actively support it).


##### Recovering the App Package from the Device
One of the easiest option is to download the apk from websites that mirror public applications from the Google Play Store. However, keep in mind that these sites are not offical and there is no guarantee that the application hasn't been repackaged or contain malware. A few reputable websites that host apks and are not known for modifying apps and claim to MD5 checksum the apps are:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question: do they offer SHA-sums? because md5sums are ... easy to collide on a phone :D

Copy link
Collaborator

@TheDauntless TheDauntless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo


##### Recovering the App Package from the Device
One of the easiest option is to download the apk from websites that mirror public applications from the Google Play Store. However, keep in mind that these sites are not offical and there is no guarantee that the application hasn't been repackaged or contain malware. A few reputable websites that host APKs and are not known for modifying apps and even list SHA-1 and SHA-256 checksums of the apps are:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the easiest options

@commjoen commjoen merged commit f723f40 into OWASP:master Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants