Tuesday, May 22, 2018

Parsing .Nessus files - Part 3-ish

Today I'm finally getting around to re-packaging Melcara's script to include the latest version released in September 2017. I'll also need to make the new changes to the perl script (which I foolishly did not save from prior changes).

So:

cpan install XML:TreePP Data::Dumper Math::Round Excel::Writer::XLSX Excel::Writer::XLSX::Chart Data::Table Getopt::Std Net::IP pp

Perl file changes (changed here, can be used to generate report in linux assuming you have all the right libraries):

1. Include "use Net::IP;" at top.
2. Re-order sections to write excel sheets at bottom to "Summary", Criticals, Highs, Mediums, Lows, Informational, Vulnerability to IP Summary.
3. Add block to sort IPs in that last sheet before writing them out.

Install Strawberry Perl Portable in Windows, then through trial-and-error install the modules needed to get pp to work. Pray that something works. But it never did and I gave up after six hours of frustration.

pp -M JSON -M PAR::Dist -M URI::Escape -M LWP::UserAgent -M HTTP::Cookies -M Data::Dump -M Data::Dumper -M XML::Hash::XS -M XML::TreePP -M MIME::Base64 -M Math::Round -M Excel::Writer::XLSX  -M Excel::Writer::XLSX::Chart -M Excel::Writer::XLSX::Chart::Pie -M Data::Table -M Getopt::Std Net::IP parse_nessus_xml.v24.pl

Note: some of these libraries may not be needed anymore but it worked last time and extra bits don't hurt in this case.

No comments: