Mobile-Security-Framework-MobSF
Mobile-Security-Framework-MobSF copied to clipboard
JADX tool disappear in docker-compose instance
JADX installed during Docker build to mobsf_home/tools directory will disappear in docker-compose setup because of mounting docker volume to the mobsf_home directory (https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/docker/docker-compose.yml#L48) which is clean at the beggining. If then tools_download.py didn't download it (because of proxy settings, for example) it will crash
[ERROR] 30/Jan/2025 11:36:18 - Decompiling with JADX failed mobsf-1 | Traceback (most recent call last): mobsf-1 | File "/home/mobsf/Mobile-Security-Framework-MobSF/mobsf/StaticAnalyzer/views/android/converter.py", line 101, in apk_2_java mobsf-1 | os.chmod(str(jadx), stat.S_IEXEC) mobsf-1 | FileNotFoundError: [Errno 2] No such file or directory: '/home/mobsf/.MobSF/tools/jadx/jadx-1.5.0/bin/jadx'
Probable solution is to use different directory for JADX install
👋 @Antiksec Issues is only for reporting a bug/feature request. For limited support, questions, and discussions, please join MobSF Slack channel Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
JADX is dynamically downloaded at first run, if not found in the volume mount. If there is a proxy config error, other things in MobSF will fail as well.
Having correct proxy configured is a requirement. There is also a way to define JADX binary path using the environment variable: https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/05206e72cae35b311615a70e51e1a946955c5e83/mobsf/MobSF/settings.py#L460
Yep, but download_file func which uses to download Jadx uses system proxy instead of upstream_proxy func here https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/ae34f7c055aa64fca58e995b70bc7f19da6ca33a/mobsf/MobSF/tools_download.py#L24
I made PR to fix this
Addressed in https://github.com/MobSF/Mobile-Security-Framework-MobSF/pull/2530