nessplus

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

README

NessPlus

Go Reference Go Report Card GitHub release (latest SemVer)

This is an on-going project to make Nessus output more useful in day to day pentesting.

Installation

go install github.com/mister-turtle/nessplus/cmd/nessplus@latest

Using go install will install the binary to your GOBIN (go env GOBIN to check) so it will need to be in your shell $PATH for everyday usage.

Building

If you would prefer to build from scratch you can run the following

$ git clone https://github.com/mister-turtle/nessplus
$ cd nessplus
$ go mod download && go build ./cmd/nessplus

Usage

                           _            
                          | |          
 _ __   ___  ___ ___ _ __ | |_   _ ___ 
| '_ \ / _ \/ __/ __| '_ \| | | | / __|
| | | |  __/\__ \__ \ |_) | | |_| \__ \
|_| |_|\___||___/___/ .__/|_|\__,_|___/
                    | |                
                    |_|                

NAME:
   nessplus - Parse .nessus files in useful ways

USAGE:
   nessplus [global options] command [command options] [arguments...]

COMMANDS:
   compliance, com Parse compliance benchmarks from .nessus file
   summary, sum    Print out a summary of a nessus scan
   services, serv  Print out discovered services
   help, h         Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

Todo

  • Extract CVEs attached to a host/service
  • Use searchsploit to find known exploit code
  • Collate issues for reporting (opinionated)

Documentation

Overview

Credit for the base of the XML structs goes to Tom Steele / Lair Framework these have been expanded upon with missing elements and restructured to be easier to work with. https://github.com/lair-framework/go-nessus/blob/master/nessus.go

This file contains the raw Nessus XML format used for parsing a Nessus export.

Index

Constants

This section is empty.

Variables

View Source
var Severities = []string{
	"Informational",
	"Low",
	"Medium",
	"High",
	"Critical",
}

Functions

This section is empty.

Types

type Audit

type Audit struct {
	Total    int
	Passed   int
	Warning  int
	Failed   int
	Other    int
	Controls []Control
}

type Compliance

type Compliance struct {
	Total   int
	Passed  int
	Warning int
	Failed  int
	Other   int
	Audits  map[string]Audit
}

Compliance represents the compliance benchmark run against a single host and includes metadata about the compliance status as a whole along.

type Control

type Control struct {
	ID          string
	Name        string
	Status      string
	ActualValue string
	Description string
	Result      string
	Solution    string
	AuditFile   string
}

Control stores the result for a single benchmark control.

type Host

type Host struct {
	Name            string
	IP              string
	OperatingSystem string
	Compliance      Compliance
	Issues          []Issue
	Services        []Service
}

Host represents an instance of a single Host with information collated from plugins and meta tags where possible.

type HostMetadata

type HostMetadata struct {
	Name            string
	IP              string
	OperatingSystem string
}

HostMetadata describes a single ReportHost

type Issue

type Issue struct {
	PluginID    string
	Name        string
	Description string
	Severity    string
	SeverityInt int
}

type Metadata

type Metadata struct {
	PolicyName  string
	Name        string
	RunBy       string
	Description string
	Timing      Timing
}

Metadata contains data extracted from top-level nessus file elements about the scan.

type NessusRun

type NessusRun struct {
	Raw      nessusRaw
	Metadata Metadata
	Hosts    []Host
}

NessusRun is an abstracted and collated representation from a raw Nessus file. The original raw data is accessible through `Raw`

func Parse

func Parse(r io.Reader) (*NessusRun, error)

Parse takes an io.Reader which should produce a valid Nessus XML file. Metadata, Compliance scans, Issues, and Services are enumerated to return a *NessusRun .

type Service

type Service struct {
	Port     int
	Protocol string
	Name     string
	TLS      bool
}

type Timing

type Timing struct {
	Start    time.Time
	End      time.Time
	Duration time.Duration
}

Timing contains all the timing related aspects of the scan.

Directories

Path Synopsis
cmd
nessplus command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL