Mhf - Mobile Helper Framework - A Tool That Automates The Process Of Identifying The Framework/Technology Used To Create A Mobile Application
Mobile Helper Framework is a tool that automates the process of identifying the framework/technology used to create a mobile application. Additionally, it assists in finding sensitive information or provides suggestions for working with the identified platform.
The tool searches for files associated with the technologies used in mobile application development, such as configuration files, resource files, and source code files.
Example
Cordova
Search files:
index.htmlcordova.jscordova_plugins.js
React Native Android & iOS
Search file
Andorid files:libreactnativejni.soindex.android.bundleiOS files:main.jsbundle
Installation
❗A minimum of Java 8 is required to run Apktool.
pip install -r requirements.txt
Usage
python3 mhf.py app.apk|ipa|aab
Examples
python3 mobile_helper_framework.py file.apk[+] App was written in React NativeDo you want analizy the application (y/n) yOutput directory already exists. Skipping decompilation.Beauty the react code? (y/n) nSearch any info? (y/n) y==>>Searching possible internal IPs in the fileresults.........==>>Searching possible emails in the fileresults.........==>>Searching possible interesting words in the fileresults.........==>>Searching Private Keys in the fileresults.........==>>Searching high confidential secretsresults.........==>>Searching possible sensitive URLs in js filesresults.........==>>Searching possible endpoints in js files results.........
Features
This tool uses Apktool for decompilation of Android applications.
This tool renames the .ipa file of iOS applications to .zip and extracts the contents.
Feature | Note | Cordova | React Native | Native JavaScript | Flutter | Xamarin |
---|---|---|---|---|---|---|
JavaScript beautifier | Use this for the first few occasions to see better results. | ✅ | ✅ | ✅ | ||
Identifying multiple sensitive information | IPs, Private Keys, API Keys, Emails, URLs | ✅ | ✅ | ✅ | ❌ | |
Cryptographic Functions | ✅ | ✅ | ✅ | ❌ | ❌ | |
Endpoint extractor | ✅ | ✅ | ✅ | ❌ | ❌ | |
Automatically detects if the code has been beautified. | ❌ | ❌ | ❌ | |||
Extracts automatically apk of devices/emulator | ❌ | ❌ | ❌ | ❌ | ❌ | |
Patching apk | ✅ | |||||
Extract an APK from a bundle file. | ✅ | ✅ | ✅ | ✅ | ✅ | |
Detect if JS files are encrypted | ❌ | ❌ | ||||
Detect if the resources are compressed. | ❌ | Hermes✅ | ❌ | ❌ | XALZ✅ | |
Detect if the app is split | ❌ | ❌ | ❌ | ❌ | ❌ |
What is patching apk:
This tool uses Reflutter, a framework that assists with reverse engineering of Flutter apps using a patched version of the Flutter library.
More information: https://github.com/Impact-I/reFlutter
Split APKs
is a technique used by Android to reduce the size of an application and allow users to download and use only the necessary parts of the application.
Instead of downloading a complete application in a single APK file, Split APKs divide the application into several smaller APK files, each of which contains only a part of the application such as resources, code libraries, assets, and configuration files.
adb shell pm path com.packagepackage:/data/app/com.package-NW8ZbgI5VPzvSZ1NgMa4CQ==/base.apkpackage:/data/app/com.package-NW8ZbgI5VPzvSZ1NgMa4CQ==/split_config.arm64_v8a.apkpackage:/data/app/com.package-NW8ZbgI5VPzvSZ1NgMa4CQ==/split_config.en.apkpackage:/data/app/com.package-NW8ZbgI5VPzvSZ1NgMa4CQ==/split_config.xxhdpi.apk
For example, in Flutter if the application is a Split it's necessary patch split_config.arm64_v8a.apk, this file contains libflutter.so
Credits
- This tool use a secrets-patterns-db repositorty created by mazen160
- This tool use a regular expresion created by Gerben_Javado for extract endpoints
- This tools use reflutter for flutter actions
Changelog
0.5
- Public release
- Bug fixes
0.4
- Added plugins information in Cordova apps
- Added Xamarin actions
- Added NativeScript actions
- Bug fixes
0.3
- Added NativeScript app detection
- Added signing option when the apk extracted of aab file is not signed
0.2
- Fixed issues with commands on Linux.
0.1
- Initial version release.
License
- This work is licensed under a Creative Commons Attribution 4.0 International License.
Autors
Via: www.kitploit.com