Skip to content

Commit e828b1c

Browse files
committed
v4.2.0
1 parent 10eee77 commit e828b1c

File tree

4 files changed

+129
-1
lines changed

4 files changed

+129
-1
lines changed

_sidebar.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [Running MobSF](running_mobsf_docker.md)
44
* [Dynamic Analyzer](dynamic_analyzer_docker.md)
55
* [Docker Options](docker_options.md)
6+
* [Configurations](configurations.md)
67
* [Extras](extras.md)
78
* [Develop](develop.md)
89
* [SSO](sso.md)

configurations.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
# MobSF Configurations
3+
4+
MobSF supports a range of environment variable configurations to customize its behaviour and adapt to various deployment scenarios.
5+
Here is a list of supported environment variables.
6+
7+
## General
8+
- **`MOBSF_DEBUG`**: Enables debug mode when set to `1`.
9+
- **`MOBSF_SECRET_KEY`**: Configure a static django secret.
10+
- **`MOBSF_USE_X_FORWARDED_HOST`**: Enables `X-Forwarded-Host` header support when set to `1`.
11+
- **`MOBSF_USE_X_FORWARDED_PORT`**: Enables `X-Forwarded-Port` header support when set to `1`.
12+
- **`TIME_ZONE`**: Configure a timezone for the server, defaults to `UTC`.
13+
- **`MOBSF_PLATFORM`**: Specify the operating environment for MobSF, such as `docker`.
14+
- **`MOBSF_HOME_DIR`**: Specify MobSF home directory to store analysis data, defaults to `~/` or `$HOME`.
15+
16+
## Database Configuration
17+
PostgreSQL is configured only if the required environment variables are set; otherwise, MobSF defaults to using the sqlite3 database.
18+
- **`POSTGRES_USER`**: Username for the PostgreSQL database.
19+
- **`POSTGRES_PASSWORD`**: Password for the PostgreSQL database.
20+
- **`POSTGRES_PASSWORD_FILE`**: Path to a file containing the PostgreSQL password (docker secrets mount).
21+
- **`POSTGRES_HOST`**: Hostname or IP address of the PostgreSQL server.
22+
- **`POSTGRES_PORT`**: Port for connecting to the PostgreSQL server (default: `5432`).
23+
- **`POSTGRES_DB`**: Name of the PostgreSQL database (default: `mobsf`).
24+
25+
## Asynchronous Scan Queue
26+
- **`MOBSF_ASYNC_ANALYSIS`**: Enables asynchronous analysis when set to `1`. This is used to support Async task queues with DjangoQ2.
27+
- **`MOBSF_ASYNC_WORKERS`**: No of asynchronous scans supported at a time, default to 3 workers.
28+
- **`MOBSF_MULTIPROCESSING`**: Specifies multiprocessing mode (`billiard`, `thread`, `default`).
29+
30+
## Tool Timeouts
31+
- **`MOBSF_JADX_TIMEOUT`**: Timeout in seconds for JADX operations (default: `1000`).
32+
- **`MOBSF_SAST_TIMEOUT`**: Timeout in seconds for static analysis (default: `1000`).
33+
- **`MOBSF_BINARY_ANALYSIS_TIMEOUT`**: Timeout in seconds for binary analysis (default: `600`).
34+
35+
## Authentication and Rate Limiting
36+
- **`MOBSF_DISABLE_AUTHENTICATION`**: Disables authentication when set.
37+
- **`MOBSF_RATELIMIT`**: Rate limit for API requests (default: `7/m`).
38+
- **`MOBSF_API_ONLY`**: Enables REST API-only mode when set to `1`. The Web UI endpoints will be disabled.
39+
- **`MOBSF_API_KEY`**: Set a custom static authentication key for MobSF REST APIs.
40+
- **`MOBSF_API_KEY_FILE`**: Read REST API authentication key from a file (docker secrets mount).
41+
42+
## Proxy Configuration
43+
- **`MOBSF_PROXY_IP`**: IP address for the HTTPS proxy run by MobSF(httptools) (default: `127.0.0.1`).
44+
- **`MOBSF_PROXY_PORT`**: Port for the HTTPS proxy run by MobSF(httptools) (default: `1337`).
45+
46+
## Upstream Proxy Settings
47+
- **`MOBSF_UPSTREAM_PROXY_ENABLED`**: Enables upstream proxy support when set to `1`.
48+
- **`MOBSF_UPSTREAM_PROXY_SSL_VERIFY`**: Verifies SSL for upstream proxy when set to `1`.
49+
- **`MOBSF_UPSTREAM_PROXY_TYPE`**: Type of upstream proxy (default: `http`).
50+
- **`MOBSF_UPSTREAM_PROXY_IP`**: IP address for the upstream proxy (default: `127.0.0.1`).
51+
- **`MOBSF_UPSTREAM_PROXY_PORT`**: Port for the upstream proxy (default: `3128`).
52+
- **`MOBSF_UPSTREAM_PROXY_USERNAME`**: Username for upstream proxy authentication.
53+
- **`MOBSF_UPSTREAM_PROXY_PASSWORD`**: Password for upstream proxy authentication.
54+
55+
## Static Analysis Configuration
56+
- **`MOBSF_DOMAIN_MALWARE_SCAN`**: Enables domain malware scan, defaults to `1`.
57+
- **`MOBSF_APKID_ENABLED`**: Enables APKiD scan, defaults to `1`.
58+
- **`MOBSF_DYLIB_ANALYSIS_ENABLED`**: Enables dylib analysis, defaults to `1`.
59+
- **`MOBSF_SO_ANALYSIS_ENABLED`**: Enables shared object analysis, defaults to `1`.
60+
- **`MOBSF_DEX2SMALI_ENABLED`**: Enables dex to smali conversion for Android binaries, defaults to `1`.
61+
- **`MOBSF_PERM_MAPPING_ENABLED`**: Enables permission to code mapping for Android scans, defaults to `1`.
62+
- **`MOBSF_NIAP_ENABLED`**: Enables NIAP scan when set to `1`. This is disabled by default.
63+
- **`MOBSF_CVSS_SCORE_ENABLED`**: Show CVSSV2 scores when set to `1`. This is disabled by default.
64+
65+
## Dynamic Analysis Configuration
66+
- **`MOBSF_ANALYZER_IDENTIFIER`**: Android Debug Bridge (adb) compatible device identifier.
67+
- **`MOBSF_FRIDA_TIMEOUT`**: Frida connection timeout, defaults to `4` seconds.
68+
- **`MOBSF_ACTIVITY_TESTER_SLEEP`**: Wait defined seconds before invoking an activity, defaults to `4` seconds. This is used by Activity tester.
69+
- **`MOBSF_ADB`**: Specify the path to the `adb` binary that MobSF should use for Android dynamic analysis.
70+
71+
## VirusTotal Integration
72+
- **`MOBSF_VT_ENABLED`**: Enables VirusTotal integration when set to `1`.
73+
- **`MOBSF_VT_API_KEY`**: API key for VirusTotal integration.
74+
- **`MOBSF_VT_UPLOAD`**: Enables file uploads to VirusTotal when set to `1`. Otherwise, only hash values are sent to VirusTotal.
75+
76+
## Corellium Integration
77+
- **`MOBSF_CORELLIUM_API_DOMAIN`**: API domain for Corellium integration.
78+
- **`MOBSF_CORELLIUM_API_KEY`**: API key for Corellium integration.
79+
- **`MOBSF_CORELLIUM_PROJECT_ID`**: Project ID for Corellium integration (optional).
80+
81+
## AppMonsta Integration
82+
- **`MOBSF_APPMONSTA_API`**: AppMonsta API key to fetch package details
83+
84+
## SAML SSO Integration
85+
- **`MOBSF_IDP_METADATA_URL`**: Metadata URL for SAML IdP.
86+
- **`MOBSF_IDP_ENTITY_ID`**: Entity ID for SAML IdP.
87+
- **`MOBSF_IDP_SSO_URL`**: Single Sign-On (SSO) URL for SAML IdP.
88+
- **`MOBSF_IDP_X509CERT`**: X.509 certificate for SAML IdP.
89+
- **`MOBSF_IDP_IS_ADFS`**: Set ADFS as IdP when set to `1`.
90+
- **`MOBSF_SP_HOST`**: Hostname for SAML Service Provider (SP).
91+
- **`MOBSF_SP_ALLOW_PASSWORD`**: Enables password-based login for SAML SP when set to `1`.
92+
93+
## Misc
94+
- **`EFR_01`**: Enables a custom enterprise feature request when set to `1`.
95+
96+
This documentation provides a concise overview of all environment variables available for configuring MobSF.

develop.md

+16
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,22 @@ run.bat 127.0.0.1:8000
9393
In your web browser, navigate to `http://localhost:8000/` to access MobSF web interface. The default credentials are `mobsf/mobsf`.
9494
***
9595

96+
# Asynchronous Scan Queues
97+
98+
MobSF also supports asynchronous task queues.
99+
100+
```bash
101+
# Linux or Mac
102+
MOBSF_ASYNC_ANALYSIS=1 ./run.sh
103+
104+
# Windows
105+
set MOBSF_ASYNC_ANALYSIS=1
106+
run.bat
107+
108+
# Run DjangoQ2 cluster to accept scan jobs.
109+
poetry run python manage.py qcluster
110+
```
111+
96112
# Dynamic Analysis
97113

98114
You need one of the following Android/iOS virtual device for Dynamic Analysis.

docker_options.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ sudo chown -R 9901:9901 <your_local_dir>
1818
docker run -it --rm --name mobsf -p 8000:8000 -v <your_local_dir>:/home/mobsf/.MobSF opensecurity/mobile-security-framework-mobsf:latest
1919
```
2020

21+
#### Configuring Asynchronous Scan Queues
22+
23+
Asynchronous scan queues require a shared volume mount to enable data sharing between MobSF and the scan queue orchestrator, DjangoQ2.
24+
25+
```bash
26+
# Run MobSF container with Asynchronous scan support.
27+
docker run -it --rm --name mobsf -v ~/.MobSF:/home/mobsf/.MobSF -e MOBSF_ASYNC_ANALYSIS=1 -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest
28+
29+
# Run DjangoQ2 cluster to accept scan jobs.
30+
docker run -it --rm --name djangoq -v ~/.MobSF:/home/mobsf/.MobSF opensecurity/mobile-security-framework-mobsf:latest scripts/qcluster.sh
31+
```
32+
2133
#### Building Image from Dockerfile
2234

2335
```bash
@@ -47,7 +59,7 @@ docker build --no-cache --rm -t mobsf .
4759
docker logs -f --tail 100 mobsf
4860
```
4961
## Docker Compose
50-
#### For Postgres and Nginx reverse proxy support
62+
#### For Postgres database, DjangoQ2 task queue, and Nginx reverse proxy support
5163

5264
```bash
5365
# On Linux
@@ -68,6 +80,9 @@ docker compose up -d
6880
# See logs from mobsf container
6981
docker compose logs -f mobsf
7082

83+
# See scan logs from the djangoq container
84+
docker compose logs -f djangoq
85+
7186
# Stop the containers
7287
docker compose down
7388
```

0 commit comments

Comments
 (0)