A command-line tool for in-depth APK signature and keystore analysis.
Project description
SigTool: APK Signature and Keystore Analyzer Pro
Overview
SigTool is a command-line tool designed to in-depth APK signature and keystore analysis 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 certificate bytes in hex string format from APK file, RSA file and x509 certificate.
- To extract an x509 certificate from your keystore, you can check out our second tool, KeySigner.
-
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 extracted certificate.
-
CRC32 and HashCode Calculation: Compute CRC32 and Java-style HashCode from the extracted certificate.
-
Smali Bytecode Generation: Convert the extracted certificate 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 extracted certificate.
-
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.
-
Generate MT VIP Hook: SigTool can also generate an MT VIP hook to bypass APK signatures. How to Inject the hook?...
Requirements
Before using SigTool, ensure that the following system dependencies are installed:
- Python: Required to run the SigTool.
- Java: Required to run smali.jar for generating MT hook.
- aapt: Required to extract APK metadata.
- OpenSSL: Required for handling certificates.
Installation
Termux (Android)
To install SigTool on Termux, use the following command to install all necessary dependencies:
```bash
pkg install python openjdk-17 aapt openssl-tool
```
Installation via pip (Recommended)
You can easily install SigTool using pip:
```bash
pip install --force-reinstall sigtool
```
For the latest changes and features, install SigTool directly from the GitHub repository:
```bash
pip install --force-reinstall -U git+https://github.com/muhammadrizwan87/sigtool.git
```
Custom Build Installation
To build SigTool from source:
-
Clone the repository:
git clone https://github.com/muhammadrizwan87/sigtool.git
-
Navigate to the SigTool directory:
cd sigtool
-
Install the build tools:
pip install build
-
Build and install the package:
python -m build pip install --force-reinstall dist/sigtool-2.0-py3-none-any.whl
Usage:
usage: sigtool <apk_path> [-a] [-c] [-e] [-f] [-fc] [-fu] [-fuc] [-p] [-u] [-uc] [-hmt] [-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
-uc Add colons to hashes and convert output to uppercase
-e Encode output in Base64
-p Parse PEM Certificate
-a Generate Smali Byte Array
-f Print All Information
-fc Add colons to hashes and print all information
-fu Convert output to uppercase and print all information
-fuc Add colons to hashes, convert output to uppercase and print all information
-hmt Generate and export hook of MT enhanced version
-o O Output results to a specified file path. If the path ends with '.json', results will be saved in JSON format.
-v, --version Show program's version number and exit
Examples:
-
To print the default results:
sigtool /path/to/apk
-
To save the default results to a file:
sigtool /path/to/apk -o /path/to/output.txt
-
To print the Base64-encoded results:
sigtool /path/to/apk -e
-
To save all results to a file:
sigtool /path/to/apk -f -o /path/to/output.bin
-
To save results in JSON format:
sigtool /path/to/apk -f -o /path/to/output.json
-
To export hook of MT enhanced version:
sigtool /path/to/apk -hmt -o /path/to/hook
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sigtool-2.0.tar.gz
.
File metadata
- Download URL: sigtool-2.0.tar.gz
- Upload date:
- Size: 913.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dddc20e5294179dfa9fef137fd51cee267b1d232ee4a0ecba754e6a40539387b |
|
MD5 | c5d183dd9bd268c32301ee181abebd72 |
|
BLAKE2b-256 | 7ae60882440dcf651e02d9ab86693b8fc5b3a97e0a93c30956097958afd1f5b9 |
File details
Details for the file sigtool-2.0-py3-none-any.whl
.
File metadata
- Download URL: sigtool-2.0-py3-none-any.whl
- Upload date:
- Size: 912.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26da23affae75f8bba4aa61267123d115512c50edb56f408a35f3c8413d61bb7 |
|
MD5 | 240383a27cbc1a69497561cece1b6827 |
|
BLAKE2b-256 | 76f9fdd72f87bee7efc7ece4eaf4766ef887be908466f80cad6252642229046b |