Lucene search
+L

DB2 Probe Utility

🗓️ 25 Jan 2010 16:25:29Reported by todb <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 16 Views

This module queries a DB2 instance informatio

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

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

  def initialize
    super(
      'Name'           => 'DB2 Probe Utility',
      'Description'    => 'This module queries a DB2 instance information.',
      'Author'         => ['todb'],
      'License'        => MSF_LICENSE
    )
    register_options(
      [
        OptInt.new('TIMEOUT', [true, 'Timeout for the DB2 probe', 5])
    ])

    deregister_options('USERNAME' , 'PASSWORD')
  end

  def to
    return 5 if datastore['TIMEOUT'].to_i.zero?
    datastore['TIMEOUT'].to_i
  end

  def run_host(ip)
    begin

      info = db2_probe(to)
      if info[:excsatrd]
        inst,plat,ver,pta = info[:instance_name],info[:platform],info[:version],info[:plaintext_auth]
        report_info = "Platform: #{plat}, Version: #{ver}, Instance: #{inst}, Plain-Authentication: #{pta ? "OK" : "NO"}"
        print_good("#{ip}:#{rport} DB2 - #{report_info}")
        report_service(
          :host => rhost,
          :port => rport,
          :name => "db2",
          :info => report_info
        )
      end
      disconnect

    rescue ::Rex::ConnectionRefused
      vprint_error("#{rhost}:#{rport} : Cannot connect to host")
      return :done
    rescue ::Rex::ConnectionError
      vprint_error("#{rhost}:#{rport} : Unable to attempt probe")
      return :done
    rescue ::Rex::Proto::DRDA::RespError => e
      vprint_error("#{rhost}:#{rport} : Error in connecting to DB2 instance: #{e}")
      return :error
    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

24 Jul 2017 13:26Current
7.3High risk
Vulners AI Score7.3
16