New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Authenticated Scan with OpenVAS

Free

Perform deep vulnerability scans using OpenVAS with credentials.

Get this skill

Free · Opens the source repo

What Authenticated Scan with OpenVAS does

The Authenticated Scan with OpenVAS skill enables users to configure and execute credentialed vulnerability scans using the OpenVAS framework. By utilizing valid credentials for SSH, SMB, or ESXi, this skill allows for a thorough inspection of target systems, identifying local vulnerabilities, missing patches, and misconfigurations that unauthenticated scans often miss. Authenticated scans can reveal significantly more vulnerabilities—typically 10 to 50 times more—than their unauthenticated counterparts, making this tool essential for comprehensive security assessments.

This skill is particularly useful for security professionals conducting assessments, following incident response protocols, or performing scheduled security audits. It supports the creation of tasks and targets within the OpenVAS environment, allowing for the automation of vulnerability scanning processes. With its ability to integrate seamlessly with existing GVM installations, users can efficiently manage their security testing workflows.

To effectively use this skill, users must have a properly configured Greenbone Vulnerability Management (GVM) setup, including the necessary database and service configurations. The skill provides detailed instructions for setting up GVM on various platforms, including Docker, ensuring that users can get started quickly. Additionally, it includes commands for creating and managing credentials for different target types, as well as for initiating scans with custom configurations.

Overall, this skill is aimed at developers and security engineers who require a robust solution for performing in-depth vulnerability assessments in their environments. By leveraging OpenVAS's capabilities, users can enhance their security posture and ensure that their systems are protected against potential threats.

When to use it

Use this skill when you need to conduct detailed security assessments or audits that require logging into target systems to uncover hidden vulnerabilities.

When not to use it

This skill is not suitable for environments where unauthenticated scanning is sufficient or where credentialed access to systems is not possible.

What you can build with it

Security Audits

Conduct regular security audits using authenticated scans to ensure compliance and identify vulnerabilities.

Incident Response

Use this skill during incident response to assess affected systems and identify potential security weaknesses.

Scheduled Scanning

Automate vulnerability assessments by scheduling regular authenticated scans to maintain system security.

How to install Authenticated Scan with OpenVAS

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/performing-authenticated-scan-with-openvas --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mukul975

Performing Authenticated Scan with OpenVAS

Overview

OpenVAS (Open Vulnerability Assessment Scanner) is the scanner component of the Greenbone Vulnerability Management (GVM) framework. Authenticated scans use valid credentials (SSH for Linux, SMB for Windows, ESXi for VMware) to log into target systems, enabling detection of local vulnerabilities, missing patches, and misconfigurations that unauthenticated scans cannot identify. Authenticated scans typically find 10-50x more vulnerabilities than unauthenticated scans.

When to Use

  • When conducting security assessments that involve performing authenticated scan with openvas
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • GVM 22.x+ installed (gvmd, openvas-scanner, gsad, ospd-openvas)
  • PostgreSQL database configured for gvmd
  • Redis configured for openvas-scanner
  • NVT feed synchronized (greenbone-nvt-sync or greenbone-feed-sync)
  • SSH credentials for Linux targets or SMB credentials for Windows targets
  • Network access to target hosts on scan ports

Installation

Install GVM on Kali Linux / Debian

# Install GVM package
sudo apt update && sudo apt install -y gvm

# Run initial setup (creates admin account, syncs feeds)
sudo gvm-setup

# Check installation status
sudo gvm-check-setup

# Start all GVM services
sudo gvm-start

# Access Greenbone Security Assistant at https://127.0.0.1:9392

Install via Docker (Recommended for Production)

# Pull Greenbone Community Edition containers
docker pull greenbone/gvm:stable

# Run with docker-compose
curl -fsSL https://greenbone.github.io/docs/latest/_static/docker-compose-22.4.yml \
  -o docker-compose.yml

# Start the stack
docker compose -f docker-compose.yml -p greenbone-community-edition up -d

# Wait for feed sync (initial sync takes 15-30 minutes)
docker compose -f docker-compose.yml -p greenbone-community-edition \
  logs -f gvmd 2>&1 | grep -i "feed"

Configuring Credentials

SSH Credentials for Linux Targets

# Using gvm-cli to create SSH credential with key-based auth
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_credential>
    <name>Linux SSH Key</name>
    <type>usk</type>
    <login>scan_user</login>
    <key>
      <private><![CDATA['"$(cat /home/scan_user/.ssh/id_rsa)"']]></private>
      <phrase>key_passphrase</phrase>
    </key>
  </create_credential>'

# SSH credential with password authentication
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_credential>
    <name>Linux SSH Password</name>
    <type>up</type>
    <login>scan_user</login>
    <password>scan_password_here</password>
  </create_credential>'

SMB Credentials for Windows Targets

# Create SMB credential for Windows authenticated scanning
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_credential>
    <name>Windows SMB Cred</name>
    <type>up</type>
    <login>DOMAIN\scan_account</login>
    <password>smb_password_here</password>
  </create_credential>'

ESXi Credentials

# Create ESXi credential for VMware host scanning
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_credential>
    <name>ESXi Root</name>
    <type>up</type>
    <login>root</login>
    <password>esxi_password_here</password>
  </create_credential>'

Creating Scan Targets

# Create target with SSH credential (Linux hosts)
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_target>
    <name>Linux Production Servers</name>
    <hosts>192.168.1.10,192.168.1.11,192.168.1.12</hosts>
    <port_list id="33d0cd82-57c6-11e1-8ed1-406186ea4fc5"/>
    <ssh_credential id="CREDENTIAL_UUID_HERE">
      <port>22</port>
    </ssh_credential>
    <alive_test>ICMP, TCP-ACK Service and ARP Ping</alive_test>
  </create_target>'

# Create target with SMB credential (Windows hosts)
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_target>
    <name>Windows Domain Controllers</name>
    <hosts>192.168.1.20,192.168.1.21</hosts>
    <port_list id="33d0cd82-57c6-11e1-8ed1-406186ea4fc5"/>
    <smb_credential id="SMB_CREDENTIAL_UUID_HERE"/>
    <alive_test>ICMP, TCP-ACK Service and ARP Ping</alive_test>
  </create_target>'

Scan Configuration

Built-in Scan Configs

Config NameOIDUse Case
Full and fastdaba56c8-73ec-11df-a475-002264764ceaStandard production scan
Full and deep708f25c4-7489-11df-8094-002264764ceaThorough scan, may be disruptive
System Discovery8715c877-47a0-438d-98a3-27c7a6ab2196Host and service enumeration

Create Custom Scan Config for Authenticated Scan

# Clone "Full and fast" config and customize
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_config>
    <copy>daba56c8-73ec-11df-a475-002264764cea</copy>
    <name>Authenticated Full Scan</name>
  </create_config>'

Running the Scan

Create and Start Scan Task

# Create scan task
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_task>
    <name>Weekly Authenticated Scan - Linux Prod</name>
    <config id="CONFIG_UUID"/>
    <target id="TARGET_UUID"/>
    <scanner id="08b69003-5fc2-4037-a479-93b440211c73"/>
  </create_task>'

# Start the scan task
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<start_task task_id="TASK_UUID"/>'

# Check scan progress
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<get_tasks task_id="TASK_UUID"/>'

Schedule Recurring Scans

# Create weekly schedule (every Sunday at 2:00 AM UTC)
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<create_schedule>
    <name>Weekly Sunday 2AM</name>
    <icalendar>
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
DTSTART:20240101T020000Z
RRULE:FREQ=WEEKLY;BYDAY=SU
DURATION:PT12H
END:VEVENT
END:VCALENDAR
    </icalendar>
    <timezone>UTC</timezone>
  </create_schedule>'

Exporting Results

# Export scan report as XML
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<get_reports report_id="REPORT_UUID" format_id="a994b278-1f62-11e1-96ac-406186ea4fc5"/>'

# Export as CSV
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<get_reports report_id="REPORT_UUID" format_id="c1645568-627a-11e3-a660-406186ea4fc5"/>'

# Use python-gvm for programmatic access
python3 -c "
from gvm.connections import UnixSocketConnection
from gvm.protocols.gmp import Gmp
from gvm.transforms import EtreeCheckCommandTransform

connection = UnixSocketConnection(path='/run/gvmd/gvmd.sock')
transform = EtreeCheckCommandTransform()
with Gmp(connection=connection, transform=transform) as gmp:
    gmp.authenticate('admin', 'password')
    reports = gmp.get_reports()
    print(f'Total reports: {len(reports)}')
"

Validating Authentication Success

# Check if credentials were accepted during scan
# In the scan report, look for NVT "Authentication tests" results:
# - OID 1.3.6.1.4.1.25623.1.0.103591 (SSH authentication successful)
# - OID 1.3.6.1.4.1.25623.1.0.90023 (SMB authentication successful)

# Verify via gvm-cli
gvm-cli socket --socketpath /run/gvmd/gvmd.sock --gmp-username admin --gmp-password <password> --xml \
  '<get_results filter="name=SSH rows=10 sort-reverse=severity"/>'

References

Frequently asked questions about Authenticated Scan with OpenVAS

Similar skills