Before we begin my Python script makes use of the Elasticsearch API. I installed it via pip:
# pip install elasticsearch
I assume an index exists called vulns. You can create it by hitting up the Elasticsearch API like this:
$ curl -XPUT http://localhost:9200/vulnsDifferent vulnerability scanners present time formats slightly different. It is a good idea to format it appropriately. For more information in the Elasticsearch docs check here. This is a sample API call you could make:
After the indexes are created you can run the script with XML output from a vulnerability scanner as input.
python VulntoES.py -i nessus_report_test_home.nessus -e 192.168.1.183 -r nessus
I have created a very simple dashboard in Kibana to visualize some of the vulnerabilities.
The script and dashboard can be found at my Github page: