Mobile Security Framework

MobSF是用于检测安卓和苹果平台App安全性的一个框架

以下为记录的一个简单的部署过程,实际测试中只有Docker和Ubuntu的环境的部署成功

MobSF部署(Ubuntu)

部署环境Ubuntu 18.04
为保证相关工具包下载顺畅首先更新APT Source

先安装Python3-pip等工具

sudo apt-get install git
sudo apt-get install python3-pip
sudo apt-get install python3-venv
sudo apt-get install openjdk-8-jre-headless
sudo apt-get install net-tools
sudo apt-get install android-tools-adb android-tools-fastboot

可以更改PIP源

从GitHub上克隆MobSF项目,如果下载失败的话可以考虑从本地下载再将zip包上传

git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git

或者下载好包之后直接上传到服务器,并解压

unzip Mobile-Security-Framework-MobSF-master.zip

进入目录运行安装脚本

cd Mobile-Security-Framework-MobSF-master
./setup.sh

部分依赖包可能会下载失败,需要多试几次或者从https://pypi.org/下载并手动安装
使用以下命令开启MobSF服务
设置相应命令的环境变量
注意最好使用root账号开启服务

source /MobSF/Mobile-Security-Framework-MobSF-master/venv/bin/activate

开启服务

python3  manage.py runserver 0.0.0.0:8081

可以通过以下命令查看(TCP)端口是否开放起来

netstat -ntpl

注意,由于网络问题,有时候下载依赖包可能会失败,有点组件可能会丢包,可以尝试多次./setup.sh部署

注意若需要生成PDF报告的话还需要安装wkhtmltopdf工具
wkhtmltopdf下载链接,此处需要根据系统下载相应的版本,下载了Ubuntu18.04 amd的版本

https://wkhtmltopdf.org/downloads.html

将包上传到服务器之后进行安装,需要先安装xfonts-75dpi

apt install xfonts-75dpi
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb 

安装完后即可生成PDF报告 

MobSF部署(Windows)

实际部署失败

安装Python

https://www.python.org/downloads/

安装JDK

https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html

 
下载安装GIT
推荐下载淘宝的

https://github.com/waylau/git-for-win
https://npm.taobao.org/mirrors/git-for-windows/

 
克隆项目

git init
git config http.sslVerify "false"
git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git

 
 
切换到Mobile-Security-Framework-MobSF目录
默认安装到个人路径里面
可以直接CMD到该目录跑命令

python -m pip install -r requirements.txt

 
其中部分模块安装可能会遇到问题,可以手动下载安装,例如google-play-scraper 0.0.1.1的模块,下载后解压进入该目录, Python setup.py install,遇到报错
https://pypi.org/project/google-play-scraper/#files
 
参考链接

https://www.jianshu.com/p/4ba4312985ee
https://www.jianshu.com/p/273c34b05f14
https://testerhome.com/topics/11293

项目官网

https://github.com/MobSF/Mobile-Security-Framework-MobSF/wiki/1.-Documentation
Last modification:March 4th, 2023 at 06:53 pm
硬币投入口