Knowledge Base updated: 2026-11-16
Knowledge Base Index
1. Orientation
MobSF (Mobile Security Framework) is a Django-based mobile application security analysis platform. Its highest-level flow is: a user or API client uploads an app, MobSF routes it through static or dynamic analyzers, persists findings, and renders reports through the web UI or REST API.
Main parts:
mobsf/MobSF/— Django project shell, routing, settings, middleware, auth, and shared web views.mobsf/StaticAnalyzer/— static analysis for Android, iOS, Windows, and shared analysis primitives.mobsf/DynamicAnalyzer/— runtime analysis for Android and iOS devices/emulators with Frida/proxy/device helpers.mobsf/MalwareAnalyzer/andmobsf/signatures/— malware intelligence integrations, trackers, APKID, domain/IP feeds, and VirusTotal support.mobsf/templates/andmobsf/static/— server-rendered UI, report templates, and bundled front-end assets.scripts/,docker/, and project config — deployment, worker startup, dependency setup, and maintenance tooling.
Critical state lives in:
- The Django database models under analyzer apps, which store scan metadata, findings, dynamic sessions, and malware-related records.
- Filesystem scan workspaces and uploaded/extracted app artifacts, coordinated by static/dynamic analyzer code and deployment settings.
- Background task/queue infrastructure started by operational scripts for asynchronous analysis work.
- Bundled signature datasets under
mobsf/signatures/, used as local malware/tracker intelligence inputs.
2. Architecture diagrams
flowchart TD
subgraph Web[MobSF Django Web App]
URLs[mobsf/MobSF/urls.py]
CoreViews[MobSF views]
API[MobSF views/api]
Templates[mobsf/templates]
end
subgraph Static[StaticAnalyzer]
StaticCommon[views/common]
AndroidStatic[views/android]
IOSStatic[views/ios]
WindowsStatic[views/windows]
end
subgraph Dynamic[DynamicAnalyzer]
DynCommon[views/common]
AndroidDyn[views/android]
IOSDyn[views/ios]
DynTools[tools]
end
subgraph Malware[Malware intelligence]
MalwareAnalyzer[MalwareAnalyzer]
Signatures[mobsf/signatures]
end
subgraph Ops[Operations]
Scripts[scripts]
Docker[docker and Dockerfile]
Config[pyproject and settings]
end
User[Browser or API client] --> URLs
URLs --> CoreViews
URLs --> API
CoreViews --> Templates
API --> Static
API --> Dynamic
Static --> MalwareAnalyzer
MalwareAnalyzer --> Signatures
Dynamic --> DynTools
Scripts --> Web
Docker --> Web
Config --> Web
flowchart LR
Upload[Upload or scan request] --> Routing[MobSF routing/API]
Routing --> StaticCommon[StaticAnalyzer common setup]
StaticCommon --> Platform{Input platform}
Platform --> Android[Android static analyzer]
Platform --> IOS[iOS static analyzer]
Platform --> Windows[Windows static analyzer]
Android --> Malware[MalwareAnalyzer/signatures]
IOS --> Malware
Windows --> Malware
Malware --> Persist[Database and scan workspace]
Android --> Persist
IOS --> Persist
Windows --> Persist
Persist --> Report[HTML/PDF/API report]
flowchart LR
Start[Dynamic session request] --> Core[MobSF API or UI]
Core --> Platform{Target}
Platform --> AndroidEnv[Android environment/device]
Platform --> IOSEnv[iOS Corellium/device]
AndroidEnv --> Proxy[MITM capture/web proxy]
AndroidEnv --> FridaA[Android Frida/Xposed/TLS tools]
IOSEnv --> FridaI[iOS Frida helpers]
Proxy --> Results[Runtime findings]
FridaA --> Results
FridaI --> Results
Results --> Report[Dynamic report]
sequenceDiagram
participant Client as Browser/API Client
participant Django as MobSF Django URLs/Views
participant API as API Views
participant Analyzer as Static/Dynamic Analyzer
participant Intel as MalwareAnalyzer/Signatures
participant Store as DB + Workspace
Client->>Django: upload, scan, or report request
Django->>API: route API calls when applicable
Django->>Analyzer: dispatch web-driven analysis
API->>Analyzer: dispatch API-driven analysis
Analyzer->>Intel: enrich with malware/tracker intelligence
Analyzer->>Store: persist metadata, files, findings
Store-->>Django: report data
Django-->>Client: UI, PDF, or JSON response
3. Glossary
- MobSF — Mobile Security Framework, the Django application in this repository.
- StaticAnalyzer — MobSF app that inspects uploaded mobile/desktop packages without executing them.
- DynamicAnalyzer — MobSF app that runs apps on Android/iOS environments and collects runtime behavior.
- MalwareAnalyzer — MobSF app that enriches analysis with malware signatures, tracker data, domain/IP feeds, and VirusTotal.
- Corellium — iOS virtualization/device backend used by the iOS dynamic-analysis code paths.
4. Codebase-wide invariants
- The repository is organized as a Django project under
mobsf/, with the project shell inmobsf/MobSF/and Django app packages inmobsf/StaticAnalyzer/,mobsf/DynamicAnalyzer/, andmobsf/MalwareAnalyzer/. - Platform-specific static analyzers are partitioned by directory: Android code under
mobsf/StaticAnalyzer/views/android/**, iOS code undermobsf/StaticAnalyzer/views/ios/**, and Windows code undermobsf/StaticAnalyzer/views/windows/**. - Platform-specific dynamic analyzers are partitioned by directory: Android code under
mobsf/DynamicAnalyzer/views/android/**, iOS code undermobsf/DynamicAnalyzer/views/ios/**, and shared dynamic helpers undermobsf/DynamicAnalyzer/views/common/**. - REST API view code is centralized under
mobsf/MobSF/views/api/**, separate from general web views such as mobsf/…/home.py, authentication.py, and scanning.py. - Operational entrypoints and deployment assets live outside the Django package in top-level files/directories such as
Dockerfile,docker/**,scripts/**, run.sh, and setup.sh.
5. Routing table
-
mobsf/MobSF/**-> docs/django-core-routing-config.md -
mobsf/MobSF/views/api/**-> docs/rest-api-surface.md -
any change to Django settings, URL routing, middleware, auth, authorization, home, scanning, startup, or management commands -> docs/django-core-routing-config.md
-
any new or changed REST API endpoint -> docs/rest-api-surface.md
-
mobsf/…/__init__.py -> docs/static-analysis-common-pipeline.md
-
mobsf/…/models.py -> docs/static-analysis-common-pipeline.md
-
mobsf/…/__init__.py -> docs/static-analysis-common-pipeline.md
-
mobsf/StaticAnalyzer/views/common/**-> docs/static-analysis-common-pipeline.md -
mobsf/…/sast_engine.py -> docs/static-analysis-common-pipeline.md
-
mobsf/…/comparer.py -> docs/static-analysis-common-pipeline.md
-
mobsf/StaticAnalyzer/tools/**-> docs/static-analysis-common-pipeline.md -
any change to shared static-analysis models, task orchestration, binary/JS/secret/SBOM/firebase/technology helpers, suppression, or PDF/report helpers -> docs/static-analysis-common-pipeline.md
-
mobsf/StaticAnalyzer/views/android/**-> docs/android-static-analysis.md -
any Android APK/AAB/JAR/AAR/XAPK static-analysis change -> docs/android-static-analysis.md
-
mobsf/StaticAnalyzer/views/ios/**-> docs/ios-static-analysis.md -
any iOS IPA/app static-analysis change -> docs/ios-static-analysis.md
-
mobsf/StaticAnalyzer/views/windows/**-> docs/windows-static-analysis.md -
any Windows PE/static executable analysis change -> docs/windows-static-analysis.md
-
mobsf/DynamicAnalyzer/views/android/**-> docs/android-dynamic-analysis.md -
mobsf/DynamicAnalyzer/tools/onDevice/**-> docs/android-dynamic-analysis.md -
mobsf/DynamicAnalyzer/tools/frida_scripts/**-> docs/android-dynamic-analysis.md -
any Android emulator/device dynamic-analysis, APK patching, proxy capture, Frida, Xposed, TLS, or runtime report change -> docs/android-dynamic-analysis.md
-
mobsf/DynamicAnalyzer/views/ios/**-> docs/ios-dynamic-analysis.md -
mobsf/DynamicAnalyzer/tools/ios/**-> docs/ios-dynamic-analysis.md -
any iOS dynamic-analysis, iOS device-analysis, Corellium, SSH, or iOS Frida helper change -> docs/ios-dynamic-analysis.md
-
mobsf/DynamicAnalyzer/views/common/**-> docs/dynamic-common-frida-device.md -
mobsf/…/tests_dex_symbols.py -> docs/dynamic-common-frida-device.md
-
any cross-platform dynamic device abstraction, shared helper, Frida bridge, or Frida server update change -> docs/dynamic-common-frida-device.md
-
mobsf/MalwareAnalyzer/**-> docs/malware-analysis-integrations.md -
mobsf/signatures/**-> docs/malware-analysis-integrations.md -
any APKID, tracker, malware domain/IP feed, permissions/behavior rules, or VirusTotal integration change -> docs/malware-analysis-integrations.md
-
mobsf/templates/**-> docs/templates-static-reporting-ui.md -
mobsf/static/**-> docs/templates-static-reporting-ui.md -
any server-rendered UI, report template, auth/base/general page, static-analysis page, dynamic-analysis page, PDF template, or bundled front-end asset change -> docs/templates-static-reporting-ui.md
-
Dockerfile-> docs/deployment-ops-tooling.md -
docker/**-> docs/deployment-ops-tooling.md -
scripts/**-> docs/deployment-ops-tooling.md -
setup.bat-> docs/deployment-ops-tooling.md -
run.bat-> docs/deployment-ops-tooling.md -
.dockerignore-> docs/deployment-ops-tooling.md -
.gitignore-> docs/deployment-ops-tooling.md -
.gitmodules-> docs/deployment-ops-tooling.md -
.github/**-> docs/deployment-ops-tooling.md -
LICENSE-> docs/deployment-ops-tooling.md -
LICENSES/**-> docs/deployment-ops-tooling.md -
any deployment, Docker, Gunicorn, queue startup, dependency setup, test configuration, cleanup, migration, or mass-analysis script change -> docs/deployment-ops-tooling.md