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

MISP_2_0 analyzer throws error when executed on an IP observable inside Cortex docker image #149

Open
ParanoidRat opened this issue Oct 16, 2018 · 5 comments
Assignees

Comments

@ParanoidRat
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) n/a
OS version (client) n/a
Cortex version / git hash thehiveproject/cortex:2.1.2-1
Package Type Docker (Swarm)

Problem Description

Not sure if it is caused by the Cortex docker image or the analyzer's code, but when the latest MISP_2_0 analyzer is run on an IP, Cortex chokes with the following traceback:

Invalid output
WARNING [__init__.py:49 - <module>() ] Unable to load pymisp properly: No module named enum
Traceback (most recent call last):
  File "MISP/misp.py", line 80, in <module>
    MISPAnalyzer().run()
  File "MISP/misp.py", line 29, in __init__
    proxies={'http': self.http_proxy, 'https': self.https_proxy})
  File "/opt/Cortex-Analyzers/analyzers/MISP/mispclient.py", line 59, in __init__
    self.misp_connections.append(pymisp.PyMISP(url=server,
AttributeError: 'module' object has no attribute 'PyMISP'

Steps to Reproduce

  1. Deploy Cortex as a docker container or Swarm service
  2. Supply latest analyzers as a docker volume
  3. Use MISP_2_0 analyzer on an IP observable

Possible Solutions

Perhaps a dependency issue in Cortex docker image for PyMISP? The only place it imports from enum import Enum is here

@3c7
Copy link

3c7 commented Oct 17, 2018

There are somehow python module dependencies missing. We'll take a look on that.

@3c7
Copy link

3c7 commented Oct 17, 2018

Found it. Somehow python2 is used for that and because of that the enum module cannot be found.

@3c7
Copy link

3c7 commented Oct 17, 2018

Cortex-Analyzers 1.14.0 enforces the use of python3 for the misp analyzer

@gnosticdevice
Copy link

I seem to be experiencing the same error with Cortex-Analyzers 1.14.0
1
2

@infosec-intern
Copy link

I'm having the same issue still as well. I was able to get it working by deleting the symlink from python->python2 and replacing it with python->python3. It's a pretty dirty fix though

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

5 participants