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
344 stars 233 forks source link

Can't install misp-modules in RHEL 7.9 #598

Closed thezolin closed 2 months ago

thezolin commented 1 year ago

Hello, I'm trying to install misp-modules a fresh install of MISP on a RedHat 7.9 I've tried following the instructions found in this repo but to no avail.

Any help is appreciated.

Below is the scenario:

Loaded plugins: langpacks, product-id, search-disabled-repos packages-microsoft-com-prod | 3.0 kB 00:00:00 rhui-microsoft-azure-rhel7 | 2.1 kB 00:00:00 rhui-rhel-7-server-dotnet-rhui-rpms | 4.2 kB 00:00:00 rhui-rhel-7-server-rhui-extras-rpms | 2.0 kB 00:00:00 rhui-rhel-7-server-rhui-rh-common-rpms | 2.1 kB 00:00:00 rhui-rhel-7-server-rhui-rpms | 2.0 kB 00:00:00 rhui-rhel-7-server-rhui-supplementary-rpms | 2.0 kB 00:00:00 rhui-rhel-server-rhui-rhscl-7-rpms | 2.0 kB 00:00:00 (1/4): rhui-rhel-7-server-rhui-extras-rpms/x86_64/primary | 435 kB 00:00:00 (2/4): rhui-rhel-7-server-rhui-rh-common-rpms/7Server/x86_64/updateinfo | 35 kB 00:00:00 (3/4): rhui-rhel-7-server-rhui-rh-common-rpms/7Server/x86_64/primary | 69 kB 00:00:00 (4/4): rhui-rhel-7-server-rhui-extras-rpms/x86_64/updateinfo | 263 kB 00:00:00 rhui-rhel-7-server-rhui-extras-rpms 1448/1448 rhui-rhel-7-server-rhui-rh-common-rpms 243/243 Package rh-python36-2.0-1.el7.x86_64 already installed and latest version Package rh-ruby22-2.0-6.el7.x86_64 already installed and latest version Nothing to do Loaded plugins: langpacks, product-id, search-disabled-repos No package openjpeg-devel available. Error: Nothing to do Loaded plugins: langpacks, product-id, search-disabled-repos Package rubygem-rouge-1.11.1-1.el7.noarch already installed and latest version Package rubygem-asciidoctor-1.5.6.1-1.el7.noarch already installed and latest version Package zbar-devel-0.10-27.el7.x86_64 already installed and latest version Package gcc-c++-4.8.5-44.el7.x86_64 already installed and latest version Package 1:pkgconfig-0.27.1-4.el7.x86_64 already installed and latest version Package python-devel-2.7.5-92.el7_9.x86_64 already installed and latest version Package redhat-rpm-config-9.1.0-88.el7.noarch already installed and latest version Nothing to do Cloning into 'misp-modules'... remote: Enumerating objects: 11582, done. remote: Counting objects: 100% (2485/2485), done. remote: Compressing objects: 100% (921/921), done. remote: Total 11582 (delta 1595), reused 2349 (delta 1497), pack-reused 9097 Receiving objects: 100% (11582/11582), 6.56 MiB | 7.86 MiB/s, done. Resolving deltas: 100% (7878/7878), done. Already using interpreter /opt/rh/rh-python36/root/usr/bin/python3 Using base prefix '/opt/rh/rh-python36/root/usr' New python executable in /node1_datadisk/MISP/venv/bin/python3 Also creating executable in /node1_datadisk/MISP/venv/bin/python Installing setuptools, pip, wheel...done. Collecting pip Using cached https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl Installing collected packages: pip Found existing installation: pip 9.0.1 Uninstalling pip-9.0.1: Successfully uninstalled pip-9.0.1 Successfully installed pip-21.3.1 You are using pip version 21.3.1, however version 22.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting scikit-build Using cached scikit_build-0.16.6-py3-none-any.whl (79 kB) Collecting distro Using cached distro-1.8.0-py3-none-any.whl (20 kB) Collecting wheel>=0.32.0 Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Collecting typing-extensions>=3.7 Using cached typing_extensions-4.1.1-py3-none-any.whl (26 kB) Collecting packaging Using cached packaging-21.3-py3-none-any.whl (40 kB) Collecting setuptools>=42.0.0 Using cached setuptools-59.6.0-py3-none-any.whl (952 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB) Installing collected packages: pyparsing, wheel, typing-extensions, setuptools, packaging, distro, scikit-build Attempting uninstall: wheel Found existing installation: wheel 0.29.0 Uninstalling wheel-0.29.0: Successfully uninstalled wheel-0.29.0 Attempting uninstall: setuptools Found existing installation: setuptools 28.8.0 Uninstalling setuptools-28.8.0: Successfully uninstalled setuptools-28.8.0 Successfully installed distro-1.8.0 packaging-21.3 pyparsing-3.0.9 scikit-build-0.16.6 setuptools-59.6.0 typing-extensions-4.1.1 wheel-0.37.1 Collecting ipaddress Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB) Installing collected packages: ipaddress Successfully installed ipaddress-1.0.23 Collecting typing Using cached typing-3.7.4.3-py3-none-any.whl Installing collected packages: typing Successfully installed typing-3.7.4.3 Ignoring backoff: markers 'python_version >= "3.7" and python_version < "4.0"' don't match your environment Ignoring bidict: markers 'python_version >= "3.7"' don't match your environment Ignoring click: markers 'python_version >= "3.7"' don't match your environment Ignoring configparser: markers 'python_version >= "3.7"' don't match your environment Ignoring filelock: markers 'python_version >= "3.7"' don't match your environment Ignoring frozenlist: markers 'python_version >= "3.7"' don't match your environment Ignoring httpcore: markers 'python_version >= "3.7"' don't match your environment Ignoring httpx: markers 'python_version >= "3.7"' don't match your environment Ignoring itsdangerous: markers 'python_version >= "3.7"' don't match your environment Ignoring jaraco.classes: markers 'python_version >= "3.7"' don't match your environment Ignoring jsonschema: markers 'python_version >= "3.7"' don't match your environment Ignoring keyring: markers 'python_version >= "3.7"' don't match your environment Ignoring markupsafe: markers 'python_version >= "3.7"' don't match your environment Processing /node1_datadisk/MISP/misp-modules Installing build dependencies ... done Getting requirements to build wheel ... error ERROR: Command errored out with exit status 1: command: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpn48ac4vt cwd: /node1_datadisk/MISP/misp-modules Complete output (3 lines): running egg_info creating misp_modules.egg-info error: could not create 'misp_modules.egg-info': Permission denied

WARNING: Discarding file:///node1_datadisk/MISP/misp-modules. Command errored out with exit status 1: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpn48ac4vt Check the logs for full command output. ERROR: Command errored out with exit status 1: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpn48ac4vt Check the logs for full command output. Processing /node1_datadisk/MISP/misp-modules Installing build dependencies ... done Getting requirements to build wheel ... error ERROR: Command errored out with exit status 1: command: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmppyvh0knc cwd: /node1_datadisk/MISP/misp-modules Complete output (3 lines): running egg_info creating misp_modules.egg-info error: could not create 'misp_modules.egg-info': Permission denied

WARNING: Discarding file:///node1_datadisk/MISP/misp-modules. Command errored out with exit status 1: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmppyvh0knc Check the logs for full command output. ERROR: Command errored out with exit status 1: /node1_datadisk/MISP/venv/bin/python3 /node1_datadisk/MISP/venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmppyvh0knc Check the logs for full command output. [Unit] Description=MISP's modules After=misp-workers.service

[Service] Type=simple User=apache Group=apache ExecStart=/usr/bin/scl enable rh-python36 rh-ruby22 '/node1_datadisk/MISP/venv/bin/misp-modules -l 127.0.0.1 -s' Restart=always RestartSec=10

[Install] WantedBy=multi-user.target [root@zeuwpmisp12 scripts]# journalctl -u misp-modules.service -f -- Logs begin at Fri 2023-01-20 13:30:35 UTC. -- Jan 23 12:53:53 zeuwpmisp12 systemd[1]: misp-modules.service: main process exited, code=exited, status=127/n/a Jan 23 12:53:53 zeuwpmisp12 systemd[1]: Unit misp-modules.service entered failed state. Jan 23 12:53:53 zeuwpmisp12 systemd[1]: misp-modules.service failed. Jan 23 12:54:10 zeuwpmisp12 systemd[1]: misp-modules.service holdoff time over, scheduling restart. Jan 23 12:54:10 zeuwpmisp12 systemd[1]: Stopped MISP's modules. Jan 23 12:54:10 zeuwpmisp12 systemd[1]: Started MISP's modules. Jan 23 12:54:10 zeuwpmisp12 scl[11792]: /var/tmp/sclcipN65: line 14: /node1_datadisk/MISP/venv/bin/misp-modules: No such file or directory Jan 23 12:54:10 zeuwpmisp12 systemd[1]: misp-modules.service: main process exited, code=exited, status=127/n/a Jan 23 12:54:10 zeuwpmisp12 systemd[1]: Unit misp-modules.service entered failed state. Jan 23 12:54:10 zeuwpmisp12 systemd[1]: misp-modules.service failed. Jan 23 12:54:20 zeuwpmisp12 systemd[1]: misp-modules.service holdoff time over, scheduling restart. Jan 23 12:54:20 zeuwpmisp12 systemd[1]: Stopped MISP's modules. Jan 23 12:54:20 zeuwpmisp12 systemd[1]: Started MISP's modules. Jan 23 12:54:20 zeuwpmisp12 scl[11890]: /var/tmp/scleUoXsK: line 14: /node1_datadisk/MISP/venv/bin/misp-modules: No such file or directory Jan 23 12:54:20 zeuwpmisp12 systemd[1]: misp-modules.service: main process exited, code=exited, status=127/n/a Jan 23 12:54:20 zeuwpmisp12 systemd[1]: Unit misp-modules.service entered failed state. Jan 23 12:54:20 zeuwpmisp12 systemd[1]: misp-modules.service failed. ^C

ostefano commented 2 months ago

I would suggest using misp-modules as published on PyPI, or migrate to misp-docker.