
APKLeaks
APKLeaks is a tool for scanning mobile application (APK) file to extract all URIs, endpoints & secrets. With this tool you can automatically extract all data and information on apk files.
Installation
It’s fairly simple to install APKLeaks:
from PyPi
from Source
Clone repository and install requirements:
from Docker
Pull the Docker image by running:
Dependencies
APKLeaks using jadx disassembler to decompile APK file. If it doesn’t exist in your environment, it’ll ask you to download.
Usage
Simply type,
Options
Here are all the options it supports.
Argument | Description | Example |
---|---|---|
-f, –file | APK file to scanning | apkleaks -f file.apk |
-o, –output | Write to file results (random if not set) | apkleaks -f file.apk -o results.txt |
-p, –pattern | Path to custom patterns JSON | apkleaks -f file.apk -p custom-rules.json |
-a, –args | Disassembler arguments | apkleaks -f file.apk --args="--deobf --log-level DEBUG" |
–json | Save as JSON format | apkleaks -f file.apk -o results.json --json |
Output
In general, if you don’t provide -o
argument, then it will generate results file automatically.
NOTE: By default it will also save the results in text format, use --json
argument if you want JSON output format.
Pattern
Custom patterns can be added with the following argument to provide sensitive search rules in the JSON file format: --pattern /path/to/custom-rules.json
. If not set, it’ll use default patterns from regexes.json file.
Example patterns file:
Arguments (disassembler)
We give user complete discretion to pass the disassembler arguments. For example, if you want to activate threads in jadx
decompilation process, you can add it with -a/--args
argument, example: --args="--threads-count 5"
.
NOTE: Please pay attention to the default disassembler arguments we use to prevent collisions.