Open Source Vulnerability Scanning Tips
Preamble :
I have more experience with Nessus & Qualys than OpenVAS, being a professional Penetration tester you don't normally rely on OpenVAS much. However after becoming a freelance consultant, I'd to build my skills for Open source vulnerability scanning tools, as you Nessus licenses cost a lot.
So essentially the below may be basic for some but it might help some who are new to it. This post has two items 1st one is mainly about accessing the OpenVAS web console remotely. 2nd is about ensuring the NMAP vulnerability scanning scripts (nse) are download.
Section 1: OpenVAS quick config (assume you've already installed OpenVAS on a VM)
#1: You may want to access OpenVAS remotely or want to access OpenVAS installed on a VM from the host machine.
sed -e 's/127.0.0.1/0.0.0.0/g' greenbone-security-assistant.service openvas-manager.service openvas-scanner.service -i
I have more experience with Nessus & Qualys than OpenVAS, being a professional Penetration tester you don't normally rely on OpenVAS much. However after becoming a freelance consultant, I'd to build my skills for Open source vulnerability scanning tools, as you Nessus licenses cost a lot.
So essentially the below may be basic for some but it might help some who are new to it. This post has two items 1st one is mainly about accessing the OpenVAS web console remotely. 2nd is about ensuring the NMAP vulnerability scanning scripts (nse) are download.
Section 1: OpenVAS quick config (assume you've already installed OpenVAS on a VM)
#1: You may want to access OpenVAS remotely or want to access OpenVAS installed on a VM from the host machine.
sed -e 's/127.0.0.1/0.0.0.0/g' greenbone-security-assistant.service openvas-manager.service openvas-scanner.service -i
The above command will replace all occurrences of 127.0.0.1 to 0.0.0.0 in the files above in the folder (/lib/systemd/system) which is needed to accept connections from any IP address.
Further you would need to allow the VM's external IP/public IP in the host header in my case it's VM's host only interface IP address.
ExecStart=/usr/sbin/gsad --foreground --listen=0.0.0.0 --port=9392 --mlisten=0.0.0.0 --mport=9390 --allow-header-host
Then restart the services:
systemctl daemon-reload
systemctl restart greenbone-security-assistant.service openvas-manager.service openvas-scanner.service
#2: You may want to update the services, using a bash script, I've saved the commands in the bash script as below:
#!/bin/bash
/usr/sbin/greenbone-nvt-sync
/usr/sbin/greenbone-certdata-sync
/usr/sbin/greenbone-scapdata-sync
/usr/sbin/openvasmd --update --verbose --progress
Once it's done navigate to "SecInfo>All SecInfo" you should have the latest list of vulnerabilities.
Section 2: There are two NSE scripts that are renowned for NMAP vulnerability scanning. They are
"Nmap-Vulners" and "Vulscan". Download these from these GIT repos respectively into the "cd /usr/share/nmap/scripts/" folder
git clone https://github.com/vulnersCom/nmap-vulners.git
git clone https://github.com/scipag/vulscan.git
Vulscan needs to be updated and in the same scripts folder cd to "vulscan/utilities/updater/" and run the "./updateFiles.sh"
Note: The "Nmap-Vulners" connects to vulners.com remote server (vulners.com API) to know if there are any known vulns for the service and while running you need to pass the "-sV" option. So this option would be limited if you chose to perform closed networks.
So you could combine both the scripts to
nmap --script nmap-vulners,vulscan --script-args vulscandb=scipvuldb.csv -sV -p-
....More to come.
Comments