MobSF / Mobile-Security-Framework-MobSF

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
https://opensecurity.in
GNU General Public License v3.0
17.24k stars 3.22k forks source link

MobSF Dynamic Analysis Error #2266

Closed brutexploiter closed 1 year ago

brutexploiter commented 1 year ago
[ERROR] 09/Sep/2023 17:03:10 - Error Running ADB Command
Traceback (most recent call last):
  File "C:\MobSF\mobsf\DynamicAnalyzer\views\android\environment.py", line 167, in adb_command
    result = subprocess.check_output(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\brutexploiter\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe', '-s', 'emulator-5554', 'shell', 'getprop', 'ro.boot.serialno']' returned non-zero exit status 1.
[ERROR] 09/Sep/2023 17:03:10 - Error Running ADB Command
Traceback (most recent call last):
  File "C:\MobSF\mobsf\DynamicAnalyzer\views\android\environment.py", line 167, in adb_command
    result = subprocess.check_output(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\brutexploiter\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe', '-s', 'emulator-5554', 'shell', 'getprop', 'ro.serialno']' returned non-zero exit status 1.
[ERROR] 09/Sep/2023 17:03:10 - Dynamic Analyzer
Traceback (most recent call last):
  File "C:\MobSF\mobsf\DynamicAnalyzer\views\android\dynamic_analyzer.py", line 152, in dynamic_analyzer
    if not env.connect_n_mount():
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\MobSF\mobsf\DynamicAnalyzer\views\android\environment.py", line 107, in connect_n_mount
    runtime = self.get_environment()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\MobSF\mobsf\DynamicAnalyzer\views\android\environment.py", line 376, in get_environment
    out += self.adb_command(['getprop',
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
[ERROR] 09/Sep/2023 17:03:10 - Dynamic Analysis Failed.
[ERROR] 09/Sep/2023 17:03:10 - Internal Server Error: /android_dynamic/ed9a88b2302fdf730d1afd831d091138
ERROR:django.request:Internal Server Error: /android_dynamic/ed9a88b2302fdf730d1afd831d091138
[INFO] 09/Sep/2023 16:57:50 - Updating Maltrail Database
[ERROR] 09/Sep/2023 16:57:50 - [ERROR] Performing Malware Check
Traceback (most recent call last):
  File "C:\MobSF\mobsf\MalwareAnalyzer\views\MalwareDomainCheck.py", line 132, in malware_check
    with io.open(mal_db,
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\brutexploiter\\.MobSF\\signatures\\malwaredomainlist'
[ERROR] 09/Sep/2023 16:57:50 - Failed to Perform Geolocation
Traceback (most recent call last):
  File "C:\MobSF\mobsf\MalwareAnalyzer\views\MalwareDomainCheck.py", line 95, in gelocation
    self.IP2Loc.open(self.iplocbin)
  File "C:\Users\brutexploiter\AppData\Local\pypoetry\Cache\virtualenvs\mobsf-wijrL1ak-py3.11\Lib\site-packages\IP2Location\database.py", line 202, in open
    self._f = open(filename, 'rb')
              ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\brutexploiter\\.MobSF\\signatures\\IP2LOCATION-LITE-DB5.IPV6.BIN'
[INFO] 09/Sep/2023 16:57:50 - Saving to Database

image image image image image

github-actions[bot] commented 1 year ago

👋 @brutexploiter 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.

00xBAD commented 1 year ago

@brutexploiter i'm using Arch Linux, and got it working with: run docker with: docker run -it --rm --net=host --name mobsf -p 8000:8000 -e MOBSF_ANALYZER_IDENTIFIER=127.0.0.1:5555 opensecurity/mobile-security-framework-mobsf:latest and set 127.0.0.1 host.docker.internal in /etc/hosts

Idk, i've spent hours to figure out, but not sure how exactly is working, because i'm new to docker. I'm using Android Studio Emulator as described on MobSF docs.

ajinabraham commented 1 year ago

Please use slack for support.

The above doesn't expose proxy port for https capture. The documentation clearly explains how to use the MobSF docker image for dynamic analysis with AVD

Buddy4toBuddy commented 3 months ago

Hi, @ajinabraham I don't have a turkcell.com.tr or thalesgroup.com domain ID. When I use my gmail ID to login to Slack, it shows the need for the for the above-mentioned domain. Please resolve this and add me to your slack group. My Gmail ID is buddy4tobuddy@gmail.com.