SigTool: APK Signature Analyzer Pro - Review and Enhancements π
SigTool is a robust open-source tool tailored for developers and security analysts. It excels at in-depth APK signature analysis, offering features such as:
- Signature Extraction & Hash Calculation π οΈ
- Java-style HashCode Calculation π
- PEM Certificate Generation π
Itβs a go-to for anyone diving deep into APKs, but like any tool, thereβs always room for improvement. Below, I’ll highlight some quirks I encountered and how I went about fixing them.
π GitHub Repository:
SigTool - APK Signature Analyzer
π The Issue: Multiple Flags Not Playing Nice Together
When using multiple flags, such as -p
and -e
, SigTool doesnβt behave as expected. Instead of combining the outputs from both flags, it only processes the last flag provided. While this decision makes sense in most cases where flags might be irrelevant when combined, using -p
and -e
together should be meaningful and useful.
Steps to Reproduce:
- Run the command:
sigtool path/to/apk.apk -p -e
- Observe the output.
Expected Result:
The tool should output both APK information and Base64 Encoded Hashes, along with PEM Certificate Details.
Actual Result:
Only the output from the last flag (in this case, Base64 Encoded Hashes and Certificate) is shown.
π§ The Fix: Pull Request & New Features
I submitted a pull request to address this issue. Hereβs a breakdown of the fixes and improvements:
- Flag Compatibility Fix: The tool now processes both the
-p
and-e
flags together, displaying all the relevant outputs as expected. - JSON Output: You can now save the output as a JSON object, making it easier to work with programmatically.
- Colon Signature Options: With the
-u
flag, you can choose between uppercase and lowercase for colon-separated signatures:-u
+-c
: Uppercase results with colons.-c
: Lowercase results with colons.
Once the pull request is merged, these enhancements will be available to all users. π
β Installation & Requirements:
For Termux:
pkg install python aapt openssl-tool
For Linux (APT):
sudo apt install aapt openssl
For Windows:
Make sure to install aapt
and openssl
libraries.
Install SigTool:
pip install sigtool
Usage:
sigtool -h
π¬ Final Thoughts
SigTool is a fantastic tool for APK signature analysis, and with the fixes and enhancements on the horizon, itβs only getting better. If you find it helpful, donβt forget to β star the GitHub repo and share your feedback!
β»οΈ Telegram Channels:
Feel free to dive in and explore what SigTool has to offer! π