TravisFSmith / SweetSecurity

Network Security Monitoring on Raspberry Pi type devices
Apache License 2.0
777 stars 190 forks source link

Bro IDS install IOError #25

Open ech03 opened 7 years ago

ech03 commented 7 years ago

Having trouble with the install when reaching the Bro install..... getting this error.... Any ideas on the cause and a solution?

Installing Bro IDS Downloading Bro IDS 2.5.1 Unpacking Bro Code Creating Bro Directory Structures Configuring Bro Code Making Bro Code Installing Bro Code Cleaning Up Bro Installation Files Configuring Bro Traceback (most recent call last): File "setup.py", line 185, in bro.install(chosenInterface, 'localhost') File "/home/linaro/sweetsecurity/install/bro.py", line 45, in install shutil.move('/opt/nsm/bro/etc/node.cfg','/opt/nsm/bro/etc/node.orig') File "/usr/lib/python2.7/shutil.py", line 302, in move copy2(src, real_dst) File "/usr/lib/python2.7/shutil.py", line 130, in copy2 copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/opt/nsm/bro/etc/node.cfg'

TravisFSmith commented 7 years ago

Bro did not get installed correctly. Are you running on Debian 9 by any chance? You'll need to add a couple of additional packages to get Bro installed.

https://github.com/TravisFSmith/SweetSecurity/wiki/FAQ

2017sec commented 6 years ago

Great project, however I am also experiencing exactly the same issue on raspbian on a pi 3. All prerequisites are installed.

Please help :(

Thank you.

Agromahdi123 commented 6 years ago

The only workaround i found for this was to install bro first from source, then make install, then run the installer script. That way the first bro install will have the directories, and then the installer will overwrite the necessary config files. At least thats what it did for me.

Dulanic commented 6 years ago

I am seeing same issue. I installed any listed dependencies using raspbian lite.

> Traceback (most recent call last):
>   File "setup.py", line 257, in <module>
>     bro.install(chosenInterface, esServer)
>   File "/home/pi/SweetSecurity/install/bro.py", line 45, in install
>     shutil.move('/opt/nsm/bro/etc/node.cfg','/opt/nsm/bro/etc/node.orig')
>   File "/usr/lib/python2.7/shutil.py", line 302, in move
>     copy2(src, real_dst)
>   File "/usr/lib/python2.7/shutil.py", line 130, in copy2
>     copyfile(src, dst)
>   File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
>     with open(src, 'rb') as fsrc:
> IOError: [Errno 2] No such file or directory: '/opt/nsm/bro/etc/node.cfg'
Dulanic commented 6 years ago

Edit: NM still doesnt work.


Traceback (most recent call last):
  File "setup.py", line 257, in <module>
    bro.install(chosenInterface, esServer)
  File "/home/pi/SweetSecurity/install/bro.py", line 45, in install
    shutil.move('/opt/nsm/bro/etc/node.cfg','/opt/nsm/bro/etc/node.orig')
  File "/usr/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/usr/lib/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/opt/nsm/bro/etc/node.cfg'
crclabs commented 6 years ago

This appears to be a compatibility issue with Bro and by openssl 1.1. Using libssl1.0-dev instead of libssl-dev seems to work around this for now (you can change which package gets installed in install/packages.py).

jamitupya commented 6 years ago

can confirm that my experience is the same here. i've been dealing with it on deb jessie also, same result, remove the offending package "apt-get remove libssl-dev -y" and then install "apt-get install libssl1.0-dev -y" gets it done.

additionally, you WILL need to update "install/packages.py" lines 24,26,38 and 40 accordingly otherwise it reinstalls and kills it again.

jouellnyc commented 5 years ago

+1 - Updating the dependencies and modd'ing the lines per jamitupya fixed the issue. Now on to using the tool!