Altering Nmap Upload Notes

23 views
Skip to first unread message

wyoung

unread,
Jun 29, 2014, 10:32:39 AM6/29/14
to dradi...@googlegroups.com
Hi Daniel,

Before you had configured us to be able to easily alter the plugin output, I had altered the nmap upload filters.rb to create notes in a particular way.  I can now do this with your plugin output editor, however, I can't seem to edit the "host.service_table" field.  I would like to remove the entry for the "port.state" attribute, as it isn't really needed for what we're doing.  I removed this part from the /opt/dradispro/dradispro/current/vendor/plugins/nmap_upload/lib/nmap_upload/processor.rb to just read:

port_info << "| #{port.number} | #{port.protocol} |"

However, port.reason is still showing up in the nmap notes, so I don't think my changes are taking effect.  Am i editing the wrong file?  Thanks for your help.  

Daniel Martin

unread,
Jun 29, 2014, 3:44:28 PM6/29/14
to dradi...@googlegroups.com
Hi Will,

Whenever you change a plugin, you need to restart the service that runs the plugin.

Because we’ve moved upload processing to the background worker, the service you need to restart is “dradispro-resque-1”. You can do this from https://<ip>/setup

Once the service is restarted, it will use the new plugin code.

HTH,
Daniel
> --
> You received this message because you are subscribed to the Google Groups "Dradis Pro users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dradis-pro+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Director | Security Roots

wyoung

unread,
Jun 29, 2014, 3:58:27 PM6/29/14
to dradi...@googlegroups.com, dan...@securityroots.com
Yeah, I had restarted on the command line using the god command and it doesn't look like its using the new definition for host.service_table.  It's still including the port state and reason.  Here's that section of my processor.rb file:

def host_service_table

      ports = []

      # Build up a Services table with all the available information about each

      # individual port.

      @entry.each_port do |port|

        port_info = ''

        port_info << "| #{port.number} | #{port.protocol} |"

        #port_info << "| #{port.number} | #{port.protocol} | #{port.state} (#{port.reason}) |"

        if (srv = port.service_node)

          port_info << " #{srv['name'] || ''} |"

          port_info << " #{srv['product'] || ''} |"

          port_info << " #{srv['version'] || ''} |"

        else

          port_info << "  |  |  |"

        end

        port_info << "\n"

        ports << port_info

      end

      ports.join

    end

Reply all
Reply to author
Forward
0 new messages