Skip to main content

Android Package Identifier

Project description

APKiD

Build Status PyPI PyPI - Python Version PyPI - Format PyPI - License

APKiD gives you information about how an APK was made. It identifies many compilers, packers, obfuscators, and other weird stuff. It’s PEiD for Android.

Screen Shot 2019-05-07 at 10 55 00 AM

Screen Shot 2019-05-07 at 10 55 00 AM

For more information on what this tool can be used, for check out:

Installing

First, install yara-python with --enable-dex to compile Yara’s DEX module:

pip install wheel
pip wheel --wheel-dir=/tmp/yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/yara-python.git@v3.10.0
pip install --no-index --find-links=/tmp/yara-python yara-python

Then, install apkid:

pip install apkid

Docker

You can also run APKiD with Docker! Of course, this requires that you have git and Docker installed.

Here’s how to use Docker:

git clone https://github.com/rednaga/APKiD
cd APKiD/
docker build . -t rednaga:apkid
docker/apkid.sh ~/reverse/targets/android/example/example.apk
[+] APKiD 2.0.0 :: from RedNaga :: rednaga.io
[*] example.apk!classes.dex
 |-> compiler : dx

Usage

usage: apkid [-h] [-j] [-t TIMEOUT] [-o DIR] [-q] [FILE [FILE ...]]

APKiD - Android Application Identifier v2.0.0

positional arguments:
  FILE                           apk, dex, or directory

optional arguments:
  -h, --help                     show this help message and exit
  -j, --json                     output scan results in JSON format
  -t TIMEOUT, --timeout TIMEOUT  Yara scan timeout (in seconds)
  -o DIR, --output-dir DIR       write individual results to this directory (implies --json)
  -q, --quiet                    suppress extraneous output

Submitting New Packers / Compilers / Obfuscators

If you come across an APK or DEX which APKiD does not recognize, please open a GitHub issue and tell us:

  • what you think it is – obfuscated, packed, etc.

  • the file hash (either MD5, SHA1, SHA256)

We are open to any type of concept you might have for “something interesting” to detect, so do not limit yourself solely to packers, compilers or obfuscators. If there is an interesting anti-disassembler, anti-vm, anti-* trick, please make an issue.

Pull requests are welcome. If you’re submitting a new rule, be sure to include a file hash of the APK / DEX so we can check the rule.

License

This tool is available under a dual license: a commercial one suitable for closed source projects and a GPL license that can be used in open source software.

Depending on your needs, you must choose one of them and follow its policies. A detail of the policies and agreements for each license type are available in the LICENSE.COMMERCIAL and LICENSE.GPL files.

Hacking

If you want to install the latest version in order to make changes, develop your own rules, and so on, simply clone this repository, compile the rules, and install the package in editable mode:

git clone https://github.com/rednaga/APKiD
cd APKiD
./prep-release.py
pip install -e .[dev,test]

If the above doesn’t work, due to permission errors dependent on your local machine and where Python has been installed, try specifying the --user flag. This is likely needed if you’re not using a virtual environment:

pip install -e .[dev,test] --user

If you update any of the rules, be sure to run prep-release.py to recompile them.

For Maintainers

This section is for package maintainers.

To update the PyPI package:

./prep-release.py readme
rm dist/*
python setup.py sdist bdist_wheel
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

Update the generated README.rst until Pandoc learns how to translate Markdown with images that are links into reStructuredText:

.. image:: https://travis-ci.org/rednaga/APKiD.svg?branch=master
    :target: https://travis-ci.org/rednaga/APKiD

.. image:: https://img.shields.io/pypi/v/apkid.svg
    :target: https://pypi.python.org/pypi/apkid

.. image:: https://img.shields.io/pypi/pyversions/apkid.svg
    :target: https://pypi.python.org/pypi/apkid

.. image:: https://img.shields.io/pypi/format/apkid.svg
    :target: https://pypi.python.org/pypi/apkid

.. image:: https://img.shields.io/pypi/l/apkid.svg
    :target: https://pypi.python.org/pypi/apkid

For more information see Packaging Projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apkid-2.0.0.tar.gz (84.1 kB view hashes)

Uploaded Source

Built Distribution

apkid-2.0.0-py2.py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page