OpenVas BackBox 4 installation script.

Started by ZEROF, November 05, 2014, 05:03:45 PM

Previous topic - Next topic

ZEROF

Hi,

To get started get script, run it and install OpenVas 7.

wget https://gist.github.com/ZEROF/fb790b35098be3bafcaf/raw -O openvas-backbox4.sh

chmod +x openvas-backbox4.sh

./openvas-backbox4.sh

Then just type 1, 2, 3 etc ...Respect installation steps.



Have fun.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

FIOM

hi ZEROF :)
tnx for share this optimus installation-script
i'm not expert to scripting bash
i'm try now && with your permission i've change around 5/6 lines to work in my fresh bb4x32-vm:
for example:
line 55:
#OpenVas libraries installation
function libraries () {
   cd /usr/local/src/openvas/   ###add /openvas
   cd openvas-libraries-7.0.4
        mkdir build        ###add mkdir build
   cd build
   cmake ..
   make
   make doc-full
   make install
   cd /usr/local/src
}   

i add this in Every "sections-installation""
thanks again & good works
regards FIOM

ZEROF

#2
Yep, it was strange for me to remove /build but i guess after a lot of testing on my machine i didn't need build directory anymore :). That will be fixed. And about openvas dir ... indeed. FIXED ;). And i have found one more path error, I just hope that now all looks fine.

Thanks.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

bartx


TAZ

Thank you for this useful script!!
but every time i needed to start openvas i had to run the script and then choose "[10] - start OpenVas 7", and since i'm lazy i added these 3 files to be able to launch openvas services from the menu>services tab...
could you add them to the installation script? ::)

/etc/init.d/openvas-services
#!/bin/sh

case "$1" in
  start)
    openvassd
    openvasmd --rebuild --progress
    openvasmd
    gsad --http-only -p 9392
    ;;
  stop)
    killall openvassd
    killall openvasmd
    killall gsad
    ;;
  *)
    echo "Usage: /etc/init.d/openvas-services {start|stop}"
    exit 1
    ;;
esac

exit 0


/usr/share/applications/services-openvas-services-start.desktop
[Desktop Entry]
Type=Application
Name=openvas-services start
GenericName=OpenVAS Services
Comment=service openvas-services start
TryExec=/etc/init.d/openvas-services
Exec=sh -c "sudo service openvas-services start; bash"
Icon=utilities-terminal
Terminal=true
Categories=BackBox-Services-OpenVAS;


/usr/share/applications/services-openvas-services-stop.desktop
[Desktop Entry]
Type=Application
Name=openvas-services stop
GenericName=OpenVAS Services
Comment=service openvas-services stop
TryExec=/etc/init.d/openvas-services
Exec=sh -c "sudo service openvas-services stop; bash"
Icon=utilities-terminal
Terminal=true
Categories=BackBox-Services-OpenVAS;

ZEROF

Will be my new weekend project :). Thanks for sharing code i will add this options.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

ZEROF

Who can wait for weekend  :D :

Version 0.3 is out:

https://gist.githubusercontent.com/ZEROF/fb790b35098be3bafcaf/raw

Changlog:

1. OpenVas init start script
2. Add start icon to BackBox "Services" menu
3. Add stop icon to BackBox "Services" menu
4. Menu and init start script will be removed when and if you want to remove OpenVas (option 14)

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

TAZ

just need to put a \ before the $ in line 193 and make the init script executable  ;)

ZEROF

Thanks TAZ, i know that with cat we need to escape all instances of $.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

rikyfree

#9
Hi guys, tanks for the hard work on the script but....
I've a lot problem with this.
I'm not able to launch openvas service from the backbox menu or via terminal.
I can switch it on only via the script.
Anyone have the same issue?

Edit:

Every time i start openvas from the script he rebuild the nvt cache.
He cannot find th eopenvassd and openvasm dprocess ?

ZEROF

#10
First, i don't see why you posted 2 times (fixed). 2nd i just used solution provided from TAZ to add this option to BBox menu and i didn't try if actually work.

And i'm going to run some fresh install and i will test it.

The end, pls provide errors you have, copy/paste them from terminal, like that i will know where to look.

P.S. Try to care about letter size when you write.

EDIT:

I need time to update this script, a lot of updates actually, and that will take some time for coding and much more for testing (for me with first beta was almost 1h long for new installation). I can use this (older) script and i get OpenVas to work, but if you are not advanced user, don't use it until next version.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

ZEROF

#11
After a lot of hours working on new installation script i think that i made our BackBox only working OpenVas 7 pentest distro around, and i don't think that this is joke at all.

Script was re-coded and all packages updated to last stable OpenVas 7 version. If I start to explain all work I did, it will take me a wille :). Just some basic stuff:

1. All OpenVas 7 packages updated to last version
2. All installation issue fixed
3. Because of a lot of OpenVas 7 updates, installation will take you more then 40min, with slower machine more then one hour
4. They have two times bigger base (security feeds) now and installation will take your time

What you need to know:

1. Don't use OpenVas on 1GB PC's
2. Don't use it if you don't have the time to wait (even when you start OpenVas you need to wait for 3-5min +-)

Test it :

wget https://gist.github.com/ZEROF/fb790b35098be3bafcaf/raw -O openvas-backbox4.sh

chmod +x openvas-backbox4.sh

./openvas-backbox4.sh



To do:

Making better services start | stop | restart | update scripts. Code used in the time is not good solution, but it's working.

Happy hacking.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*

rikyfree

tanks for your help!
now work fine for me, 2 min and openvas is running.
great work

XenFox

Quote from: ZEROF on February 01, 2015, 08:40:27 AM
https://gist.github.com/ZEROF/fb790b35098be3bafcaf/raw
Hello.
In this script, only update the links and instructions?
For example:
wget http://wald.intevation.org/frs/download.php/1907/openvas-libraries-7.0.7.tar.гз
on
wget https://wald.intevation.org/frs/download.php/2381/openvas-libraries-9.0.0.tar.гз


cd openvas-libraries-7.0.7
on
cd openvas-libraries-9.0.0


And so on..
Will work?

ZEROF

Hi man,

This script I wrote before one of openvas dev join our team, now you don't need this script, openvas comes as pre-installed service in BackBox. But if you want to play with it and update this script pls fork it. Install one VM for your tests, don't run on your BBox installation.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*