Skip to main content

Overview

The OpenVAS scripts automate vulnerability scanning using OpenVAS/Greenbone Vulnerability Manager (GVM) via the OMP (OpenVAS Management Protocol) API. Scripts support both local Windows execution and remote Linux scanning.

openvas_scan.bat

Launches OpenVAS vulnerability scans on Windows using the OMP protocol.

Parameters

string
required
Project name for the scan
string
required
Target IP addresses or ranges
string
required
OpenVAS server hostname or IP
string
required
OpenVAS manager port (typically 9390)
string
required
OpenVAS authentication username
string
required
OpenVAS authentication password
string
required
Scan configuration UUID
string
required
Report format UUID
string
required
Output directory for reports
string
required
Timestamp for unique file naming

Usage

Workflow

  1. Create Target - Defines scan target with IP and port configuration
  2. Create Task - Associates target with scan configuration
  3. Start Task - Launches the scan
  4. Monitor Progress - Polls status every 60 seconds
  5. Generate Report - Retrieves report in specified format
  6. Decode Report - Decodes base64-encoded report data
  7. Cleanup - Removes temporary files

OMP Protocol Implementation

The script uses omp_cracked.exe to communicate via OMP XML protocol. Create Target:
Create Task:
Start Task:
Monitor Status:
Get Report:

Port Configuration

The script scans comprehensive port ranges:
  • TCP: 1-65535
  • UDP: Common service ports (DNS, DHCP, SNMP, NTP, etc.)
Full UDP port list includes: 7, 9, 13, 17, 19, 21, 37, 53, 67-69, 98, 111, 121, 123, 135, 137-138, 161, 177, 371, 389, 407, 445, 456, 464, 500, 512, 514, 517-518, 520, 555, 635, 666, 858, 1001, 1010-1011, 1015, 1024-1049, 1051-1055, 1170, 1194, 1243, 1245, 1434, 1492, 1600, 1604, 1645, 1701, 1807, 1812, 1900, 1978, 1981, 1999, 2001-2002, 2023, 2049, 2115, 2140, 2801, 2967, 3024, 3129, 3150, 3283, 3527, 3700, 3801, 4000, 4092, 4156, 4569, 4590, 4781, 5000-5001, 5036, 5060, 5321, 5400-5402, 5503, 5569, 5632, 5742, 6051, 6073, 6502, 6670, 6771, 6912, 6969, 7000, 7111, 7222, 7300-7301, 7306-7308, 7778, 7789, 7938, 9872-9875, 9989, 10067, 10167, 11000, 11223, 12223, 12345-12346, 12361-12362, 15253, 15345, 16969, 17185, 20001, 20034, 21544, 21862, 22222, 23456, 26274, 26409, 27444, 30029, 31335, 31337-31339, 31666, 31785, 31789, 31791-31792, 32771, 33333, 34324, 40412, 40421-40423, 40426, 47262, 50505, 50766, 51100-51101, 51109, 53001, 54321, 61466

Report Filters

Reports are filtered with:
  • autofp=0 - No automatic false positive detection
  • apply_overrides=1 - Apply user overrides
  • notes=1 - Include notes
  • overrides=1 - Include overrides
  • result_hosts_only=1 - Only hosts with results
  • sort-reverse=severity - Sort by severity (high to low)
  • levels=hml - High, Medium, Low severities
  • min_qod=70 - Minimum Quality of Detection 70%

Error Handling

Service Connection:
Status Checks:
  • Internal Error - Exits with error
  • Stopped - Exits scan
  • Done - Proceeds to report generation

Output Files

  • OpenvasReport - {Timestamp}.html - Decoded HTML report
The report automatically opens after completion.

openvas_scan_remote.sh

Executes OpenVAS scans on remote Linux servers.

Parameters

Usage

Prerequisites

The script validates required tools:
Required packages:
  • xmlstarlet - XML parsing
  • openvas-client - OMP client (omp command)
  • openssl - Base64 decoding

Service Auto-Detection

If server/port parameters are empty, the script auto-detects using netstat or ss:
Defaults to 127.0.0.1:9390 if detection fails.

Scanner Initialization Wait

The script waits for scanner initialization:

Implementation Differences

Command:
XML Parsing:
Base64 Decode:

Output Location

  • Windows: %Documentacion%\OpenvasReport - {Timestamp}.html
  • Linux: /tmp/OpenvasReport - {Timestamp}.html

Cleanup

Both scripts remove temporary files:

API Documentation

OMP protocol documentation: http://docs.greenbone.net/API/OMP/omp.html