SweetSecurity icon indicating copy to clipboard operation
SweetSecurity copied to clipboard

Bro IDS install IOError

Open ech03 opened this issue 8 years ago • 8 comments

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'

ech03 avatar Aug 28 '17 14:08 ech03

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

TravisFSmith avatar Aug 28 '17 20:08 TravisFSmith

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.

2017sec avatar Sep 25 '17 16:09 2017sec

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.

Agromahdi123 avatar Sep 26 '17 15:09 Agromahdi123

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 avatar Oct 22 '17 15:10 Dulanic

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'

Dulanic avatar Oct 24 '17 00:10 Dulanic

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).

crclabs avatar Nov 02 '17 01:11 crclabs

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.

jamitupya avatar May 18 '18 03:05 jamitupya

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

jouellnyc avatar Mar 16 '19 16:03 jouellnyc