MobSF and Genymotion Device Image

2024-04-23

In this tutorial, it is assumed that you are familiar with MobSF and that you use MobSF from a physical local machine. For detailed information about MobSF, refer to .

Prerequisite

Setup your Genymotion instance

1. Quickstart

Before proceeding, read carefully.

Then, refer to to get started with Genymotion for your Cloud provider (AWS, GCP, Alibaba or MS Azure).

2. Network

Your instance must have a Public IP or it will not be reachable from your local machine.

This IP will change every time the instance is shutdown and booted.

If you wish to keep the same Public IP, use a persistent public IP, such as if you are using AWS.

3. Security / Firewall

MobSF uses adb to communicate with Genymotion instance via TCP port 5555.

So, add an inbound rule to your EC2 firewall/security to open TCP port 5555 for your local machine IP only:

> Warning: Do not allow TCP connections to port 5555 from anyone (0.0.0.0/0): ADB connection is not secure and opening TCP port 5555 to all may compromise your instance integrity and security! Only allow inbound connections from your local machine IP.

4. Enable ADB

Enable ADB on your Genymotion instance:

1. Access your Genymotion instance display. 2. Go to Configuration and Enable ADB.

For more details and alternate methods, refer to .

Setup MobSF

From your local machine, ensure that you can connect to your Genymotion instance via adb:

adb connect <public_ip>:5555
adb devices

You can now perform MobSF Dynamic Analysis with your Genymotion instance. If Dynamic Analyzer doesn’t detect the instance, manually configure ANALYZER_IDENTIFIER in <user_home_dir>/.MobSF/config.py, or via environment variable ANALYZER_IDENTIFIER, with the instance public IP.

ANALYZER_IDENTIFIER = '54.78.205.214:5555'.

If MobSF cannot detect adb, configure ADB_BINARY in <user_home_dir>/.MobSF/config.py.

ADB_BINARY = '/Applications/Genymotion.app/Contents/MacOS/tools/adb'