Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start Dynamic Analysis #2376

Closed
osabri009 opened this issue Apr 14, 2024 · 5 comments
Closed

Unable to start Dynamic Analysis #2376

osabri009 opened this issue Apr 14, 2024 · 5 comments

Comments

@osabri009
Copy link

I run the MobSF via the docker command and use Genymotion as my Android emulator. But I can't get the Dynamic analyzer to work. Every time I run it, I get "Dynamic Analysis Failed.".

Here is the logs
[ERROR] 14/Apr/2024 05:27:12 - Dynamic Analysis Failed.
[ERROR] 14/Apr/2024 05:27:12 - Internal Server Error: /android_dynamic/7686782abefaaf8c0db276d93226cc3a
[INFO] 14/Apr/2024 05:27:16 - Connecting to Android adb://192.168.56.101:5555
[INFO] 14/Apr/2024 05:27:16 - Waiting for 2 seconds...
[ERROR] 14/Apr/2024 05:27:18 - Error Running ADB Command
Traceback (most recent call last):
File "/home/mobsf/Mobile-Security-Framework-MobSF/mobsf/DynamicAnalyzer/views/android/environment.py", line 167, in adb_command
result = subprocess.check_output(
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/adb', '-s', 'adb://192.168.56.101:5555', 'shell', 'getprop', 'ro.build.version.release']' returned non-zero exit status 1.
[INFO] 14/Apr/2024 05:27:23 - Creating Dynamic Analysis Environment for com.shia.Testapp
[INFO] 14/Apr/2024 05:27:26 - ADB Restarted
[INFO] 14/Apr/2024 05:27:26 - Waiting for 2 seconds...
[INFO] 14/Apr/2024 05:27:28 - Connecting to Android adb://192.168.56.101:5555
[INFO] 14/Apr/2024 05:27:28 - Waiting for 2 seconds...
[INFO] 14/Apr/2024 05:27:30 - Restarting ADB Daemon as root
adb: unable to connect for root: device 'adb://192.168.56.101:5555' not found
[ERROR] 14/Apr/2024 05:27:30 - Dynamic Analyzer

Copy link

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

@emilyanncr
Copy link

Do this:
docker pull opensecurity/mobile-security-framework-mobsf:latest
docker run -e MOBSF_ANALYZER_IDENTIFIER='IP:5555' -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest

The MOBSF analyzer identifier is the IP of the phone and can be found by going to the emulated phone's settings -> Wifi -> Double click on the Wifi button, expand the 'Advanced' options section -> IP

@ajinabraham
Copy link
Member

Please use slack for support.

@osabri009
Copy link
Author

osabri009 commented May 5, 2024 via email

@ben-tanto
Copy link

What might be useful is ensuring ADB is listening on tcpip mode then running docker in host mode to ensure TCP comms are simpler. This may help:

  1. Start AVD
  2. Reconnect to AVD using tcp adb connect 0.0.0.0:5555
  3. Start mobsf in host mode so we can directly connect to adb
    docker run -it --net=host --rm -e MOBSF_ANALYZER_IDENTIFIER="0.0.0.0:5555" opensecurity/mobile-security-framework-mobsf:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants