Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excel report by host, new filtering options, new config-file option
- Loading branch information
Duda Ferreira
committed
Nov 17, 2021
1 parent
fe25b83
commit bbe76d2
Showing
20 changed files
with
1,639 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Changelog | ||
========= | ||
|
||
1.5.0 - New Features: | ||
|
||
- Included option (--config-file) to define a .yaml file with all options but input and output filenames. | ||
if this option is used all other options are ignored. any options not present in this file will be set to default | ||
|
||
- Included option (--report-type) to define the type of report and created two new types of reports: | ||
- a report summarizing the hosts with the highest number of vulnerabilities and sum of all its cvss severities and including a tab for each host listing each vulnerability | ||
- a csv report ordered by host with all vulnerabilities (same fields as the by vulnerability type) | ||
(I don't believe it's worth creating a .docx version of this report, so I'm not creating it) | ||
|
||
- Included option (--network-exclude) to define a file with a list of ips or ipcidrs or range of ips (one by line) that will be excluded from the report | ||
|
||
- Included option (--network-include) to define a file with a list of ips or ipcidrs or range of ips (one by line) that will be included in the report | ||
|
||
- Included option (--regex-include) to define a file with a list of regex expressions to include in the report | ||
the regex expressions will be matched against the name of the vulnerability | ||
|
||
- Included option (--regex-exclude) to define a file with a list of regex expressions to exclude in the report | ||
the regex expressions will be matched against the name of the vulnerability | ||
|
||
- Included option (--cve-include) to define a file with a list of CVE numbers to include in the report | ||
|
||
- Included option (--cve-exclude) to define a file with a list of CVE numbers to exclude from the report | ||
|
||
-Fixes: | ||
|
||
- Major code refactor to include the new reports and the new options | ||
|
||
- Fix module packaging and shell script executions now run ok (import 'main' in top source __init__.py so the egg may be found) | ||
|
||
- Converted module packaging to python3.6+ packaging using setup.cfg e pyproject.toml | ||
|
||
- Removed package top dir setup.py and requirements.txt files that are not used anymore | ||
|
||
- Updated README.md to reflect those changes | ||
|
||
1.4.2 - Fixed "ValueError: Unknown format code 'f' for object of type 'str'" | ||
|
||
1.4.1 - Small bugfixes and code refactoring | ||
|
||
1.4.0 - Use Word template for report building | ||
|
||
1.3.1 - Add charts to Word document using matplotlib. Some code clean-up and small lay-out changes in Excel. | ||
|
||
1.3.0 - Fix retrieval of description and other useful info by parsing <tags> instead of <description> | ||
|
||
1.2.3 - Implement https://github.com/cr0hn/openvas_to_report/pull/12 | ||
|
||
1.2.2 - Fix bug where port info was not correctly extracted | ||
|
||
1.2.1 - Fix bug where affected hosts were added on wrong row in Excel export | ||
|
||
1.2.0 - Functional export to Word document (.docx). Includes some formatting. TODO: graphs | ||
|
||
1.1.0a - Support for exporting to Word document (.docx). Limited formatting, needs more testing | ||
|
||
1.0.1a - Small updates, preparing for export to other formats | ||
|
||
1.0.0 - First official release, supports export to Excel with graphs, ToC and worksheet per vulnerability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
level: | ||
medium | ||
|
||
format: | ||
xlsx | ||
|
||
reporttype: | ||
host | ||
|
||
networks: | ||
includes: | ||
- 10.0.0.0/8 | ||
- 172.16.0.0/12 | ||
- 192.168.0.0/16 | ||
excludes: | ||
- 10.1.16.234 | ||
- 10.1.16.236 | ||
- 10.1.16.237 | ||
- 10.1.16.238 | ||
- 10.1.16.239 | ||
- 192.168.16.120 | ||
|
||
regex: | ||
excludes: | ||
- Defender | ||
- Firefox | ||
|
||
# I use this section to filter out recent ms patches not put in production yet | ||
cve: | ||
excludes: | ||
- CVE-2021-1971 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Export to Comma Separated Values | ||
-------------------------------- | ||
|
||
When passing the --format csv parameter, the tool will export reports in Comma Separated Values (CSV) format. | ||
The CSV format is optimized for import in Excel. | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Create CSV report from 1 OpenVAS XML report using default settings | ||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i openvasreport.xml -f csv -r h | ||
Create CSV report from multiple OpenVAS XML report using default settings | ||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i *.xml -f csv | ||
# OR | ||
python3 openvasreporting.py -i openvasreport.xml -i openvasreport1.xml -i openvasreport2.xml [-i ...] -f csv | ||
Create CSV report from 1 OpenVAS XML report, reporting only severity level high and up | ||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i openvasreport.xml -o openvas_report -f csv -l h | ||
Result | ||
^^^^^^ | ||
|
||
The final report will look similar to this: | ||
|
||
.. todo:: | ||
[DOCS] Add examples of CSV report | ||
|
||
Vulnerabilities are sorted according to CVSS score (descending) and vulnerability name (ascending). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Export to Excel | ||
--------------- | ||
|
||
By default (or when passing the --format xlsx parameter), the tool will export reports in Excel (xlsx) format. | ||
|
||
This report contains a summary sheet, table of contents, and a sheet per vulnerability containing vulnerability details | ||
and a list of affected hosts. | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Create Excel report from 1 OpenVAS XML report using default settings | ||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i openvasreport.xml | ||
Create Excel report from multiple OpenVAS XML report using default settings | ||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i *.xml | ||
# OR | ||
python3 openvasreporting.py -i openvasreport.xml -i openvasreport1.xml -i openvasreport2.xml [-i ...] | ||
Create Excel report from 1 OpenVAS XML report, reporting only severity level high and up | ||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. code-block:: bash | ||
python3 openvasreporting.py -i openvasreport.xml -o openvas_report -f xlsx -l h | ||
Result | ||
^^^^^^ | ||
|
||
The final report will look similar to this: | ||
|
||
.. image:: ../_static/img/screenshot-report.png | ||
:alt: Report example screenshot - Summary | ||
:width: 30% | ||
|
||
.. image:: ../_static/img/screenshot-report1.png | ||
:alt: Report example screenshot - Table of Contents | ||
:width: 30% | ||
|
||
.. image:: ../_static/img/screenshot-report2.png | ||
:alt: Report example screenshot - Vulnerability description | ||
:width: 30% | ||
|
||
Vulnerability detail worksheets are sorted according to CVSS score and are colored according to the threat level. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.