GithubHelp home page GithubHelp logo

ibayoub / openvasreporting-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thegroundzero/openvasreporting

0.0 0.0 0.0 56.25 MB

OpenVAS Reporting: Convert OpenVAS XML report files to reports

License: Other

Python 100.00%

openvasreporting-1's Introduction

OpenVAS Reporting:

GitHub version License Docs Known Vulnerabilities codecov Requirements Status PyPI - Version PyPI - Format

A tool to convert OpenVAS XML into reports.

Report example screenshot

Read the full documentation at https://openvas-reporting.sequr.be

I forked OpenVAS2Report since it didn't manage to convert all reports I threw at it and because I wanted to learn how to use Python for working with XML and creating Excel files.
Also, OpenVAS mixes their own threat levels with the CVSS scoring, the latter of which I prefer to use in my reports.

Looking for a fix and providing an actual fix through a pull request would have been too much work, so I chose to fork the repo and try my own thing.
I reorganised some of the files, removed some functionality and added some extra, and rewrote some functions.

At this moment in time, the script only output .xlsx documents in one format, this may (not) change in the future.

Requirements

Installation

# Install Python3 and pip3
apt(-get) install python3 python3-pip # Debian, Ubuntu
yum -y install python3 python3-pip    # CentOS
dnf install python3 python3-pip       # Fedora
# Clone repo
git clone https://github.com/TheGroundZero/openvasreporting.git
# Install required python packages
cd openvasreporting
pip3 install -r requirements.txt
# Install module (not required when running from repo base folder)
#pip3 install .

Alternatively, you can install the package through the Python package installer 'pip'.
This currently has some issues (see #4)

# Install Python3 and pip3
apt(-get) install python3 python3-pip # Debian, Ubuntu
yum -y install python3 python3-pip    # CentOS
dnf install python3 python3-pip       # Fedora
# Install the package
pip3 install OpenVAS-Reporting

Usage

# When working from the Git repo
python3 -m openvasreporting -i [OpenVAS xml file(s)] [-o [Output file]] [-f [Output format]] [-l [minimal threat level (n, l, m, h, c)]] [-t [docx template]]
# When using the pip package
openvasreporting -i [OpenVAS xml file(s)] [-o [Output file]] [-f [Output format]] [-l [minimal threat level (n, l, m, h, c)]] [-t [docx template]]

Parameters

Short param Long param Description Required Default value
-i --input Input file(s) YES n/a
-o --output Output filename No openvas_report
-f --format Output format No xlsx
-l --level Minimal level No n
-t --template Docx template No openvasreporting/src/openvas-template.docx

Examples

Create Excel report from 1 OpenVAS XML report using default settings

python3 -m openvasreporting -i openvasreport.xml -f xlsx

Create Excel report from multiple OpenVAS reports using default settings

# wildcard select
python3 -m openvasreporting -i *.xml -f xlsx
# selective
python3 -m openvasreporting -i openvasreport1.xml -i openvasreport2.xml -f xlsx

Create Word report from multiple OpenVAS reports, reporting only threat level high and up, use custom template

python3 -m openvasreporting -i *.xml -o docxreport -f docx -l h -t "/home/user/myOpenvasTemplate.docx"

Result

The final report (in Excel format) will then look something like this:

Report example screenshot - Summary Report example screenshot - ToC Report example screenshot - Vuln desc

Worksheets are sorted according to CVSS score and are colored according to the vulnerability level.

Ideas

Some of the ideas I still have for future functionality:

  • list vulnerabilities per host
  • filter by host (scope/exclude) as in OpenVAS2Report
  • select threat levels individually (e.g. none and low; but not med, high and crit)
  • import other formats (not only XML), e.g. CSV as suggested in this issue

openvasreporting-1's People

Contributors

thegroundzero avatar cr0hn avatar noifp avatar flvernon avatar dhoetger avatar thorfin avatar emi420 avatar finsysbml avatar ididwhat avatar tothi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.