Hallo,

It's me again, sorry ^^ (thanks again for the previous answers).

I have a weird result that I can't explain but I think it's a base64
encoding/decoding problem. I'd like to have your opinion.
My aim is simple : I want to get all reports in CSV and in one file.
I have this :

-------------------------
#!/bin/sh

# Description: import of all reports generated by OpenVAS

IMPORT_FILE="openvas_reports.csv"

# csv format id
REPORT_FORMAT_ID="9087b18c-626c-11e3-8892-406186ea4fc5"

# Get reports
omp -u admin -w admin -X '
<get_reports format_id="'$REPORT_FORMAT_ID'"/>
' | egrep -o 'SVAsSG9zdG5hbWUsT1M[[:alnum:]]+' \
  | base64 -d > $IMPORT_FILE
-------------------------

The egrep may seems a bit..."meh" but since all CSV reports start like this
in base64 I though it would make the deal.

I made a scan in GSA and I got a high severity (7.5), 1 high, 4 medium, 0
low, 15 log.
When I run the script I get :

IP,Hostname,OS,Scan Start,Scan End,CVSS,Severity,High,Medium,Low,Log,False
Positive,Total
127.0.0.1, ........ ,*0.0,None,0,0,0,10,0,10*

I though I made a mistake in the script but I made another scan in GSA and
I got a medium severity (4.3), 0 high, 2 medium, 0 low, 7 log (I turned off
the service that generate the high vulnerability).
When I run the script, I get good results for the medium severity only:

IP,Hostname,OS,Scan Start,Scan End,CVSS,Severity,High,Medium,Low,Log,False
Positive,Total
127.0.0.1, ........ ,
*0.0,None,0,0,0,10,0,10 *
IP,Hostname,OS,Scan Start,Scan End,CVSS,Severity,High,Medium,Low,Log,False
Positive,Total
127.0.0.1, ........ ,*4.3,Medium,0,2,0,7,0,9*

In a terminal I tried, first, to get the high severity report in csv :
<get_reports_response status_text="OK" status="200">... extension="csv"
type="scan" content_type="text/csv">BLABLABLA<owner><name>....
I decoded the BLABLABLA part and

*that was the good information:*IP,Hostname,OS,Scan Start,Scan
End,CVSS,Severity,High,Medium,Low,Log,False Positive,Total
127.0.0.1, ........ ,*7.5,High,1,4,0,15,0,20*

Then, always in the terminal, I tried to get all reports (the high and the
medium) in CSV:
<get_reports_response status_text="OK" status="200">... extension="csv"
type="scan" content_type="text/csv">FIRSTBLABLA<owner><name>....
... extension="csv" type="scan"
content_type="text/csv">SECONDBLABLA<owner><name>....

FIRSTBLABLA correspond to the high severity report and when decoded it
gives *wrong information* => *0.0,None,0,0,0,10,0,10*
SECONDBLABLA correspond to the medium severity report and when decoded it
gives *good information =>* *4.3,Medium,0,2,0,7,0,9*

And now, I have X-files generic music in my mind.

Some additional informations :
Kali 1.1.0-amd64
OpenVAS-7 (scanner 4.0.2, Manager 5.0.2, GSA 5.0.1, CLI 1.3.0)
Everything works fine, nothing particular in logs
I tried with TXT format, same result : when I import one by one, no
problem. When I import all (the high and medium) I get wrong information
for the high.


If you have an idea, please let me know.
Thanks a lot in advance for your time.

Best regards,
S. Uzun
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to