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

Added MISP warning lists analyzer #129

Merged
merged 5 commits into from
Dec 27, 2017
Merged

Added MISP warning lists analyzer #129

merged 5 commits into from
Dec 27, 2017

Conversation

3c7
Copy link
Contributor

@3c7 3c7 commented Nov 2, 2017

-> #124

@3c7
Copy link
Contributor Author

3c7 commented Nov 2, 2017

grafik

@saadkadhi saadkadhi self-requested a review November 3, 2017 10:11
@saadkadhi saadkadhi self-assigned this Nov 3, 2017
@saadkadhi saadkadhi added scope:analyzer Issue is analyzer related category:feature-request Issue is related to a feature request status:in progress labels Nov 3, 2017
@saadkadhi
Copy link
Contributor

@3c7 The analyzer has many dependencies due to pygit2. On Ubuntu 16.04 LTS, it is not possible to install it since it requires libgit2 0.26.x while Ubuntu provides libgit2 0.24.x.

After installing libffi-dev and libgit2-dev, pip still fails:

Collecting pygit2
  Downloading pygit2-0.26.0.tar.gz (457kB)
Requirement already satisfied: cffi in /usr/local/lib/python2.7/dist-packages (from pygit2)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from pygit2)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi->pygit2)
Building wheels for collected packages: pygit2
  Running setup.py bdist_wheel for pygit2: started
  Running setup.py bdist_wheel for pygit2: finished with status 'error'
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g1Lyef/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpUskuXYpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/blame.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/py2.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/repository.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/errors.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/__init__.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/remote.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/utils.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/refspec.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/config.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/_build.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/_run.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/settings.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/py3.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/submodule.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/index.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/credentials.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/ffi.py -> build/lib.linux-x86_64-2.7/pygit2
  copying pygit2/decl.h -> build/lib.linux-x86_64-2.7/pygit2
  running build_ext
  generating cffi module 'build/temp.linux-x86_64-2.7/pygit2._libgit2.c'
  creating build/temp.linux-x86_64-2.7
  building '_pygit2' extension
  creating build/temp.linux-x86_64-2.7/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c src/blob.c -o build/temp.linux-x86_64-2.7/src/blob.o
  In file included from src/blob.h:34:0,
                   from src/blob.c:30:
  src/types.h:36:2: error: #error You need a compatible libgit2 version (v0.26.x)
   #error You need a compatible libgit2 version (v0.26.x)
    ^
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pygit2
  Running setup.py clean for pygit2
Failed to build pygit2
Installing collected packages: pygit2
  Running setup.py install for pygit2: started
    Running setup.py install for pygit2: finished with status 'error'
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g1Lyef/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-h0KZsU-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/blame.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/py2.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/repository.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/errors.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/__init__.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/remote.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/utils.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/refspec.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/config.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/_build.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/_run.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/settings.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/py3.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/submodule.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/index.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/credentials.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/ffi.py -> build/lib.linux-x86_64-2.7/pygit2
    copying pygit2/decl.h -> build/lib.linux-x86_64-2.7/pygit2
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-2.7/pygit2._libgit2.c'
    creating build/temp.linux-x86_64-2.7
    building '_pygit2' extension
    creating build/temp.linux-x86_64-2.7/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c src/blob.c -o build/temp.linux-x86_64-2.7/src/blob.o
    In file included from src/blob.h:34:0,
                     from src/blob.c:30:
    src/types.h:36:2: error: #error You need a compatible libgit2 version (v0.26.x)
     #error You need a compatible libgit2 version (v0.26.x)
      ^  
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
        
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g1Lyef/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-h0KZsU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-g1Lyef/pygit2/

Copy link
Contributor

@saadkadhi saadkadhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. pygit2 has too many dependencies and one of them, libgit2, must be 0.26.x while ubuntu 16.04 LTS has only libgit2-24. Sorry, the analyzer cannot be accepted as-is.

@3c7
Copy link
Contributor Author

3c7 commented Nov 3, 2017

  • Removed dependencies, analyzer requires manual cloned misp-warninglists repo.

@3c7 3c7 changed the title Added MISP warning lists analyzer WIP Added MISP warning lists analyzer Nov 3, 2017
@3c7 3c7 changed the title WIP Added MISP warning lists analyzer Added MISP warning lists analyzer Nov 11, 2017
@3c7 3c7 added this to the 1.8.0 milestone Dec 27, 2017
@3c7 3c7 merged commit f0b99b5 into TheHive-Project:develop Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:feature-request Issue is related to a feature request scope:analyzer Issue is analyzer related status:under-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants