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.4k stars 3.23k forks source link

charmap & start_proxy error #591

Closed radenvodka closed 6 years ago

radenvodka commented 6 years ago

[2018-04-11 02:37:42]
[ERROR] Adding Scan URL to Database (C:\MobSF\MobSF\views.py, LINE 41 "if not db_obj.exists():"): no such table: StaticAnalyzer_recentscansdb
[2018-04-11 02:37:42]
[ERROR] no such table: StaticAnalyzer_staticanalyzerandroid
[2018-04-11 02:42:29]
[ERROR] Adding Scan URL to Database (C:\MobSF\MobSF\views.py, LINE 41 "if not db_obj.exists():"): no such table: StaticAnalyzer_recentscansdb
[2018-04-11 02:42:29]
[ERROR] no such table: StaticAnalyzer_staticanalyzerandroid
[2018-04-11 02:42:42]
[ERROR] no such table: StaticAnalyzer_staticanalyzerandroid
[2018-04-11 02:42:50]
[ERROR] Adding Scan URL to Database (C:\MobSF\MobSF\views.py, LINE 41 "if not db_obj.exists():"): no such table: StaticAnalyzer_recentscansdb
[2018-04-11 02:42:50]
[ERROR] no such table: StaticAnalyzer_staticanalyzerandroid
[2018-04-11 02:44:32]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:48:04]
[ERROR] Performing Malware Check (C:\MobSF\MalwareAnalyzer\views.py, LINE 129 "if isInternetAvailable():"): HTTPSConnectionPool(host='www.google.com', port=443): Read timed out. (read timeout=5)
[2018-04-11 02:49:03]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:49:30]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:49:54]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:50:18]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:50:20]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:50:21]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:52:47]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:52:53]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:53:29]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:54:13]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:54:45]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 02:59:39]
[ERROR] Malware DB Update (C:\MobSF\MalwareAnalyzer\views.py, LINE 102 "if sha256(tmp_dwd.name) != sha256(mal_db):"): [Errno 13] Permission denied: 'C:\\Users\\EKASYA~1\\AppData\\Local\\Temp\\tmpjszvznco'
[2018-04-11 02:59:43]
[ERROR] Setting up Dynamic Analysis Environment (C:\MobSF\DynamicAnalyzer\views\android\dynamic.py, LINE 158 "start_proxy(settings.PORT, package)"): [WinError 2] The system cannot find the file specified
[2018-04-11 03:01:29]
[ERROR] 'charmap' codec can't encode character '\u0393' in position 235: character maps to <undefined>
[2018-04-11 03:02:31]
[ERROR] Malware DB Update (C:\MobSF\MalwareAnalyzer\views.py, LINE 102 "if sha256(tmp_dwd.name) != sha256(mal_db):"): [Errno 13] Permission denied: 'C:\\Users\\EKASYA~1\\AppData\\Local\\Temp\\tmpbudrztjx'
[2018-04-11 03:03:38]
[ERROR] Setting up Dynamic Analysis Environment (C:\MobSF\DynamicAnalyzer\views\android\dynamic.py, LINE 158 "start_proxy(settings.PORT, package)"): [WinError 2] The system cannot find the file specified)

Error List:

i am using python 3

ajinabraham commented 6 years ago

Database is not migrated properly and capfuzz module is not installed.

radenvodka commented 6 years ago

start_proxy(settings.PORT, package) ? how to fix ?

ajinabraham commented 6 years ago

Install capfuzz, should fix that: pip install git+https://github.com/MobSF/CapFuzz.git

radenvodka commented 6 years ago

capture

I have installed it but I still get this error message.

ajinabraham commented 6 years ago

Try killing it and run capfuzz from the terminal and see it it's working.

radenvodka commented 6 years ago

cap 2

ajinabraham commented 6 years ago

That is crazy! This is the code failing for you

 subprocess.Popen(["capfuzz", "-m", "capture", "-p", str(port), "-n", project])

Can you try this and share the output.

cd C:\MobSF share output of pip freeze (Add python3 to path) python.exe

>>>import subprocess
>>>import capfuzz
>>>subprocess.Popen(["capfuzz", "-m", "capture", "-p", "1337", "-n", "foo"])
radenvodka commented 6 years ago

C:\Mobile Pentester\MobSF3>"c:/Python3/python.exe" -m pip freeze
androguard==3.1.0
asn1crypto==0.24.0
backcall==0.1.0
blinker==1.4
brotlipy==0.7.0
capfuzz==0.0.1
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
click==6.7
colorama==0.3.9
configparser==3.5.0
cryptography==2.1.4
decorator==4.2.1
Django==2.0.4
future==0.16.0
h11==0.7.0
h2==3.0.1
hpack==3.0.0
hyperframe==5.1.0
idna==2.6
ipython==6.3.1
ipython-genutils==0.2.0
jedi==0.11.1
kaitaistruct==0.8
ldap3==2.4.1
lxml==4.2.1
mitmproxy==3.0.2
networkx==2.1
parso==0.1.1
passlib==1.7.1
pdfkit==0.6.1
pickleshare==0.7.4
prompt-toolkit==1.0.15
pyasn1==0.4.2
pycparser==2.18
pydivert==2.1.0
Pygments==2.2.0
pyOpenSSL==17.5.0
pyparsing==2.2.0
pyperclip==1.6.0
pytz==2018.4
requests==2.18.4
rsa==3.4.2
ruamel.yaml==0.15.37
simplegeneric==0.8.1
six==1.11.0
sortedcontainers==1.5.9
tornado==4.5.3
traitlets==4.3.2
urllib3==1.22
urwid==2.0.1
wcwidth==0.1.7
wsproto==0.11.0

and

C:\Mobile Pentester\MobSF3>"c:/Python3/python.exe"
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> import capfuzz
>>> subprocess.Popen(["capfuzz", "-m", "capture", "-p", "1337", "-n", "foo"])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Python3\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "c:\Python3\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
>>>
ajinabraham commented 6 years ago

I think your issue is that Python3 is not in PATH. It works fine for me

C:\Users\Ajin>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import subprocess
>>> import capfuzz
>>> subprocess.Popen(["capfuzz", "-m", "capture", "-p", "1337", "-n", "foo"])
<subprocess.Popen object at 0x04F9C510>
>>> Capture Module Loaded
Proxy server listening at http://*:1337

Add it to path. foo

radenvodka commented 6 years ago

cap 7

Required patch Python.

wow nice , thank's.

pjadon-mn commented 5 years ago

@radenvodka can you share the steps which you did to resolve the exception

subprocess.Popen(["capfuzz", "-m", "capture", "-p", "1337", "-n", "foo"]) Traceback (most recent call last): File "", line 1, in File "C:\Python36\lib\subprocess.py", line 707, in init restore_signals, start_new_session) File "C:\Python36\lib\subprocess.py", line 990, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

Even I am stuck at start_proxy(settings.PORT, package) (Dynamic Analysis)