MHF是一款针对移动端应用程序的自动化识别工具,该工具可以通过自动化的方式识别用于创建目标移动端应用程序所使用的框架和技术。除此之外,该工具还可以辅助广大研究人员搜索敏感信息或提供对应框架平台的安全实践建议。
工具运行机制
MHF,全名为Mobile Helper Framework,即移动端辅助框架,该工具能够搜索目标移动应用程序开发过程中所使用到的相关技术和文件,例如配置文件、资源文件和源代码文件等,并以此来识别开发人员使用的框架和技术。
比如说,如果是Cordova,搜索的文件如下:
index.html
cordova.js
cordova_plugins.js
如果是React Native Android & iOS,则搜索的文件如下:
Andorid文件:
libreactnativejni.so
index.android.bundle
iOS文件:
main.jsbundle
工具要求
reflutter==0.7.2 jsbeautifier pyyaml colorama python-magic-bin==0.4.14 lxml
工具下载
由于该工具基于Python 3开发,因此我们首先需要在本地设备上安装并配置好最新版本的Python 3环境。
接下来,广大研究人员可以直接使用下列命令将该项目源码克隆至本地:
git clone https://github.com/stuxctf/mhf.git
然后切换到项目目录中,使用pip命令和项目提供的requirements.txt文件安装该工具所需的其他依赖组件:
cd mhf
pip install -r requirements.txt
工具使用
python3 mhf.py app.apk|ipa|aab
工具使用样例
python3 mobile_helper_framework.py file.apk
[+] App was written in React Native
Do you want analizy the application (y/n) y
Output directory already exists. Skipping decompilation.
Beauty the react code? (y/n) n
Search any info? (y/n) y
==>>Searching possible internal IPs in the file
results.........
==>>Searching possible emails in the file
results.........
==>>Searching possible interesting words in the file
results.........
==>>Searching Private Keys in the file
results.........
==>>Searching high confidential secrets
results.........
==>>Searching possible sensitive URLs in js files
results.........
==>>Searching possible endpoints in js files results.........
项目地址
MHF:
https://github.com/stuxctf/mhf
https://www.freebuf.com/articles/network/321268.html https://github.com/Impact-I/reFlutter https://github.com/mazen160/secrets-patterns-db https://websec.mx/