Last active
September 2, 2020 22:08
-
-
Save droberson/77b030cdefb731f6ab1b88a453e5ca47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install OpenVAS + Greenbone Security Assistant on Ubuntu 16.04 (using openvas9 metapackage) | |
apt update && apt upgrade | |
apt install python-software-properties | |
apt install sqlite3 | |
apt install software-properties-common | |
apt install python-software-properties | |
add-apt-repository ppa:mrazavi/openvas | |
apt-get update | |
apt-get install openvas9 | |
apt install libopenvas9-dev ### if you want to develop | |
apt install texlive-latex-extra --no-install-recommends ### For PDF reports | |
apt install texlive-fonts-recommended ### For PDF | |
reboot | |
# Get updated signatures/rules | |
/usr/sbin/greenbone-nvt-sync | |
/usr/sbin/greenbone-scapdata-sync | |
/usr/sbin/greenbone-certdata-sync | |
# Restart services | |
sudo service openvas-scanner restart | |
sudo service openvas-manager restart | |
sudo openvasmd --rebuild --progress | |
# Firewall if applicable | |
sudo ufw allow ssh | |
sudo ufw allow 4000/tcp | |
sudo ufw enable | |
# Set admin user password, default is "admin" | |
openvasmd --new-password=S3cr3t\#1 --user=admin | |
# Periodically, run the nvt, scapdata, and certdata syncs to have up to date rules; add a cronjob: | |
#!/bin/bash | |
# update-openvas-feeds.sh -- by Daniel Roberson | |
# -- Meant to be placed in the crontab for nightly updates of the OpenVAS feeds | |
# | |
TEMPFILE=$(tempfile) | |
/usr/sbin/greenbone-nvt-sync > "$TEMPFILE" 2>&1 | |
if [ $? -ne 0 ]; then | |
cat "$TEMPFILE" | |
fi | |
/usr/sbin/greenbone-certdata-sync > "$TEMPFILE" 2>&1 | |
if [ $? -ne 0 ]; then | |
cat "$TEMPFILE" | |
fi | |
/usr/sbin/greenbone-scapdata-sync > "$TEMPFILE" 2>&1 | |
if [ $? -ne 0 ]; then | |
cat "$TEMPFILE" | |
fi | |
rm "$TEMPFILE" | |
# Finally, | |
http://server:4000 should pull up GSA | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment