MISP / misp-modules

Modules for expansion services, enrichment, import and export in MISP and other tools.
http://misp.github.io/misp-modules
GNU Affero General Public License v3.0
341 stars 233 forks source link

Cannot start misp-modules #366

Open KywoSkylake opened 4 years ago

KywoSkylake commented 4 years ago

Dear Team,

I have a Problem that I cannot start misp-modules. I fallowed the documentation and on the command sudo -u www-data /var/www/MISP/venv/bin/pip install -I -r REQUIREMENTS, I received fallowing error

Obtaining file:///usr/local/src/misp-modules (from -r REQUIREMENTS (line 2))
Obtaining pybgpranking from git+https://github.com/D4-project/BGP-Ranking.git/@429cea9c0787876820984a2df4e982449a84c10e#egg=pybgpranking&subdirectory=client (from -r REQUIREMENTS (line 3))
  Skipping because already up-to-date.
Obtaining pyipasnhistory from git+https://github.com/D4-project/IPASN-History.git/@47cd0f2658ab172fce42126ff3a1dbcddfb0b5fb#egg=pyipasnhistory&subdirectory=client (from -r REQUIREMENTS (line 4))
  Skipping because already up-to-date.
Obtaining pyintel471 from git+https://github.com/MISP/PyIntel471.git@0df8d51f1c1425de66714b3a5a45edb69b8cc2fc#egg=pyintel471 (from -r REQUIREMENTS (line 5))
  Skipping because already up-to-date.
Obtaining pymisp from git+https://github.com/MISP/PyMISP.git@3e8c36dc2f34b5d812a6b6d1bd1a619f01286657#egg=pymisp (from -r REQUIREMENTS (line 6))
  Skipping because already up-to-date.
Obtaining uwhois from git+https://github.com/Rafiot/uwhoisd.git@411572840eba4c72dc321c549b36a54ed5cea9de#egg=uwhois&subdirectory=client (from -r REQUIREMENTS (line 7))
  Skipping because already up-to-date.
Obtaining odtreader from git+https://github.com/cartertemm/ODTReader.git/@49d6938693f6faa3ff09998f86dba551ae3a996b#egg=odtreader (from -r REQUIREMENTS (line 8))
  Skipping because already up-to-date.
Obtaining pydnstrails from git+https://github.com/sebdraven/pydnstrails@48c1f740025c51289f43a24863d1845ff12fd21a#egg=pydnstrails (from -r REQUIREMENTS (line 9))
  Skipping because already up-to-date.
Obtaining pyonyphe from git+https://github.com/sebdraven/pyonyphe@cbb0168d5cb28a9f71f7ab3773164a7039ccdb12#egg=pyonyphe (from -r REQUIREMENTS (line 10))
  Skipping because already up-to-date.
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/cyber/.cache/pip/wheels/9e/fc/df/442b636248b5960ee06d9b6f2aaf944d217ffad39d129c8436'
Consider using the `--user` option or check the permissions.

So I tried to run it with root and also with www-data without sudo and it worked, but when I try to start /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 -s, I receive an other error

No module named 'misp_modules.modules.expansion._ransomcoindb'
2020-01-23 13:43:17,692 - misp-modules - INFO - Launch MISP modules server from package.
INFO:misp-modules:Launch MISP modules server from package.
2020-01-23 13:43:17,693 - misp-modules - INFO - Helper loaded cache
INFO:misp-modules:Helper loaded cache
2020-01-23 13:43:17,694 - misp-modules - INFO - Unable to load MISP modules from package.
INFO:misp-modules:Unable to load MISP modules from package.

Can please someone look into it, thank you Mike

adulau commented 4 years ago

From your log:

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/cyber/.cache/pip/wheels/9e/fc/df/442b636248b5960ee06d9b6f2aaf944d217ffad39d129c8436'
Consider using the `--user` option or check the permissions.

It seems that you mixed up install via multiple users and the pip install never completed.

GelosSnake commented 4 years ago

I am suffering the same issue, any recommendations on how to proceed on such cases?

KywoSkylake commented 4 years ago

Hey @GelosSnake,

Try to start it with: /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1

demiscuzz commented 3 years ago

Same issue, If i run /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 I get no such file or directory.

chrisinmtown commented 3 years ago

This is pretty stale, maybe it should be closed?

But just in case, I'd like to suggest that these install troubles suggest that maybe people are not familiar with python virtual environments, which is the recommended way to install misp-modules. The user that owns the virtual environment directory should also be the user that runs pip (pip3) install commands. If the install fails, then the script will not create the misp-modules file in your venv bin subdir.