Commit Graph
117 Commits
Author SHA1 Message Date
Ajin AbrahamandCursor a0f8a0ded1 ci/docker: supply-chain Actions updates and Postgres 18 compose layout (#2643)
* ci: bump Actions versions, pin Docker actions, add Dependabot

Keep CI supply chain current after the Docker SBOM work: update test,
publish, and CodeQL workflows, SHA-pin Docker setup/login actions, and
enable weekly GitHub Actions Dependabot updates.

Co-authored-by: Cursor <[email protected]>

* docker: use Postgres latest and PG18 data volume layout

Co-authored-by: Cursor <[email protected]>

* Bump version to 4.5.2

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
2026-08-09 18:14:05 -07:00
a20d60bf12 ci: bump docker workflow actions and add SBOM attestations (#2639)
Bump Docker CI action majors across docker-latest.yml, docker-release.yml, and docker-test.yml:
actions/checkout v3 → v7
docker/setup-qemu-action / setup-buildx-action / login-action v3 → v4
docker/build-push-action v5 → pinned v7.3.0 (53b7df96c91f9c12dcc8a07bcb9ccacbed38856a)
Attach SBOM attestations (sbom: true) and pin provenance (provenance: mode=max) on image pushes (:latest and release tags).
Disable provenance on PR test builds (push: false), where registry attestations are not applicable.

---------

Co-authored-by: Ajin Abraham <[email protected]>
Co-authored-by: Cursor <[email protected]>
2026-08-09 17:10:24 -07:00
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
Ajin Abraham 6f8a43c1b7 [SECURITY][HOTFIX] Security Fixes and Hardening (#2600)
* Fix GHSA-hqjr-43r5-9q58

* Update security docs

* Security hardening

* Bump deps
2026-03-21 14:50:01 -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 9b6e0f0fe4 Socket Supply Chain Scan (#2559)
Socket Supply Chain Firewall
2025-10-04 15:04:04 -07:00
Ajin Abraham e371db8388 [HOTFIX] Update Slack Join Link (#2556)
* Update README.md

* Update SUPPORT.md

* Update bug_report.md

* Update CONTRIBUTING.md

* Update auto-comment.yml
2025-09-30 10:54:10 -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 7f3bc086c0 [Security] Fix Vulnerabilities Aug 2025 MobSF v4.4.1 (#2545)
Bump dependencies
Fix Security Vulnerabilities reported by @noname1337h1
https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-9gh8-9r95-3fc3
https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-ccc3-fvfx-mw3v
2025-08-30 19:28:41 -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 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 Abraham 8ea095ac80 Fixes a stored XSS in Recent Scans diff APK, GHSA-5jc6-h9w7-jm3p 2024-12-02 22:33:42 -08:00
Ajin Abraham 23cbd41614 CodeQL config update 2024-11-24 14:24:41 -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 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 1fdc718b07 Update SECURITY.md (#2418) 2024-07-31 11:57:39 -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 31026cbacd Update auto-comment.yml 2024-05-03 20:08:42 -07:00
Ajin Abraham 126eb78c3a Update CONTRIBUTING.md 2024-05-03 20:08:06 -07:00
Ajin Abraham 84d52a999a Update SUPPORT.md (#2384) 2024-05-03 20:07:25 -07:00
Ajin Abraham fb853e8865 Update bug_report.md 2024-05-03 20:06:20 -07:00
Ajin Abraham 99977da400 Update SECURITY.md 2024-04-03 21:50:07 -07:00
Ajin.Abraham 8a59d6833d HOTFIX: Build and push docker arm64 and amd64 together 2024-03-22 18:19:17 -07:00
Ajin Abraham 482bda913f Update SECURITY.md 2024-03-22 17:11:10 -07:00
Ajin Abraham 356895c611 Update SECURITY.md (#2365) 2024-03-22 17:10:34 -07:00
Ajin Abraham 3a7d12488c Update SECURITY.md (#2364) 2024-03-22 17:03: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 34473d3dac HOTFIX: Individual image publish 2024-03-19 17:31:05 -07:00
Ajin Abraham da7d1eec09 [HOTFIX][SECURITY] Fix an LFI, DSA Pub Key parsing bug and dependencies (#2326)
* [SECURITY] Fixes an LFI reported by @0x33c0unt - A crafted APK resource with icon name containing arbitrary path will get copied by MobSF as the icon file to the download directory which is available under `/download/` route. Fixed by https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/a58f8a8c0aa49e1581d97e19e8e2255ca96cd838
* Fixes #2324 , Bug in parsing DSA Public Key parameters for fingerprint calculation.
* Update dependencies
2024-01-13 20:00:46 -08:00
Ajin Abraham e67ceeba82 Update SECURITY.md (#2323)
updated security policy
2024-01-10 22:36:51 -08:00
Ajin Abraham 2aecb905b3 iOS Dynamic Analysis with Corellium (#2194)
* iOS Dynamic Analysis Support with Corellium Jailbroken iOS devices
* Corellium API layer for complete device and project management
* Frida instrumentation (attach, spawn and inject) over SSH local port forward
* Shell access over SSH
* MobSF httptools proxy integration over SSH remote port forward
* Device File upload and download over SSH
* Frida scripts for core defense bypass, monitoring, and tracing
* Helper iOS Frida scripts for pentesting and malware analysis
* Screen cast with touch, swipe and text input support from web UI
* Dynamic Analysis device data dump and  report Generation
* Android Certificate analysis, replaced oscrypto with cryptography for public key parsing
* Python minimum support is 3.10
* Bumped httptools to latest, fixes httptools repeat bug
* Added unzip to docker to fix a bug
2023-12-03 02:01:10 -08:00
Ajin Abraham 941f7c5dd4 [HOTFIX] iOS Framework Analysis + Multiple Feature QA (#2260)
* iOS Framework Analysis
* Static Analysis URL simplification
* Replace hardcoded urls in template with `{% url %}`
* Code QA
* Remove unwanted template file
* Remove `rescan` query param from url
* Android icon SVG guessing improvements
* Icon analysis refactoring, change icon storage location
* Remove SVG to PNG converter. Support PNG and SVG icon.
* Github docker release action update
2023-09-06 23:55:06 -07:00
Ajin Abraham bb700fa071 [HOTFIX] Migrate from setup.py to poetry, tox QA (#2249)
* Migrate from setup.py to use poetry build and publish
* Tox QA
* Version is now configured only at pyproject.toml
* Added poetry build test
* Updated mobsf PyPI publishing workflow 
* Update local DBs
2023-08-27 21:08:29 -07:00
Ajin Abraham 74f100de90 [HOTFIX] Docker Buildx test (#2247)
* Docker image build test for PRs
2023-08-26 11:45:39 -07:00
Ajin Abraham 8e29cb06a6 Pip to Poetry, Ubuntu Base image Bump, Dockerfile QA, Python 3.11 support (#2244)
* Docker base image update
* Docker file QA
* Github Actions version update
* Removed unwanted pinned repository
* Pip to Poetry migration
* Bump httptools
* Jump yara-python-dex
* Python 3.11 support
2023-08-25 21:15:28 -07:00
Ajin Abraham d021da6eab HOTFIX: MobSF Android Dynamic Analysis Docker Support (#2214)
* MobSF Android Docker Support

* Pin pip version

* Update mobsf-test.yml
2023-07-21 23:41:45 -07:00
Ajin Abraham aeaa9b122a New Android Manifest Rule: App support vulnerable android versions (#2114)
* add a new rule: dangerous os version

* qa

* lint checks

* run lint test on one os
2023-01-11 09:49:20 -08:00
Ajin Abraham 277e74d485 [EFR-02]Enterprise Feature Request - False Positive Triaging (#2000)
* Suppression logic

* Android code analysis suppression

* Fixes #1981

* iOS source support bundle id extraction

* iOS Source Code - Suppression support

* Remove check in CFBundleURLName

* iOS Binary code analysis suppression support

* Add Code QL

* Suppression support for Manifest analysis

* Fixes #2014

* REST API + Docs

* Address review comments

* update suppression wordings

* Fixes #2043

* Icon analysis code QA
2022-10-03 19:25:29 -07:00
Ajin Abraham c630a9011d HOTFIX: libsast, iOS Rule, M1 Mac support 2022-07-16 18:03:45 -07:00
Ajin Abraham 1a5f9a7356 Hotfix: Broken slack channel link fix 2022-06-12 15:57:22 -07:00
Ajin Abraham dba910de1c Hotfix:Slack link 2022-03-10 07:02:57 -08:00
Ajin Abraham c1afb4f63e Hotfix:Slack link 2022-03-10 07:00:37 -08:00
Ajin Abraham 05e17d3829 Hotfix: Slack link 2022-03-10 06:58:33 -08:00
Ajin Abraham 4ad0b5ccd9 Hotfix: update slack link 2022-03-10 06:57:15 -08:00
Ajin Abraham 3c6bf4e683 HOTFIX: Publish Tagged Release to DockerHub 2022-01-23 14:49:59 -08:00