Closed elreydetoda closed 7 years ago
Bump. Still having issues with Misp Modules will not run as any user other than root, and Stix/Cybox/MixBox shows the libraries are not installed on the web.
@krypto29s figured it out, it was a weird permissions error that wasn't allowing everyone to access python libraries. So we ran sudo chmod -R ugo+rX /usr/local/lib/python3.5/dist-packages/
and after that we were able to execute misp-modules from any user.
Hi,
I first wanted to share some information with you all in case you hadn't heard about it yet/if another user runs into the same problem.
INFORMATION
So I just wanted to let all know about this, and it makes sense but I ran into it on another persons system while working on it. If you are trying to run misp-modules on Ubuntu (or at least on NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" kernel version 4.4.0-83-generic) and you disable ipv6 but the device is still capable of ipv6 (shown from the netstat below for ssh). Then python will still try to default to ipv6, and since there is no ipv6 address you aren't able to start any of the modules...
It shows here that weird things still happen in the kernel for ubuntu to allow this, but since there is no ipv6 address for any interface (including lo) then when trying to run misp-modules it will show the following
The reason why (at least I believe from understanding what is going on and looking at the code while changing some things and then it working) is because of course it doesn't have an ipv6 address and when trying to bind to localhost it tries to bind to the localhost ipv6 address (non existent). So the way I fixed it was by going into the
/usr/local/lib/python3.5/dist-packages/misp_modules/__init__.py
and changing localhost to127.0.0.1
. after doing that everything worked properly from that standpoint.QUESTION
I was curious if you have ever ran into that when trying to run
misp-modules
command, that no user was able to run it except for root? There is something wrong in being able to read the library or something for misp-modules and I don't know what is going on exactly... So I know it is a permission issue because when I try and run the command you recommend when running ubuntu to start the misp-modulessudo -u www-data misp-modules &
orsudo -u www-data misp-modules -s &
I get the following errorso I did some investigating and when I run
python3
for an interactive shell (as an unprivileged user) and then do the followingI get the following
but when I do the same as root or sudoing this is what I get
which shows that it imports correctly, so do you all possibly know what it could be? I did the install properly and when I run
sudo misp-modules
everything works properly, but if I don't do a sudo or run as root then it won't be able to import everything ( as I showed you from the error above). Any ideas? Because I really don't want to run this as root but as the www-data user like how you all say.thank you for this awesome product I am loving it so far!