There appears to be something wrong with the Nexpose Plugin on Dradis Pro 1.5.
I am trying to import an XML file into the system. It looks like it processes it fine. However, only 3 hosts show up and do not contain all the information…1 has the open ports, while the others have just that the host is live. No vulns are anything else are parsing into Dradis.
Any suggestions?
Michael Smith | Senior Security Engineer/Security Consultant
Masters of Science Information Assurance, CISSP, OSCP, GPEN, Security+
ePlus Security, a division of ePlus
Phone: 847-695-1990 ext 4278
Email: msm...@eplus.com | Web: http://www.eplussecurity.com | Nasdaq: PLUS
The information contained in this electronic transmission and any attachments hereto may be considered proprietary and confidential. Unauthorized distribution of this material to anyone other than the addressed is prohibited. Any disclosure, distribution or use of this transmission for any reason other than their intended purpose is prohibited.
I’m importing Full under the new Plugin Manager system. Actually XML Export to be technical, but definitely not the simple one.
How am I supposed to Fix the Case sensitivity issue though? These are exported Nexpose reports… I mean, it becomes rather pointless if I have to spend hours going through all the XML to find if something is off or not… wouldn’t that take more time than just putting the info into a report manually? Or do you have a workaround you’d recommend? I don’t have any issues with the Simple XML import from the same scan… just the Full one.
Michael Smith | Senior Security Engineer/Security Consultant
Masters of Science Information Assurance, CISSP, OSCP, GPEN, Security+
ePlus Security, a division of ePlus
Here is the command to watch the import from a console session (substitute Nexpose for Nessus):
$ RAILS_ENV=production bundle exec rails runner lib/upload_processing_job.rb NessusUpload /tmp/nessus.xml <random
number> <project id>
The <project id> can be found by hovering over the project name you created and viewing the bar at the bottom of your browser.
I’ll give it a shot.
Thanks Todd!
Ok,
So I tried a new XML with a smaller sample size. This one is under 1 MB in size. This time, it actually returns an error in upload manager (which wasn’t happening before… it would stop at saying NeXpose-Full format detected, so sounds like Todd is on to something on the size item).
What I’m not sure is how to fix this… I don’t know XML well enough to fix an error there and I certainly don’t want to go through 10-20000 lines looking for an error.
I made sure my Ruby was at 1.9.3 and re-ran the upgrade, but that did not fix anything either.
[17:44:18] Small attachment detected. Processing in line.
[17:44:18] started debugging
[17:44:19] Parsing NeXpose output file...
[17:44:19] Parsing done
[17:44:19] NeXpose-Full format detected
[17:44:22] There was a fatal error processing your upload:
[17:44:22] undefined method `last_element_child' for nil:NilClass
[17:44:22] Worker process completed.
I’m really missing my Nessus right about now… Wish there was a Qualys Plugin somewhere to use.
I’d be happy too… but let’s pretend that there are some on the list who don’t know how to provide that and tell them how to do it… for their sake I SWEAR… not mine ;-)
Todd’s code fix he sent did not seem to fix that issue. I still cannot see anything additional in the feedback window for the bigger XML files.
Michael Smith | Senior Security Engineer/Security Consultant
Masters of Science Information Assurance, CISSP, OSCP, GPEN, Security+
ePlus Security, a division of ePlus
Ok, I’ve seen this before.
[17:44:22] undefined method `last_element_child' for nil:NilClass
This came up based on a custom plugin for Nexpose that I asked Daniel about. It is supposed to create a #[host]# file, so I’m wondering if it is breaking because you don’t have that plugin, or because there is a problem with the XML file. I think it is the latter and there is a way to log information to the importer window that will allow you to track which IP is giving you the trouble and thus which XML element. Again, I need to look for that thread, but it would be within the nexpose filter.rb file.
In order to debug, add this after the `nexpose_node = ` line around filter.rb#160:
> nexpose_node = Nexpose::Node.new(xml_node)
> puts nexpose_node.address
> node_node = @parent.children.find_or_create_by_label_and_type_id(nexpose_nod$
And this before the `endpoint_node =` line around filter.rb#183:
nexpose_node.endpoints.each do |endpoint|
puts endpoint.label
endpoint_node = node_node.children.find_or_create_by_label(endpoint.label)
And run the background task again:
$ RAILS_ENV=production bundle exec rails runner lib/upload_processing_job.rb NexposeUpload "/tmp/scan.xml" 21 5
That should provide you with the list of IP addresses as they are getting parsed and it will stop on the one you are having trouble with, which makes the application barf. Once you’ve done that you need to look in the XML file you are trying to load:
The XML structure is:
<NexposeReport>
<scans>...</scans>
<nodes>...</nodes>
<VulnerabilityDefinitions>...</VulnerabilityDefinitions>
</NexposeReport>
The source of the error will be located inside a specific <node> (whatever IP it barfs on) and will most likely have to do with one of the <vulnerability> elements inside the VulnerabilityDefinitions section.
Example:
<vulnerability id="HTTP-APACHE-0008" title="Apache Server mod_info is Publicly Accessible" severity="7" pciSeverity="3" cvssScore="5.0"
cvssVector="(AV:N/AC:L/Au:N/C:P/I:N/A:N)" published="20041101T000000000"
added="20041101T000000000" modified="20110128T000000000">
In the <host> section, this is identified as "http-apache-0008" in the <VulnerabilityDefinitions> the id is upper-cased "HTTP-APACHE-0008". A quick test would be, load the problem results XML in an editor, locate the <vulnerability> entry, convert the id to lower-case, save and run the background task again. If that works then Daniel should be able to fix the plugin code to perform a case-insensitive search for this particular vuln id. (Which I thought he did across the board, but maybe there is another aspect here we are missing?).