Skip to main content

A tool for analyzing signatures of APK files

Project description

SigTool: APK Signature Analyzer Pro


Overview

SigTool is a command-line tool designed to analyze APK signatures and related information. It provides various functionalities such as extracting APK metadata, signature hashes, CRC32 and HashCode values, generating Base64 and PEM encoded certificates, and more.


Features

  • APK Information Extraction: Extract essential details like app name, package name, version name, and build code from an APK file.

  • Signature Extraction: Retrieve the APK certificate bytes in hex string format.

  • Hash Calculations: Generates and displays a wide range of cryptographic hash values such as SHA-1, SHA-224, SHA-256, SHA-356, SHA-512, MD5 from the APK signature.

  • CRC32 and HashCode Calculation: Compute CRC32 and Java-style HashCode from the APK signature.

  • Smali Bytecode Generation: Convert the APK signature into a smali byte array format.

  • Base64 Encoding: Encode signatures and hashes in Base64.

  • PEM Certificate Parsing: Create and display PEM formatted certificates from the APK signature.

  • Colon and Uppercase Formatting: Format hashes with colons and convert to uppercase.

  • File Handling Capabilities: Manages file outputs efficiently, allowing users to save analysis results directly to files


1. Installation via pip (Recommended):

You can easily install SigTool using pip:

pip install sigtool

This command will automatically handle the installation of SigTool.

2. Custom Build Installation:

If you prefer to build SigTool from the source:

  1. Clone the Repository:

    git clone https://github.com/muhammadrizwan87/sigtool.git
    
  2. Navigate to the SigTool Directory:

    cd sigtool
    
  3. Install setuptools:

    pip install setuptools
    
  4. Build and Install the Package:

    python setup.py install
    

Requirements

SigTool relies on external tools like aapt and openssl. You need to ensure these are installed on your system.

  • aapt (Android Asset Packaging Tool)
    • To install aapt
      apt-get install aapt
      
  • openssl
    • To install openssl
      apt-get install openssl
      
      • Or
        pkg install openssl-tool
        

Usage:

usage: sigtool <apk_path> [-a] [-c] [-e] [-f] [-p] [-u] [-o <output_path>]

positional arguments:
  apk_path       Path to the APK file

options:
  -h, --help     show this help message and exit
  -u             Convert output to uppercase
  -c             Add colons to certificate hashes
  -e             Encode output in Base64
  -p             Parse PEM Certificate
  -a             Generate Smali Byte Array
  -f             Print All Information
  -o O           Output results to a specified file path
  -v, --version  Show program's version number and exit

Examples:

  1. To print the default results:

    sigtool /path/to/apk
    
  2. To save the default results to a file:

    sigtool /path/to/apk -o /path/to/output.txt
    
  3. To print the Base64-encoded results:

    sigtool /path/to/apk -e
    
  4. To save all results to a file:

    sigtool /path/to/apk -f -o /path/to/output.bin
    

Contributing

Feel free to submit issues or pull requests if you find any bugs or have suggestions for new features.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Author

MuhammadRizwan


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

sigtool-1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

sigtool-1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file sigtool-1.0.tar.gz.

File metadata

  • Download URL: sigtool-1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for sigtool-1.0.tar.gz
Algorithm Hash digest
SHA256 d210b0b337e42b62dff79f1c65da7f476443b97c4c2566f303040abe0f353d69
MD5 6702f24e4f8cc2805da2f3d1a5f9c133
BLAKE2b-256 d1405c73c209e3fffe39ec9b66c75537fdcd3317d99d8658d5ce8803d1d19ff3

See more details on using hashes here.

File details

Details for the file sigtool-1.0-py3-none-any.whl.

File metadata

  • Download URL: sigtool-1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for sigtool-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edca48efb65fb575acb3b78da136c926c55e3892c4a2d907ef65860500bbfc37
MD5 150deb2fb9f553d9a848bbaa62eea69f
BLAKE2b-256 7b6f751cffaffb2f2d590494a6ed0bf6cb24b99e3b5155d90d11e50e9ea226db

See more details on using hashes here.

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