Mobile Security Framework or MobSF is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing framework capable of performing static, dynamic and malware analysis. It can be used for effective and fast security analysis of Android, iOS and Windows mobile applications and support both binaries (APK, IPA & APPX ) and zipped source code. It can do dynamic application testing at runtime for Android apps and has Web API fuzzing capabilities powered by CapFuzz.
Automated prebuilt docker image of MobSF Static Analyzer is available from DockerHub
docker pull opensecurity/mobile-security-framework-mobsf
docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest
Also ReadHeadless Burp – Automate security tests using Burp Suite
NOTE:
Tested on Windows (7, 8, 8.1, 10), Kali (2016.2), Ubuntu (14.04, 16.04) , OSX (Mavericks, Yosemite, El Capitan), OS (Sierra, High Sierra)
git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
cd Mobile-Security-Framework-MobSF
pip3 install virtualenv
virtualenv -p python3 venv
source venv/bin/activate
pip3 install -r requirements.txt
wkhtmltopdf binary separately for generating PDF reports.wkhtmltopdf binary to environment variable PATH.python3 manage.py runserver
If you need to run on a specific port number try python3 manage.py runserver PORT_NO. To expose MobSF to a particular IP, you can try python3 manage.py runserver IP:PORT_NO.
If everything goes right, you will get an output like the one below.
You can navigate to http://localhost:8000/ to access the MobSF Web interface.
Dynamic Anlayzer is available only for Android binaries (APK) and works only if your computer has at least 4GB of RAM and Full Virtualization support.
NOTE: If you are configuring MobSF VM in VirtualBox for Dynamic Analysis, you must have configured MobSF in the host OS and not inside any VM.
To Configure Dynamic Analyzer we need 4 things.
1234.NOTE: If the VM does not boot up properly then you cannot perform Dynamic Analysis with MobSF VM.
ipconfig in command prompt and note down the IP corresponding to the name of the Host-only Adapter.ifconfig in terminal and note down the IP corresponding to the name of the Host-only Adapter.NOTE: The VirtualBox Host-Only Adapter IP and MobSF VM IP should be in the same network range. If your MobSF VM IP and Adapter IP are in different network range, modify the Adapter IP to be in the same network range as that of MobSF VM IP.
1337.Show in Explorer or Show in Finder.Here the value of uuid is the VM UUID and currentSnapshot is the Snapshot UUID.
MobSF/settings.py and set the appropriate values as MobSF/settings.py, set ANDROID_DYNAMIC_ANALYZER = "MobSF_VM" (default)scripts/mobsfy_AVD.py script and specify the directory that contains the files extracted from MobSF_ARM_Emulator.zip.MobSF/settings.py, set ANDROID_DYNAMIC_ANALYZER = "MobSF_AVD"mobsfy_AVD.py script is not running successfully, you need to set the values for AVD_EMULATOR and AVD_PATH in MobSF/settings.py manually.MobSF/settings.py and modifyAVD_EMULATOR = r'/Users/[USERNAME]/Library/Android/sdk/tools/emulator'
# This can be /Users/[USERNAME]/Library/Android/Sdk/emulator/emulator for newer versions of android SDK
AVD_PATH = r'/Users/[USERNAME]/.android/avd'
# Path to the avd folder where you extracted the emulator
MobSF/settings.py, set ANDROID_DYNAMIC_ANALYZER = "MobSF_AVD"MobSF/settings.py, set ANDROID_DYNAMIC_ANALYZER = "MobSF_REAL_DEVICE"DEVICE_IP and DEVICE_ADB_PORT with the IP and PORT that you got from WiFi ADBVM UUID, Snapshot UUID, Host/Proxy IP, VM IP and set ANDROID_DYNAMIC_ANALYZER = "MobSF_VM"ANDROID_DYNAMIC_ANALYZER = "MobSF_REAL_DEVICE" and specify DEVICE_IPand DEVICE_ADB_PORT. Snapshot feature is only available with VM(s) hosted in VirtualBox.If you are updating MobSF, In most cases you might have to perform database migrations or you will see errors such as
[ERROR] Saving to DB (E:\Mobile-Security-Framework-MobSF\StaticAnalyzer\views\android\db_interaction.py, LINE 236 "static_db.save()"): table StaticAnalyzer_staticanalyzerandroid has no column named
Run the below command to migrate your db
python3 manage.py makemigrations
python3 manage.py migrate
If the above changes didn’t work, you might have to run clean.sh(present in scripts) in Mac/Linux. After that run the above commands.
NOTE: This will remove the previously saved scan results.
Some components are disabled by default as they are experimental
APKiD is disabled by default. Before enabling you will have to install the rednaga fork of yara-python.
git clone --recursive https://github.com/rednaga/yara-python-1 yara-python
cd yara-python
python3 setup.py build --enable-dex install
Enable APKiD in settings.py by setting APKID_ENABLED to True.
http://127.0.0.1:8000/runtest/http://127.0.0.1:8000/runapitest/General Working of a Web Application Firewall (WAF) A Web Application Firewall (WAF) acts as…
How to Send POST Requests Using curl in Linux If you work with APIs, servers,…
If you are a Linux user, you have probably seen commands like chmod 777 while…
Vim and Vi are among the most powerful text editors in the Linux world. They…
Working with compressed files is a common task for any Linux user. Whether you are…
In the digital era, an email address can reveal much more than just a contact…