Commit Graph
69 Commits
Author SHA1 Message Date
Ajin Abraham 62563ca429 [HOTFIX][Security] Security Updates July 5 2026 (#2627)
Security Fixes

[GHSA-8j49-mmcx-4mp5] Arbitrary File Read via Path Traversal in ZIP/APK Icon Extraction
The android:icon attribute from an APK manifest was interpolated into file paths without validation, allowing a crafted APK to read arbitrary files from the server. Fixed by adding is_path_traversal() and is_safe_path() guards in find_icon_path_zip. Dependency bump included.

[GHSA-3p54-567p-2wpr] CSRF Checks Not Enforced After Django Middleware Migration
The migration from the deprecated MIDDLEWARE_CLASSES to MIDDLEWARE omitted CsrfViewMiddleware, SecurityMiddleware, and XFrameOptionsMiddleware, leaving CSRF, HSTS, and clickjacking protections silently disabled. All three have been restored to the active MIDDLEWARE tuple. The now-dead MIDDLEWARE_CLASSES block has been removed to prevent future confusion.

[GHSA-x768-8642-mmq9] Zip Bomb Denial of Service via Per-File Size Limit Bypass
The per-file size check in ZIP extraction logged a warning on oversized members but was missing a continue, allowing files exceeding ZIP_MAX_UNCOMPRESSED_FILE_SIZE to be extracted anyway as long as the aggregate limit was not reached. Fixed by adding the missing continue.

[GHSA-95px-34x5-p37h] SSRF Port Restriction Bypass in assetlinks_check
valid_host() was called with only the bare hostname, allowing android:port to be appended afterward without going through port validation, bypassing the HTTP/HTTPS-only restriction. Fixed with a two-layer approach: primary port allowlist check before URL assembly in get_browsable_activities, and a defence-in-depth re-check in _check_url.

Hardening

The hand-rolled safe_extract used os.path.abspath (symlink-blind) instead of os.path.realpath, creating a TOCTOU window where a symlink could redirect extraction outside the destination directory. Replaced with Python 3.12's tarfile.extractall(filter='data') (PEP 706), which rejects symlinks, hardlinks, absolute paths, and traversal members per-member before extraction. A robust realpath-based fallback is included for older Python versions.
Both download_app_data call sites in the iOS dynamic analyser now wrap app_container and tarfile with shlex.quote when building the SSH tar command, as defensive coding hygiene.
Refactoring

is_path_traversal, is_safe_path, clean_filename, cmd_injection_check, is_pipe_or_link, and is_attack_pattern were scattered across utils.py and shared.py. All have been moved to mobsf/MobSF/security.py as the single authoritative location for security primitives.
Developer Tooling

AGENTS.md / CLAUDE.md - AI agent guidelines
Added a coding-standards document for AI coding agents (Cursor, Claude, Codex) covering MobSF-specific secure-by-default patterns: path traversal guards, archive extraction safety, Django middleware active-tuple hygiene, split-validation anti-patterns (SSRF port bypass), guard completeness (continue/return/raise after every security check), and Django-specific security features (form validators, decorators, middleware). CLAUDE.md is a symlink to AGENTS.md.
2026-07-05 16:55:49 -07:00
6e875fb77b Jailbroken iOS Device Support (#2536)
Enables dynamic analysis on real jailbroken iOS devices connected via USB or WiFi SSH, complementing the existing Corellium-based iOS analysis.              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  - SSH connectivity — connects to jailbroken devices over USB (via iproxy port forwarding) or WiFi using Paramiko SSH                                         
  - Frida instrumentation — spawns/attaches Frida on-device, with full hook support matching the existing Corellium flow                                       
  - Environment setup — installs AppSync Unified and Frida server on first run; supports both arm and arm64 devices                                            
  - Dynamic analysis — app file extraction, system log streaming (oslog), screenshot capture, process listing, and report generation
  - SSH terminal — execute shell commands on the device over SSH

---------

Co-authored-by: CylentSec <[email protected]>
Co-authored-by: Oz <[email protected]>
2026-03-23 01:46:03 -07:00
Ajin Abraham 2b08dd050e [SECURITY] Security Update + Dependency Bump (#2584)
* Bump Dependencies
* Fix a Stored XSS: GHSA-8hf7-h89p-3pqj
* Remove all  | safe in templates and HTML from Python
* Add permissions to Github Actions
2026-01-25 22:33:34 -08:00
Ajin Abraham 2c712e2ebc [HOTFIX] Dec 2025 QA + Bug Fixes (#2574)
* Dependency bump
* Fix [FEATURE] urls should be extracted as case-sensitive #2491
* Fix Code analysis -> IP Address disclosure flags on invalid IP's (Version Numbers) #2562
2025-12-07 21:34:08 -08:00
Ajin Abraham 5d1096d458 Hotfix: Fix LIEF nx and arc check 2025-09-07 12:33:53 -07:00
Ajin Abraham de7bf03656 Python 3.13 Support (#2546)
* Python Support updated to 3.12-3.13
* Bump mitmproxy
* Bump httptools
* Remove pinned xmlsec, lxml
* Android Permission Update
* Updates Signatures
2025-08-30 23:46:20 -07:00
Ajin Abraham 7e0355c51d June 22nd 2025 updates (#2530)
* Breaking change: Frida 17+ support and script updates
* Breaking change: Corellium iOS device must install frida >=17
* Updated Frida scripts for logging, ssl/cert pinning bypass
* Added bridges support to frida
* Poetry dependency updates
* Fix Frida Code Editor code alignment issues
* Fix Google Play Scrapper timeout issues behind proxy
* Apply MobSF proxy settings to standalone tools_download.py
2025-06-23 00:57:33 -07:00
Ajin Abraham 6987a94648 v4.3.3 Security Updates (#2518)
* Fix GHSA-mwfg-948f-2cc5

* stricter email case validation

* Fix GHSA-c5vg-26p8-q8cr

* Bump deps

* Lint QA
2025-05-04 16:33:07 -07:00
Ajin Abraham caa223d94a pin lxml version as well 2025-04-25 11:16:33 -07:00
Ajin Abraham 4b8bab5a98 [SECURITY] Improve SSRF checks, strict path check for well_known_path (#2510)
* Improved SSRF checks (credential checks, length check, port check, path, query, and params check, ipv6, ipv4 coverage, handle possible decimal or hex IP bypasses)
* Add additional strict path check for Applink well known path
* Moved `valid_host` to `security.py`
* Update `security.md`
* Bump dependencies
* Fix docker build
2025-03-28 17:38:23 -07:00
Ajin Abraham 506434670a March 25 QA (#2504)
* Dependency bump
* Strict firebaseio domain check
* Fix frida server download proxy SSL verify config
* Fix CI build on mac
2025-03-23 12:27:01 -07:00
Ajin Abraham 05206e72ca [SECURITY] Security update to fix vulnerabilities reported by Positive Technologies researchers (#2488)
* Fix Stored XSS in iOS Dynamic Analysis, GHSA-cxqq-w3x5-7ph3
* Fix DOS by loose re_path check and strict check inside function, GHSA-jrm8-xgf3-fwqr
* Fix API Key leakage, replace REST API with authenticated endpoint, GHSA-79f6-p65j-3m2m
* Update SECURITY.md
2025-02-04 21:00:57 -08:00
Ajin AbrahamandNick Lupien d1d3b7a9ae Dep bump + Support HTTPS upgrade for Assetlinks check (#2484)
* Fix false positives caused in Android manifest analysis
* Dep bumps + Support HTTPS upgrade for Assetlinks check
* MobSF version bump to 4.3.0

---------

Co-authored-by: Nick Lupien <[email protected]>
2025-01-22 23:15:32 -08:00
Ajin AbrahamandByteSnipers GmbH 79b2d28c3b Byte snipers patch 2 (#2477)
* Fix for missing 'packaging.metadata module

Changed the packaging version to 24.2

Co-authored-by: ByteSnipers GmbH <[email protected]>
2024-12-18 18:35:11 -08:00
Ajin Abraham 27d1658728 Fixes a stored XSS in Recent Scans diff APK, GHSA-5jc6-h9w7-jm3p 2024-12-02 22:33:01 -08:00
Ajin Abraham 5ce7e237af [4.2.8] Multiple APK Analysis improvements, general Code QA & bug fixes (#2470)
* Dockerfile QA
* Add sdk-build-tools to Docker image
* Replace biplist with plistlib std lib
* Fixed a bug in iOS pbxproj parsing
* Added support for APK parsing with aapt2/aapt
* Use aapt/aapt2 as a fallback for APK parsing, files listing and string extraction
* Added "started at" to Scan task queue model #2463
* Tasks List API to return string status #2464
* Replaced all minidom calls with defusedxml.minidom
* Code QA on android manifest data extraction and parsing
* Improved android file analysis
* Improved android manifest data extraction
* Improved android icon file extraction
* Improved android app name extraction
* Improved android appstore package details extraction
* Android string extraction to fallback on aapt2 strings
* APK analysis arguments refactor
* Handle packed APKs, refactor unzip to handle malformed APK files
* Handle reserved filename conflict during ZIP extraction
* Explicit Zipslip handling during ZIP extraction
* Graceful files extraction on unzip failure
* Removed bail out and continue analysis
* Moved androguard parsing to the start of static analysis
* AndroidManifest.xml fallback from apktool to androguard during extraction and parsing
* Updated Tasks UI to show started at
2024-11-28 17:26:50 -08:00
Ajin Abraham af49985dd1 [4.2.7] Androguard & ApkInspector Bump + Patch AXMLParsing (#2461)
* Androguard 293ab2d89ab9ce011c7dbbc5df3c876172875a1c update
* AXML Parser warn "reserved must be zero!" instead of raise
* Fallback on get app name when androguard returns empty string
2024-11-24 22:53:21 -08:00
Ajin Abraham 8cd9838369 4.2.6 (#2459)
* Updated permissions
* Added and updated permission mapping rules
* Handle errors gracefully from get_app_name and icon_analysis
* Add new scans in tasks view without needing and explicit refresh
* Optimizing downloads, adding downloads for source code types and windows appx
2024-11-24 14:20:35 -08:00
Ajin Abraham b4cf9b70ac 4.2.5 (#2457)
* Unified async scan timeout
* Allow incomplete scan delete after async scan timeout duration
* Added support for Android SBOM analysis
* Make dependencies unpinned (Address #2458)
2024-11-23 13:48:12 -08:00
Ajin Abraham 4b394a2b8a [4.2.4] Async analysis REST API support, fix timeout handle function, Qa (#2456)
* Async analysis REST API support & Docs
* Fix timeout handle function
* Code QA untar permissions
2024-11-20 22:56:46 -08:00
Ajin Abraham d1c9cb1f4f DjangoQ2 config 2024-11-19 22:36:07 -08:00
Ajin Abraham fba86ca87b Version bump 2024-11-19 14:08:01 -08:00
Ajin Abraham 003ee16519 4.2.1 (#2451)
* Improvements in scan queue
* Fix TOCTOU in delete scans view
2024-11-18 20:56:18 -08:00
Ajin Abraham b5da756615 4.2.0 (#2450)
- Added malware lookup using SHA2 with VirusTotal, Triage, Hybrid Analysis, and MetaDefender.
- Fixed permissions of extracted files to counter anti-analysis techniques.
- Resolved APK parsing errors in `androguard`.
- Handled exceptions in `string_on_binary`.
- Optimized APK ZIP analysis for improved performance.
- Fixed untar permission errors in dynamic analysis.
- Added bypass for SSL pinning in Boye's `AbstractVerifier`.
- Updated bypass for SSL pinning in Appmattus's `CertificateTransparencyInterceptor`.
- Introduced SSL pinning detector script.
- Improved Frida intent dumper script.
- Added Frida intent tracer script.
- Introduced timeouts for all HTTP calls.
- Added `django-q2`-based asynchronous scans for Android and iOS binaries and source code.
- Fixed bug in certificate analysis.
- Enabled asynchronous scans in Docker Compose setup.
- Performed QA for Android and iOS SAST modules.
- Added Frida script for `audit-webview`.
- Introduced Frida script for `trace-javascript-interface`.
- Upgraded `libsast` for improved file reading, multiprocessing, and multithreading.
- Fixed PNG crush issues on Darwin systems.
- Performed QA on the home screen UI.
- Updated `httptools` and `libsast` dependencies.
2024-11-17 22:26:06 -08:00
Ajin Abraham 3cf21cec16 4.1.9 (#2449)
* Anti-analysis bypass
   - JADX fallback to DEX files on APK decompilation failure
   - apktool fallback to androguard for AndroidManifest.xml extraction
   - apksigner.jar fallback to apksigtool/androguard for signature version extraction
   - Graceful erorrs for failures instead of exceptions
2024-11-11 15:44:03 -08:00
Ajin Abraham 70e243d661 4.1.8 (#2448)
* APKID QA.
* Bash and Batch file script QA.
* Android Report template optimizations on how exported components are displayed.
* Clickable Android Activities, Services, Providers and Recievers.
* Updated Android version support to 11.0 for Android Studio AVD.
* Created helper scripts for AVDs `scripts/start_avd.sh` and `scripts/start_avd.ps1`.
2024-11-10 00:44:20 -08:00
Ajin Abraham 76596e33ed docker compose QA, explict requests timeout (#2447)
* Dependency update
* Explicit timeout for all requests
* Support proxy for all http(s) calls
* Optimize jadx download, support system proxy
2024-11-08 17:05:49 -08:00
Ajin Abraham ee2cb73824 Add support for pulling split apks, Fixes #2271 (#2446)
* Add support for pulling split apks from device, Fixes #2271
* Replace Quark with Behaviour analysis using quark rules
2024-11-07 19:34:37 -08:00
Ajin Abraham e5af3a8219 4.1.5 (#2445)
* Support custom home from environment variables
* Reduce iOS binary findings severity to warning from high
* Code QA and dependency updates
* docker-compose QA, added example nginx config
* Added docker-compose_swarm.yml by @antonkap add support for docker secrets
* IPA PNG Uncrush support for Windows and Linux #2397
2024-11-06 22:59:01 -08:00
Ajin Abraham e4406e9479 [HOTFIX] + Features (#2444)
Add support for sample download in recent scans.
Bug fix in firebase analysis (dict mutation errors)
2024-11-05 18:14:56 -08:00
Ajin Abraham 66af98f3ec libsast bump 2024-11-04 16:35:42 -08:00
Ajin Abraham 17f3f028ff HOTFIX: Libsast bump (#2443)
* Libsast bump
* Bump libsast to address match case
2024-11-04 13:06:11 -08:00
Ajin Abraham 3f947c0226 Hotfix: Firebase + Dep bumps 2024-11-02 21:19:39 -07:00
Ajin Abraham 6947649b18 Multiple Features (Scan timeout, Firebase Remote Config, Search Scans) (#2441)
Support time out for SAST and Binary scans
Search by MD5, package name, file name and app name.
Search REST API + docs + tests
Firebase remote config check [FEATURE] Add support for Firebase Remote Config information  #2429
autopep8
2024-10-29 00:51:13 -07:00
Ajin Abraham 9b2a3c8552 [HOTFIX] Dockerfile and dependency upgrade, Bug Fixes (#2439)
* Dockerfile: migrate from Ubuntu to Debian Bookworm
* Update and MachO and ELF Analysis
* Update docker compose with postgres
* JDK bump to 22.0.2
* Python bump to 3.12
* Bump jadx, apktool, vd2svg, bundletool
* Remove jadx from repo and download it dynamically during setup
* Install jadx during docker build
* Replace deprecated dependencies
* Bump httptools
* Postgres Support by default
* Bump LIEF to latest, reintroduce PIE checks for ELF
* Fixes #2430 #2432 #2395
* Bug Fixes
2024-10-28 02:36:51 -07:00
Ajin Abraham cc625fe843 [SECURITY][HOTFIX] Fixes GHSA-4hh3-vj32-gr6j (#2421)
* Fixes GHSA-4hh3-vj32-gr6j
* update SECURITY.md
* update dependencies
2024-08-18 02:07:14 -07:00
Ajin Abraham 5b7c5c0075 [EFR][HOTFIX] Realtime Scan status and logs (#2416)
* Realtime Scan Status in UI and PDF reports
* Scan Status REST API & tests
* Fixes #2414
* Address #2413
* Code QA
* Dependency and version bump
2024-08-04 12:07:38 -07:00
Ajin Abraham fdaad81314 HOTFIX: Fix and OpenRedirect vulnerability 2024-07-31 11:51:27 -07:00
Ajin Abraham a9de0335d4 [HOTFIX] AppSec PNW 2024, Deeplink Trigger Support for Android Dynamic Analyzer (#2402)
* iOS  Dynamic Analyzer String Compare Frida script improvement
* Android Dynamic Analyzer Deeplink UI trigger support 
* Android & iOS Dynamic Analyzer UI Improvements
* Android & iOS Dynamic Analyzer Bug fixes
2024-07-25 21:30:09 -07:00
Ajin Abraham 39ba3e64be [HOTFIX] Code QA (#2393)
* QA
* Add new android rule setAllow*FromFileURLs
* android root bypass and debugger bypass scripts improvements
* Dockerfile qa
* prevent entrypoint exit if username already exists
2024-06-02 16:37:00 -07:00
Ajin Abraham 680ca5d302 [HOTFIX] Support AAB with MobSF, Convert AAB to APK, Fixes #2387 (#2391)
* AAB to APK conversion
* relative urls fix for recent scan
2024-05-24 20:46:23 -07:00
Ajin Abraham b46c0037ac [EFR][HOTFIX] SSO Support + Okta SSO Documentation (#2389)
* Add support for SSO with SAML2.0
* Bump Deps
* Docs Updated
* Bump MobSF version
2024-05-22 21:27:49 -07:00
Ajin Abraham 76187b805f [EFR] AuthZ and AuthN for MobSF + Bug Fixes (#2366)
Authentication and Authorization (`Maintainer` , Viewer`) support in MobSF
* Basic User Management
* Bug Fixes in Runtime Executable Tampering
* Ratelimiting support for login endpoint
* Disable AuthZ/AuthN for REST API and also via ENV VAR `MOBSF_DISABLE_AUTHENTICATION=1`
* Bug Fix #2285 
* Bug Fix Icon Analysis Nonetype
* Update SSRF Filter
* Dependency Bump
* Beta to Stable release from V4
* Runs with DEBUG=False
* New home screen UI
2024-05-21 10:08:01 -07:00
Ajin Abraham 43bb71d115 [HOTFIX][SECURITY] Fixes an SSRF vulnerability report from positive technologies (#2373)
Address: https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-wpff-wm84-x5cx
2024-04-03 21:47:14 -07:00
Ajin Abraham 5056a7d660 HOTFIX: Remove Androguard dependency use only features required by MobSF (#2363)
This PR strips out androguard and it's dependencies from MobSF.
Extract androguard related functions used by MobSF.
Some dependencies such as pyQt5 from apkinspector is breaking the ARM64 docker image.
This should address that issue.
In future, we will have to copy over any fixes to axml, apk, public, types from androguard and ZipEntry from apkinspector. 
We won't be adding linting to these files. The extracted functions will be considered as an external tool.
2024-03-22 15:30:05 -07:00
Ajin Abraham 4417da03ba poetry pyqt5 fixes (#2362)
* poetry pyqt5 fixes

* QA

* fix

* Cert analysis qa

* QA

* pin pyqt5
2024-03-22 13:52:04 -07:00
Ajin.Abraham 5a8eeee73c HOTFIX:[SECURITY] Fix GHSA-wfgj-wrgh-h3r3, dep bump, docker build qa 2024-03-22 11:49:27 -07:00
Ajin.Abraham a5338ee682 HOTFIX: Bump androguard + remove quark 2024-03-13 00:57:54 -07:00
Ajin.Abraham 1e932050fc HOTFIX: Bump deps + expose Corellium stop app api 2024-03-06 18:55:42 -08:00
Ajin Abraham 29df4f2f03 Runtime Exec Tampering Detection, iOS Dynamic REST APIs, Datatables Export (#2339)
* Runtime Executable Tampering Detection

* Add security.py

* Code QA Performance

* Code QA Runtime EXEC tampering detection

* Corellium API QA + Domain support

* REST API Docs + Datatables export
2024-02-09 18:42:00 -08:00