marekpawlowski / Openvas-Automation

The instructions provide a simpler way to install and run openvas docker container. The script automates the process of scanning a host provided with (IP, SSH Username and SSH Password). This automatically generates the report for further analysis. It can be easily integrated in CI pipeline provided the report analysis has to be done manually. Future implementation contain providing a REST api wrapper around the script and use Vulnerability Scanning As A Service Feature

Home Page:http://kunalpachauri.co.in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Openvas-Automation

The instructions provide a simpler way to install and run openvas docker container. The script automates the process of scanning a host provided with (IP, SSH Username and SSH Password). This automatically generates the report for further analysis. It can be easily integrated in CI pipeline provided the report analysis has to be done manually. Future implementation contain providing a REST api wrapper around the script and use Vulnerability Scanning As A Service Feature

Automated Authenticated Vulnerability Assessment using Openvas

Installation:
1. Docker should be installed
sudo apt-get install docker.io
2. Pull and run openvas docker by mapping required ports
docker run -d -p 443:443 -p 9390:9390 -e OV_PASSWORD=admin --name openvas mikesplain/openvas
3. Check if docker is running
docker container ls
4. Add openvas to /etc/hosts
5. Inside docker shell, change password of openvas
openvasmd --user=admin --new-password=new_password

Description:
(OMP) Together, OpenVAS Scanner (openvassd(8)) and OpenVAS Manager (openvasmd(8)) provide the core functionality of the Open Vulnerability Assessment System (OpenVAS), with OpenVAS Scanner handling the actual scan process and OpenVAS Manager adding various management functionalities to handle and organise scan results. The omp binary is a command line client which uses the OMP protocol to connect to the OpenVAS Manager and makes it easy to access the full functionality provided by the OpenVAS Manager conveniently from the command line and allows quick integration in a scripted environment.

Check if OMP is installed
1. Get docker shell (docker exec -it /bin/bash)
2. Connect to omp to check if it is working (omp -h -u -w -g)
3. This should give a list of scan types available

Creating Credentials
omp -u admin -w admin -iX "<CREATE_CREDENTIAL>kali loginroottoor</CREATE_CREDENTIAL>"

Add Target and add credentials to it
omp -u admin -w admin -iX "<CREATE_TARGET>Base Image test9192.168.213.133<ssh_lsc_credential id='f34aae8f-0c2a-43dd-b0a4-18b7e45d7c3f'>22</ssh_lsc_credential></CREATE_TARGET>"

Create Task with Target and Scan Config( -g in omp can show all supported config)
omp -u admin -w admin -iX "<CREATE_TASK>KALI Full ScanDeep Scan on Kali Image</CREATE_TASK>"

Running a Task:
omp -u admin -w admin -iX "<start_task task_id='9b771df4-5f99-4906-bd6d-776defa0ca4a'/>"

Fetching Report
omp -u admin -w admin -iX "<get_reports report_id='03bd6238-9d27-4a8c-adf3-b5a93f1ce41a' format_id='c402cc3e-b531-11e1-9163-406186ea4fc5'/>"

Then covert the base 64 string to obtain type of report (PDF in this case)

Checking status of tasks
omp -u admin -w admin -G

About

The instructions provide a simpler way to install and run openvas docker container. The script automates the process of scanning a host provided with (IP, SSH Username and SSH Password). This automatically generates the report for further analysis. It can be easily integrated in CI pipeline provided the report analysis has to be done manually. Future implementation contain providing a REST api wrapper around the script and use Vulnerability Scanning As A Service Feature

http://kunalpachauri.co.in


Languages

Language:Shell 87.6%Language:Python 12.4%