Lucene search
K

DB2 Discovery Service Detection

🗓️ 05 Aug 2009 21:21:45Reported by MC <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 14 Views

DB2 Discovery Service Detection module queries DB2 discovery service for informatio

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Auxiliary::Report
  include Msf::Auxiliary::Scanner
  include Msf::Exploit::Remote::Udp

  def initialize
    super(
      'Name'           => 'DB2 Discovery Service Detection',
      'Description'    => 'This module simply queries the DB2 discovery service for information.',
      'Author'         => [ 'MC' ],
      'License'        => MSF_LICENSE
    )

    register_options([Opt::RPORT(523),])
  end

  def run_host(ip)

    pkt = "DB2GETADDR" + "\x00" + "SQL05000" + "\x00"

    begin

      connect_udp
      udp_sock.put(pkt)
      res = udp_sock.read(1024)

      unless res
        print_error("Unable to determine version info for #{ip}")
        return
      end

      res = res.split(/\x00/)

      report_note(
        :host   => ip,
        :proto  => 'udp',
        :port   => datastore['RPORT'],
        :type   => 'SERVICE_INFO',
        :data   => "#{res[2]}_#{res[1]}"
        )

      report_service(
        :host => ip,
        :port => datastore['RPORT'],
        :proto => 'udp',
        :name => "ibm-db2",
        :info => "#{res[2]}_#{res[1]}"
      )

      print_good("Host #{ip} node name is " + res[2] + " with a product id of " + res[1] )

    rescue ::Rex::ConnectionError
    rescue ::Errno::EPIPE
    ensure
      disconnect_udp
    end

  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Mar 2019 19:04Current
0.3Low risk
Vulners AI Score0.3
14